Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php |
— | — | @@ -89,6 +89,6 @@ |
90 | 90 | global $wgScript; |
91 | 91 | |
92 | 92 | $url['payflow'] = 'https://payments.wikimedia.org/index.php' . '?title=Special:PayflowProGateway'; |
93 | | - |
| 93 | + |
94 | 94 | return true; |
95 | 95 | } |
Index: trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | //$url['paypal'] = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=" . urlencode( $wgPaypalEmail ) . "&lc=US&no_note=1&no_shipping=1&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"; |
84 | 84 | |
85 | 85 | // specifically for Wikimedia, goes to processor page |
86 | | - $url['paypal'] = 'http://wikimediafoundation.org/wiki/Special:ContributionTracking/?'; |
| 86 | + $url['paypal'] = 'http://wikimediafoundation.org/wiki/Special:ContributionTracking?'; |
87 | 87 | |
88 | 88 | return true; |
89 | 89 | } |
Index: trunk/extensions/DonationInterface/donate_interface/donate_interface.php |
— | — | @@ -66,7 +66,6 @@ |
67 | 67 | // add JavaScript validation to <head> |
68 | 68 | $wgOut->addScriptFile( $wgScriptPath . '/extensions/DonationInterface/donate_interface/donate_interface_validate_donation.js' ); |
69 | 69 | |
70 | | - |
71 | 70 | //display form to gather data from user |
72 | 71 | $output = fnDonateCreateOutput(); |
73 | 72 | |
— | — | @@ -166,7 +165,7 @@ |
167 | 166 | if ( $code == $default_currency ) { |
168 | 167 | $selected = ' selected="selected"'; |
169 | 168 | } |
170 | | - $currency_options .= '<option value="' . $code . '"' . $selected . '>' . $name . '</option>'; |
| 169 | + $currency_options .= '<option value="' . $code . '"' . $selected . '>' . wfMsg( 'donate_interface-' . $code ) . '</option>'; |
171 | 170 | } |
172 | 171 | |
173 | 172 | $currencyFields = Xml::openElement( 'select', array( 'name' => 'currency_code', 'id' => "input_currency_code" )) . |
— | — | @@ -193,8 +192,7 @@ |
194 | 193 | |
195 | 194 | $output .= Xml::fieldset(wfMsg( 'donate_interface-comment-title' ), $publicComment, array( 'class' => 'mw-donation-public-comment')); |
196 | 195 | |
197 | | - $output .= Xml::hidden( 'process', '_yes_' ) . |
198 | | - Xml::submitButton(wfMsg( 'donate_interface-submit-button' )); |
| 196 | + $output .= Xml::submitButton(wfMsg( 'donate_interface-submit-button' )); |
199 | 197 | |
200 | 198 | $output .= Xml::closeElement( 'form' ); |
201 | 199 | |
— | — | @@ -321,9 +319,9 @@ |
322 | 320 | 'comment-option' => '', |
323 | 321 | 'email' => '', |
324 | 322 | ); |
325 | | - |
| 323 | + |
326 | 324 | // if form has been submitted, assign data and redirect user to chosen payment gateway |
327 | | - if ( isset($_POST['process']) && $_POST['process'] == "_yes_" ) { |
| 325 | + if ( $wgRequest->wasPosted() ) { |
328 | 326 | //find out which amount option was chosen for amount, redefined buttons or text box |
329 | 327 | if ( isset($_POST['amount']) && preg_match('/^\d+(\.(\d+)?)?$/', $wgRequest->getText('amount')) ) { |
330 | 328 | $amount = number_format( $wgRequest->getText('amount'), 2 ); |
— | — | @@ -345,8 +343,8 @@ |
346 | 344 | 'utm_campaign' => $wgRequest->getText( 'utm_campaign', '' ), |
347 | 345 | 'language' => $wgRequest->getText( 'language', 'en' ), |
348 | 346 | 'comment' => $wgRequest->getText( 'comment', '' ), |
349 | | - 'comment-option' => $wgRequest->getText( 'comment-option', '1' ), |
350 | | - 'email' => $wgRequest->getText( 'opt', '1' ), |
| 347 | + 'comment-option' => $wgRequest->getText( 'comment-option', '0' ), |
| 348 | + 'email' => $wgRequest->getText( 'opt', '0' ), |
351 | 349 | ); |
352 | 350 | |
353 | 351 | // ask payment processor extensions for their URL/page title |
— | — | @@ -366,3 +364,4 @@ |
367 | 365 | return true; |
368 | 366 | } |
369 | 367 | |
| 368 | + |
Index: trunk/extensions/DonationInterface/donate_interface/donate_interface.i18n.php |
— | — | @@ -33,6 +33,23 @@ |
34 | 34 | 'donate_interface-small-amount-value' => '30', |
35 | 35 | 'donate_interface-amount-error' => '**Please enter a valid amount**', |
36 | 36 | 'donate_interface-processing-error' => 'There has been an error processing your request. No processor are available.', |
| 37 | + 'donate_interface-GBP' => 'GBP: British Pound', |
| 38 | + 'donate_interface-EUR' => 'EUR: Euro', |
| 39 | + 'donate_interface-USD' => 'USD: U.S. Dollar', |
| 40 | + 'donate_interface-AUD' => 'AUD: Australian Dollar', |
| 41 | + 'donate_interface-CAD' => 'CAD: Canadian Dollar', |
| 42 | + 'donate_interface-CHF' => 'CHF: Swiss Franc', |
| 43 | + 'donate_interface-CZK' => 'CZK: Czech Koruna', |
| 44 | + 'donate_interface-DKK' => 'DKK: Danish Krone', |
| 45 | + 'donate_interface-HKD' => 'HKD: Hong Kong Dollar', |
| 46 | + 'donate_interface-HUF' => 'HUF: Hungarian Forint', |
| 47 | + 'donate_interface-JPY' => 'JPY: Japanese Yen', |
| 48 | + 'donate_interface-NZD' => 'NZD: New Zealand Dollar', |
| 49 | + 'donate_interface-NOK' => 'NOK: Norwegian Krone', |
| 50 | + 'donate_interface-PLN' => 'PLN: Polish Zloty', |
| 51 | + 'donate_interface-SGD' => 'SGD: Singapore Dollar', |
| 52 | + 'donate_interface-SEK' => 'SEK: Swedish Krona', |
| 53 | + 'donate_interface-ILS' => 'ILS: Isreali Shekel', |
37 | 54 | ); |
38 | 55 | |
39 | 56 | /** Message documentation (Message documentation) |