r58217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58216‎ | r58217 | r58218 >
Date:21:08, 27 October 2009
Author:tomasz
Status:ok
Tags:
Comment:
re-adding change from r57837 which got bumped from 57999
Modified paths:
  • /trunk/extensions/DonationInterface/donate_interface/donate_interface.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/donate_interface/donate_interface.php
@@ -55,7 +55,8 @@
5656 );
5757
5858 // if form has been submitted, assign data and redirect user to chosen payment gateway
59 - if ( $_POST['process'] == '_yes_' ) {
 59+ if ( isset( $_POST['process'] ) ) {
 60+ if ( $_POST['process'] == '_yes_' ) {
6061 // find out which amount option was chosen for amount, redefined buttons or text box
6162 if( isset( $_POST['amount'] ) ) {
6263 $amount = number_format( $wgRequest->getText( 'amount' ), 2 );
@@ -83,7 +84,8 @@
8485
8586 // send user to correct page for payment
8687 redirectToProcessorPage( $userInput, $url );
87 - } // end if form has been submitted
 88+ } // end if form has been submitted
 89+ }
8890
8991 return true;
9092 }
@@ -270,14 +272,14 @@
271273 $chosenGateway = $userInput['payment_method'];
272274
273275 $wgOut->redirect(
274 - $url[$chosenGateway] . '&amount=' . $userInput['amount'] .
275 - '&currency_code=' . $userInput['currency'] . '&gateway=' .
276 - $userInput['payment_method'] . '&referrer=' . $userInput['referrer'] .
277 - '&utm_source=' . $userInput['utm_source'] . '&utm_medium=' .
278 - $userInput['utm_medium'] . '&utm_campaign=' . $userInput['utm_campaign'] .
279 - '&language=' . $userInput['language'] . '&comment=' .
280 - $userInput['comment'] . '&comment-option=' . $userInput['comment-option'] .
281 - '&email=' . $userInput['email']
 276+ $wgPaymentGatewayHost . $url[$chosenGateway] . '&amount=' .
 277+ $userInput['amount'] . '&currency_code=' . $userInput['currency'] .
 278+ '&gateway=' . $userInput['payment_method'] . '&referrer=' .
 279+ $userInput['referrer'] . '&utm_source=' . $userInput['utm_source'] .
 280+ '&utm_medium=' . $userInput['utm_medium'] . '&utm_campaign=' .
 281+ $userInput['utm_campaign'] .'&language=' . $userInput['language'] .
 282+ '&comment=' . $userInput['comment'] . '&comment-option=' .
 283+ $userInput['comment-option'] .'&email=' . $userInput['email']
282284 );
283285 }
284286
@@ -343,4 +345,4 @@
344346 return null;
345347 }
346348
347 -}
\ No newline at end of file
 349+}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57837Adding remote gateway opition. fix small initialization errorstomasz23:54, 16 October 2009

Status & tagging log