Then I have this main error to get my website through to taking payments.
Ive been recreating the error and using Chrome Inspect. I dont really know what Im doing or whether this is useful but this is what comes back
Exception: ReferenceError: zcJS is not defined at collectsCardDataOnsite (https://www.xxx.co.uk/checkout_payment:63:2) at check_form (https://www.xxx.co.uk/checkout_payment:716:11) at HTMLFormElement.<anonymous> (https://www.xxx.co.uk/checkout_payment:92:32) at HTMLFormElement.dispatch (https://ajax.googleapis.com/ajax/lib...min.js:2:43090) at HTMLFormElement.v.handle (https://ajax.googleapis.com/ajax/lib...min.js:2:41074)
this: Window
paymentValue: "paypalwpp"
DOMException: Failed to execute 'querySelectorAll' on 'Element': '\' is not a valid selector.
It doesnt seem to like ... If (formPassed == false)
Code:
function collectsCardDataOnsite(paymentValue)
{
zcJS.ajax({
url: "ajax.php?act=ajaxPayment&method=doesCollectsCardDataOnsite",
data: {paymentValue: paymentValue}
}).done(function( response ) {
if (response.data == true) {
var str = $('form[name="checkout_payment"]').serializeArray();
zcJS.ajax({
url: "ajax.php?act=ajaxPayment&method=prepareConfirmation",
data: str
}).done(function( response ) {
$('#checkoutPayment').hide();
$('#navBreadCrumb').html(response.breadCrumbHtml);
$('#checkoutPayment').before(response.confirmationHtml);
$(document).attr('title', response.pageTitle);
});
} else {
$('form[name="checkout_payment"]')[0].submit();
}
});
return false;
}
$(document).ready(function(){
$('form[name="checkout_payment"]').submit(function() {
$('.paymentSubmit').attr('disabled', true);
formPassed = check_form();
if (formPassed == false) {
$('.paymentSubmit').attr('disabled', false);
}
return formPassed;
});
});
Bookmarks