Template:2012FR/Form-section/Processing/Default: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
stop using dotted payment method |
No edit summary |
||
Line 8: | Line 8: | ||
donationForm.redirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) { |
donationForm.redirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) { |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
// set up inputs |
// set up inputs |
||
form.currency_code.value = '</html>{{{currency|USD}}}<html>'; |
|||
if (typeof paymentSubMethod == 'undefined') { |
if (typeof paymentSubMethod == 'undefined') { |
||
paymentSubMethod = ''; |
paymentSubMethod = ''; |
||
⚫ | |||
⚫ | |||
⚫ | |||
var params = { |
|||
'uselang' : $("input[name='language']").val(), |
|||
'language' : $("input[name='language']").val(), |
|||
'currency_code' : $("input[name='currency_code']").val(), |
|||
'country' : $("input[name='country']").val(), |
|||
'paymentmethod' : paymentMethod |
|||
⚫ | |||
⚫ | |||
⚫ | |||
params['payment_submethod'] = paymentSubMethod; |
|||
⚫ | |||
// Testing for Adyen |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
} |
||
// |
// WorldPay override for cc |
||
if( paymentMethod === 'cc-wp' ) { |
if( paymentMethod === 'cc-wp' ) { |
||
paymentMethod = 'cc'; |
paymentMethod = 'cc'; |
||
form.payment_method.value = 'cc'; |
|||
form.gateway.value = 'worldpay'; |
|||
form.ffname.value = 'worldpay'; |
|||
⚫ | |||
// Adyen override for cc |
|||
⚫ | |||
⚫ | |||
form.payment_method.value = 'cc'; |
|||
⚫ | |||
form.ffname.value = 'adyen'; |
|||
} |
} |
||
Line 49: | Line 43: | ||
if( frequency !== 'monthly' ){ |
if( frequency !== 'monthly' ){ |
||
frequency = 'onetime'; |
frequency = 'onetime'; |
||
// commented out below as it breaks eNETS for some reason |
|||
// params['recurring'] = 'false'; |
|||
} else { |
} else { |
||
form.recurring.value = 'true'; |
|||
// the following causes tons of errors. Don't. |
|||
// paymentMethod = 'r' + paymentMethod; |
|||
} |
} |
||
⚫ | |||
form.payment_method.value = paymentMethod; |
form.payment_method.value = paymentMethod; |
||
⚫ | |||
donationForm.addAnalytics(); |
donationForm.addAnalytics(); |
||
var full_dotted_payment_method = paymentMethod; |
|||
if ( form.recurring.value == 'true' ) { |
|||
full_dotted_payment_method = 'r' + full_dotted_payment_method; |
|||
⚫ | |||
if ( paymentSubMethod ) { |
|||
full_dotted_payment_method = form.payment_method.value + '.' + paymentSubMethod; |
|||
} |
|||
⚫ | |||
if ( skipValidation || validateForm(form) ) { |
if ( skipValidation || validateForm(form) ) { |
||
form.method = " |
form.method = "GET"; |
||
form.submit(); |
form.submit(); |
||
} |
} |
||
Line 105: | Line 105: | ||
} |
} |
||
⚫ | |||
form.utm_campaign.value = getQuerystring( 'utm_campaign' ); |
form.utm_campaign.value = getQuerystring( 'utm_campaign' ); |
||
}; |
}; |
Revision as of 14:51, 5 April 2016