Template:2012FR/Form-section/Processing/Default: Difference between revisions
Content deleted Content added
stop using dotted payment method |
No edit summary |
||
Line 8:
donationForm.redirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) {
} ▼
var form = document.paypalcontribution; // we should really change this some day▼
var paymentsURL = 'https://payments.wikimedia.org/index.php/Special:GatewayFormChooser';▼
// set up inputs
if (typeof paymentSubMethod == 'undefined') {
paymentSubMethod = '';
▲ }
▲ var form = document.paypalcontribution; // we should really change this some day
▲ var paymentsURL = 'https://payments.wikimedia.org/index.php/Special:GatewayFormChooser';
};▼
▲ if( paymentSubMethod != '' ){
params['submethod'] = paymentSubMethod;▼
}▼
if( paymentMethod === 'adyen-cc' ) {▼
▲ paymentMethod = 'cc';
params.paymentmethod = 'cc';▼
params.gateway = 'adyen';▼
}
//
if( paymentMethod === 'cc-wp' ) {
paymentMethod = 'cc';
// Adyen override for cc
form.payment_method.value = 'cc';
form.ffname.value = 'adyen';
}
Line 49 ⟶ 43:
if( frequency !== 'monthly' ){
frequency = 'onetime';
} else {
}
▲ form.action = paymentsURL + '?' + $.param(params);
form.payment_method.value = paymentMethod;
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) ) {
form.method = "
form.submit();
}
Line 105:
}
▲ form.utm_source.value += '.' + form.payment_method.value;
form.utm_campaign.value = getQuerystring( 'utm_campaign' );
};
|