Use the substr command to select the last 4 digits:
If you'd like to store this in the database, add a hidden field to your form, and add something like this in the "on Submit (before email)" code box:
This example assumes the creditcard is entered into a field named "creditcard", and the hidden field is named "lastfour".
/Fredrik
$lastFour = substr($ccn, -4);
If you'd like to store this in the database, add a hidden field to your form, and add something like this in the "on Submit (before email)" code box:
JRequest::setVar('lastfour', substr(JRequest::getVar('creditcard', '', 'post'), -4);
This example assumes the creditcard is entered into a field named "creditcard", and the hidden field is named "lastfour".
/Fredrik
This topic is locked and no more replies can be posted.