Template:2012FR/Form-section/Processing/Default: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
No edit summary
changes Matt suggested
Line 8:
<script>
function redirectPayment (legacyPaymentMethod) {
// wrapper for redirectPayment2()new function
// using old method parameters
// until buttons can be updated
Line 14:
switch (legacyPaymentMethod) {
case 'cc':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('cc');
break;
 
Line 23:
case 'ew-pp-usd':
case 'ew-pp-eur':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('paypal');
break;
 
case 'dd':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('dd');
break;
 
case 'rtbt-id':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_ideal');
break;
 
case 'ew-yd':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('ew', 'ew_yandex');
break;
 
case 'rtbt-sf':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_sofortuberweisung');
break;
 
case 'ew-amazon':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('amazon');
break;
 
case 'obt-bp':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('obt', 'bpay');
break;
 
case 'ew-wm':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('ew', 'ew_webmoney');
break;
 
case 'cash-bl':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('cash', 'boleto');
break;
 
case 'rtbt-en':
redirectPayment2mw.donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_enets');
break;
}
Line 65:
}
 
functionmw.donationForm.redirectPaymentWithSubMethod redirectPayment2= function(paymentMethod, paymentSubMethod) {
 
// set up inputs
Line 98:
if( frequency !== 'monthly' ){
frequency = 'onetime';
params['recurring'] = 'false';
} else {
params['recurring'] = 'true';
Line 110 ⟶ 111:
}
 
mw.donationForm.addAnalytics();
if (validateForm(form)) {
Line 118 ⟶ 119:
}
 
function mw.donationForm.addAnalytics = function() {
// stuffs parameters into utm_source to make them available for analytics
 

Revision as of 12:28, 23 October 2013