Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/html/lightbox1.html |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | <input type="hidden" value="@amount" name="amount" /> |
110 | 110 | <input type="hidden" value="@country" name="country" id="country" /> |
111 | 111 | <input type="hidden" value="@expiration" name="expiration" /> |
112 | | - <input type="hidden" value="@currency_code" name="currency" /> |
| 112 | + <input type="hidden" value="@currency_code" name="currency_code" /> |
113 | 113 | <input type="hidden" value="@utm_source" name="utm_source"/> |
114 | 114 | <input type="hidden" value="@utm_medium" name="utm_medium"/> |
115 | 115 | <input type="hidden" value="@utm_campaign" name="utm_campaign"/> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/js/lightbox1.js |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | var sendData = { |
155 | 155 | 'action': 'donate', |
156 | 156 | 'gateway': 'payflowpro', |
157 | | - 'currency': 'USD', |
| 157 | + 'currency_code': 'USD', |
158 | 158 | 'amount': $( "input[name='amount']" ).val(), |
159 | 159 | 'fname': $( "input[name='fname']" ).val(), |
160 | 160 | 'lname': $( "input[name='lname']" ).val(), |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
236 | 236 | // Check amount is at least the minimum |
237 | 237 | var currency = 'USD'; // hard-coded for these forms and tests |
238 | | - $( "input[name='currency']" ).val( currency ); |
| 238 | + $( "input[name='currency_code']" ).val( currency ); |
239 | 239 | if ( typeof( wgCurrencyMinimums[currency] ) == 'undefined' ) { |
240 | 240 | wgCurrencyMinimums[currency] = 1; |
241 | 241 | } |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms |
___________________________________________________________________ |
Modified: svn:mergeinfo |
242 | 242 | Merged /trunk/extensions/DonationInterface/payflowpro_gateway/forms:r102307 |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway |
___________________________________________________________________ |
Modified: svn:mergeinfo |
243 | 243 | Merged /trunk/extensions/DonationInterface/payflowpro_gateway:r102307 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_forms/RapidHtml.php |
— | — | @@ -156,8 +156,8 @@ |
157 | 157 | |
158 | 158 | // handle the appeal and appeal header |
159 | 159 | // TODO: determine and set variables for the default templates |
160 | | - $appeal_title_name = $this->make_safe( $wgRequest->getText( 'appeal-title', 'jimmy-appeal-title' ) ); |
161 | | - $appeal_name = $this->make_safe( $wgRequest->getText( 'appeal', 'jimmy-appeal' ) ); |
| 160 | + $appeal_title_name = $this->make_safe( $wgRequest->getText( 'appeal-title', 'Appeal-default' ) ); |
| 161 | + $appeal_name = $this->make_safe( $wgRequest->getText( 'appeal', 'Appeal-default' ) ); |
162 | 162 | |
163 | 163 | $form = str_replace( "@appeal-title", $appeal_title_name, $form ); |
164 | 164 | $form = str_replace( "@appeal", $appeal_name, $form ); |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_forms |
___________________________________________________________________ |
Modified: svn:mergeinfo |
165 | 165 | Merged /trunk/extensions/DonationInterface/gateway_forms:r102308 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects2nd.html |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | <td> |
33 | 33 | <div id="appeal"> |
34 | 34 | <div id="appeal-content"> |
35 | | - <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2> |
36 | | - <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div> |
| 35 | + <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2> |
| 36 | + <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </td> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/lightbox1.html |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | <input type="hidden" value="@amount" name="amount" /> |
110 | 110 | <input type="hidden" value="@country" name="country" id="country" /> |
111 | 111 | <input type="hidden" value="@expiration" name="expiration" /> |
112 | | - <input type="hidden" value="@currency_code" name="currency" /> |
| 112 | + <input type="hidden" value="@currency_code" name="currency_code" /> |
113 | 113 | <input type="hidden" value="@utm_source" name="utm_source"/> |
114 | 114 | <input type="hidden" value="@utm_medium" name="utm_medium"/> |
115 | 115 | <input type="hidden" value="@utm_campaign" name="utm_campaign"/> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/bt/bt.html |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | <td> |
33 | 33 | <div id="appeal"> |
34 | 34 | <div id="appeal-content"> |
35 | | - <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2> |
36 | | - <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div> |
| 35 | + <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2> |
| 36 | + <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </td> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/bt/bt-CA.html |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | <td> |
33 | 33 | <div id="appeal"> |
34 | 34 | <div id="appeal-content"> |
35 | | - <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2> |
36 | | - <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div> |
| 35 | + <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2> |
| 36 | + <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </td> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/bt/bt-US.html |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | <td> |
33 | 33 | <div id="appeal"> |
34 | 34 | <div id="appeal-content"> |
35 | | - <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2> |
36 | | - <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div> |
| 35 | + <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2> |
| 36 | + <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </td> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects_2_3step.html |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | <td> |
33 | 33 | <div id="appeal"> |
34 | 34 | <div id="appeal-content"> |
35 | | - <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2> |
36 | | - <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div> |
| 35 | + <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2> |
| 36 | + <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </td> |
— | — | @@ -136,13 +136,19 @@ |
137 | 137 | </div> |
138 | 138 | </div> |
139 | 139 | <p id="informationsharing">%donate_interface-informationsharing|url%</p> |
140 | | - <!-- TODO: links inside the message or not? --> |
141 | | - <ul id="moreinfolinks"> |
142 | | - <li><a href="http://wikimediafoundation.org/wiki/Monthly_donations/en/US">%donate_interface-monthly-donation%</a></li><!-- TODO: localize the link --> |
143 | | - <li>%donate_interface-otherways-short|url%</li><!-- TODO: localize the link --> |
144 | | - <li><a href="http://wikimediafoundation.org/wiki/FAQ/en">%donate_interface-faqs%</a></li><!-- TODO: localize the link --> |
145 | | - <!--<li><a href="">%donate_interface-tax-info%</a></li>--><!-- TODO: localize the link --> |
146 | | - </ul> |
| 140 | + <table> |
| 141 | + <tr> |
| 142 | + <td> |
| 143 | + <ul id="moreinfolinks"> |
| 144 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Monthly_donations&language=@language&uselang=@language&country=@country">%donate_interface-monthly-donation%</a></li> |
| 145 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&language=@language&uselang=@language&country=@country">%donate_interface-otherways-short%</a></li> |
| 146 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a></li> |
| 147 | + <!--<li><a href="">%donate_interface-tax-info%</a></li>--><!-- TODO: localize the link --> |
| 148 | + </ul> |
| 149 | + </td> |
| 150 | + <td>@verisign_logo</td> |
| 151 | + </tr> |
| 152 | + </table> |
147 | 153 | </div> |
148 | 154 | </td> |
149 | 155 | </tr> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects_2_3step-CA.html |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | <td> |
33 | 33 | <div id="appeal"> |
34 | 34 | <div id="appeal-content"> |
35 | | - <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2> |
36 | | - <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div> |
| 35 | + <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2> |
| 36 | + <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </td> |
— | — | @@ -135,13 +135,19 @@ |
136 | 136 | </div> |
137 | 137 | </div> |
138 | 138 | <p id="informationsharing">%donate_interface-informationsharing|url%</p> |
139 | | - <!-- TODO: links inside the message or not? --> |
140 | | - <ul id="moreinfolinks"> |
141 | | - <li><a href="http://wikimediafoundation.org/wiki/Monthly_donations/en/US">%donate_interface-monthly-donation%</a></li><!-- TODO: localize the link --> |
142 | | - <li>%donate_interface-otherways-short|url%</li><!-- TODO: localize the link --> |
143 | | - <li><a href="http://wikimediafoundation.org/wiki/FAQ/en">%donate_interface-faqs%</a></li><!-- TODO: localize the link --> |
144 | | - <!--<li><a href="">%donate_interface-tax-info%</a></li>--><!-- TODO: localize the link --> |
145 | | - </ul> |
| 139 | + <table> |
| 140 | + <tr> |
| 141 | + <td> |
| 142 | + <ul id="moreinfolinks"> |
| 143 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Monthly_donations&language=@language&uselang=@language&country=@country">%donate_interface-monthly-donation%</a></li> |
| 144 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&language=@language&uselang=@language&country=@country">%donate_interface-otherways-short%</a></li> |
| 145 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a></li> |
| 146 | + <!--<li><a href="">%donate_interface-tax-info%</a></li>--><!-- TODO: localize the link --> |
| 147 | + </ul> |
| 148 | + </td> |
| 149 | + <td>@verisign_logo</td> |
| 150 | + </tr> |
| 151 | + </table> |
146 | 152 | </div> |
147 | 153 | </td> |
148 | 154 | </tr> |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.js |
— | — | @@ -11,11 +11,11 @@ |
12 | 12 | } |
13 | 13 | |
14 | 14 | var currencyField = document.getElementById( 'input_currency_code' ); |
15 | | - var currency = ''; |
| 15 | + var currency_code = ''; |
16 | 16 | if ( currencyField && currencyField.type == 'select-one' ) { // currency is a dropdown select |
17 | | - currency = $( 'select#input_currency_code option:selected' ).val(); |
| 17 | + currency_code = $( 'select#input_currency_code option:selected' ).val(); |
18 | 18 | } else { |
19 | | - currency = $( "input[name='currency_code']" ).val(); |
| 19 | + currency_code = $( "input[name='currency_code']" ).val(); |
20 | 20 | } |
21 | 21 | |
22 | 22 | var stateField = document.getElementById( 'state' ); |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | var sendData = { |
39 | 39 | 'action': 'donate', |
40 | 40 | 'gateway': 'globalcollect', |
41 | | - 'currency': currency, |
| 41 | + 'currency_code': currency_code, |
42 | 42 | 'amount': $( "input[name='amount']" ).val(), |
43 | 43 | 'fname': $( "input[name='fname']" ).val(), |
44 | 44 | 'lname': $( "input[name='lname']" ).val(), |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_common/donation.api.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | 'gateway' => $this->defineParam( true ), |
91 | 91 | 'test' => $this->defineParam( false ), |
92 | 92 | 'amount' => $this->defineParam( false ), |
93 | | - 'currency' => $this->defineParam( false ), |
| 93 | + 'currency_code' => $this->defineParam( false ), |
94 | 94 | 'fname' => $this->defineParam( false ), |
95 | 95 | 'mname' => $this->defineParam( false ), |
96 | 96 | 'lname' => $this->defineParam( false ), |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | $this->donationData = array( |
130 | 130 | 'gateway' => $this->gateway, |
131 | 131 | 'amount' => "35", |
132 | | - 'currency' => 'USD', |
| 132 | + 'currency_code' => 'USD', |
133 | 133 | 'fname' => 'Tester', |
134 | 134 | 'mname' => 'T.', |
135 | 135 | 'lname' => 'Testington', |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | 'gateway' => 'Which payment gateway to use - payflowpro, globalcollect, etc.', |
159 | 159 | 'test' => 'Set to true if you want to use bogus test data instead of supplying your own', |
160 | 160 | 'amount' => 'The amount donated', |
161 | | - 'currency' => 'Currency code', |
| 161 | + 'currency_code' => 'Currency code', |
162 | 162 | 'fname' => 'First name', |
163 | 163 | 'mname' => 'Middle name', |
164 | 164 | 'lname' => 'Last name', |
— | — | @@ -192,7 +192,7 @@ |
193 | 193 | |
194 | 194 | public function getExamples() { |
195 | 195 | return array( |
196 | | - 'api.php?action=donate&gateway=payflowpro&amount=2.00¤cy=USD', |
| 196 | + 'api.php?action=donate&gateway=payflowpro&amount=2.00¤cy_code=USD', |
197 | 197 | ); |
198 | 198 | } |
199 | 199 | |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_common/DonationData.php |
— | — | @@ -57,7 +57,9 @@ |
58 | 58 | 'card_type' => $wgRequest->getText( 'card_type' ), |
59 | 59 | 'expiration' => $wgRequest->getText( 'mos' ) . substr( $wgRequest->getText( 'year' ), 2, 2 ), |
60 | 60 | 'cvv' => $wgRequest->getText( 'cvv' ), |
61 | | - 'currency' => $wgRequest->getVal( 'currency_code' ), |
| 61 | + //Leave both of these here. |
| 62 | + 'currency' => $wgRequest->getVal( 'currency' ), |
| 63 | + 'currency_code' => $wgRequest->getVal( 'currency_code' ), |
62 | 64 | 'payment_method' => $wgRequest->getText( 'payment_method', 'cc' ), |
63 | 65 | 'payment_submethod' => $wgRequest->getText( 'payment_submethod', null ), // Used by GlobalCollect for payment types |
64 | 66 | 'issuer_id' => $wgRequest->getText( 'issuer_id' ), |
— | — | @@ -312,12 +314,27 @@ |
313 | 315 | */ |
314 | 316 | function setCurrencyCode() { |
315 | 317 | global $wgRequest; |
316 | | - if ( !$this->isSomething('currency') ){ |
317 | | - $code = $wgRequest->getVal('currency', null); |
318 | | - if (!is_null($code)){ |
319 | | - $this->setVal('currency', $code); |
320 | | - } |
| 318 | + |
| 319 | + //at this point, we can have either currency, or currency_code. |
| 320 | + //-->>currency_code has the authority!<<-- |
| 321 | + $currency = false; |
| 322 | + |
| 323 | + if ( $this->isSomething( 'currency_code' ) ) { |
| 324 | + $currency = $this->getVal( 'currency_code' ); |
| 325 | + } elseif ( $this->isSomething( 'currency' ) ) { |
| 326 | + $currency = $this->getVal( 'currency' ); |
321 | 327 | } |
| 328 | + |
| 329 | + if ( $currency ){ |
| 330 | + //set them both. |
| 331 | + $this->setVal( 'currency_code', $currency ); |
| 332 | + $this->setVal( 'currency', $currency ); |
| 333 | + } else { |
| 334 | + //we want these unset if neither of them was anything, so things |
| 335 | + //using this data know to use their own defaults. |
| 336 | + $this->expunge( 'currency_code' ); |
| 337 | + $this->expunge( 'currency' ); |
| 338 | + } |
322 | 339 | } |
323 | 340 | |
324 | 341 | /** |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_common/DonationData.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
325 | 342 | Merged /trunk/extensions/DonationInterface/gateway_common/DonationData.php:r102309 |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface |
___________________________________________________________________ |
Modified: svn:mergeinfo |
326 | 343 | Merged /trunk/extensions/DonationInterface:r102307-102309 |