Index: trunk/extensions/DonationInterface/donate_interface/donate_interface.php |
— | — | @@ -55,7 +55,8 @@ |
56 | 56 | ); |
57 | 57 | |
58 | 58 | // 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_' ) { |
60 | 61 | // find out which amount option was chosen for amount, redefined buttons or text box |
61 | 62 | if( isset( $_POST['amount'] ) ) { |
62 | 63 | $amount = number_format( $wgRequest->getText( 'amount' ), 2 ); |
— | — | @@ -83,7 +84,8 @@ |
84 | 85 | |
85 | 86 | // send user to correct page for payment |
86 | 87 | redirectToProcessorPage( $userInput, $url ); |
87 | | - } // end if form has been submitted |
| 88 | + } // end if form has been submitted |
| 89 | + } |
88 | 90 | |
89 | 91 | return true; |
90 | 92 | } |
— | — | @@ -270,14 +272,14 @@ |
271 | 273 | $chosenGateway = $userInput['payment_method']; |
272 | 274 | |
273 | 275 | $wgOut->redirect( |
274 | | - $url[$chosenGateway] . '&amount=' . $userInput['amount'] . |
275 | | - '¤cy_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'] . '¤cy_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'] |
282 | 284 | ); |
283 | 285 | } |
284 | 286 | |
— | — | @@ -343,4 +345,4 @@ |
344 | 346 | return null; |
345 | 347 | } |
346 | 348 | |
347 | | -} |
\ No newline at end of file |
| 349 | +} |