I think you need to get with the developer that created your payment module. It sounds as if there may be hardcoded values that are causing problems.
I think you need to get with the developer that created your payment module. It sounds as if there may be hardcoded values that are causing problems.
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
He don't work any more![]()
Any way I try to find some solution to put java script on page checkout_payment.php Step 2 of 3 to disable master card, but i'm not sure where i need to put this script.
Maybe someone know some tutorials about payment scripts??
In short time we also need to change our payment system, and with new system we will try to make with latest version of zen-cart.
Thanks!
We are using:
Zen Cart 1.3.0.1
Database Patch Level: 1.3.0.1
Who is your merchant account provider?
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
I found this function
$ccnValidation = "var nrcField = document.checkout_payment.number.value;\n" .
"if ( nrcField.length < " . CC_NUMBER_MIN_LENGTH . ") {\n" .
" error_message = error_message + 'Invalid credit card number.\\n';\n" .
" error = 1;\n" .
"}\n";
this check only for lenght of min. number, can this check if is there master card first number :5 ?
here is complete function:
function javascript_validation()
{
$ccvValidation = "var ccvField = document.checkout_payment.cvc.value;\n" .
"if ( ccvField.length < " . CC_CVV_MIN_LENGTH . ") {\n" .
" error_message = error_message + 'Invalid CCV entered.\\n';\n" .
" error = 1;\n" .
"}\n";
$zipValidation = "var zipField = document.checkout_payment.zip.value;\n" .
"if ( zipField.length < 4) {\n" .
" error_message = error_message + 'Invalid ZIP code entered.\\n';\n" .
" error = 1;\n" .
"}\n";
$addValidation = "var addField = document.checkout_payment.address.value;\n" .
"if ( addField.length < 3) {\n" .
" error_message = error_message + 'Invalid address entered.\\n';\n" .
" error = 1;\n" .
"}\n";
$nameValidation = "var fnameField = document.checkout_payment.firstname.value;\n" .
"var lnameField = document.checkout_payment.lastname.value;\n" .
"var tName = fnameField + ' ' + lnameField;\n" .
"if ( tName.length < " . CC_OWNER_MIN_LENGTH . " ) {\n" .
" error_message = error_message + 'Input name length to low!\\n';\n" .
" error = 1;\n" .
"}\n";
$ccnValidation = "var nrcField = document.checkout_payment.number.value;\n" .
"if ( nrcField.length < " . CC_NUMBER_MIN_LENGTH . ") {\n" .
" error_message = error_message + 'Invalid credit card number.\\n';\n" .
" error = 1;\n" .
"}\n";
$valChecks = $nameValidation . $addValidation . $zipValidation . $ccvValidation . $ccnValidation;
return($valChecks);
}
tnx to all, i found answer how to solve my problem,
here is script if someone have the same problem...
------------------------------
$ccnValidation = "var nrcField = document.checkout_payment.number.value;\n" .
"if ( nrcField.substring(0,1) != \"5\");{\n" .
" error_message = error_message + 'Sorry you use master card, please use one other credit card .\\n';\n" .
" error = 1;\n" .
"}\n";
Thanks for posting the solution you found.
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.