r57837 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57836‎ | r57837 | r57838 >
Date:23:54, 16 October 2009
Author:tomasz
Status:ok
Tags:
Comment:
Adding remote gateway opition. fix small initialization errors
Modified paths:
  • /trunk/extensions/DonationInterface/donate_interface/donate_interface.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/donate_interface/donate_interface.php
@@ -93,6 +93,8 @@
9494 //get payment method gateway value and name from each gateway and create menu of options
9595 $values = '';
9696 wfRunHooks('gwValue', array(&$values));
 97+
 98+ $gatewayMenu = '';
9799
98100 foreach($values as $current) {
99101 $gatewayMenu .= XML::option($current['display_name'], $current['form_value']);
@@ -105,6 +107,8 @@
106108 foreach($values as $key) {
107109 $currencies = $key['currencies'];
108110 }
 111+
 112+ $currencyMenu = '';
109113
110114 foreach($currencies as $value => $fullName) {
111115 $currencyMenu .= XML::option($fullName, $value);
@@ -185,11 +189,12 @@
186190 * matches the form value (also supplied by the gateway)
187191 */
188192 function redirectToProcessorPage($userInput, $url) {
189 - global $wgOut;
 193+ global $wgOut,$wgPaymentGatewayHost;
190194
191195 $chosenGateway = $userInput['payment_method'];
192196
193 - $wgOut->redirect($url[$chosenGateway].'&amount='.$userInput['amount'].'&currency_code='.$userInput['currency']);
 197+ $wgOut->redirect( $wgPaymentGatewayHost . $url[$chosenGateway]. '&amount='. $userInput['amount'].
 198+ '&currency_code='. $userInput['currency']);
194199 }
195200
196201 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r58217re-adding change from r57837 which got bumped from 57999tomasz21:08, 27 October 2009

Status & tagging log