Thank you for your feedback
When your shoppers submit their payment details at checkout, Turbify stores the full credit card number, but only displays the last four digits. This is a standard practice in ecommerce, and is done to comply with industry security requirements. Most stores use our standard credit card validation and won’t be affected by recent changes.
However, those stores that use custom validation at checkout need to be careful--some implementations may interrupt the checkout process in a manner that interferes with payment detail storage. For example, some stores may see a checkout error:
There was an issue validating your payment information, please reenter your credit card number.
This error is caused by either issues with custom validation or the credit card field being left blank during checkout.<script type="text/javascript">
window.onload = function() {
if (typeof YSBCheckout != "undefined" ){
YSBCheckout.checkoutPreHook = function(frmObj) {
// perform validation here
// return true / false
}
}
}
</script>
Exaclty how do you use the prehook? In this example, we’re collecting a shoppers’ driver's license numbers via a custom field we’ve added, customFieldDS.customfield_ROW1_value. The prehook checks this field to see if it is populated, continuing if there is a value and returning an error if it’s empty.
<script type="text/javascript">
window.onload = function() {
if (typeof YSBCheckout != "undefined" ){
YSBCheckout.checkoutPreHook = function(frmObj) {
if (frmObj["customFieldDS.customfield_ROW1_value"].value === "") {
alert("Please supply your driver's license number.");
return false;
} else {
return true;
}
}
}
}
</script>
Please note that the checkoutPreHook function is only present on the checkout step that collects shoppers’ payment information.