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