Home › Forums › Plugins › Offline Credit Card Processing › Support › [Resolved] Credit Card Verification Fails › Reply To: Credit Card Verification Fails
November 19, 2011 at 8:20 am
#8812
golewis
Participant
I modified the function that validates card numbers to include an exception for AMEX 15-digit numbers. This is admittedly a hack, but here it is:
function wpsc_oc_validation_is_valid_card_number( $value ) {
if( (is_numeric( $value ) && strlen( $value ) == 16) || ( (is_numeric( $value ) && strlen( $value ) == 15) && ( ( substr( $value, 0, 2 ) == '34' ) || ( substr( $value, 0, 2 ) == '37' ) ) ) )
return true;
}