Skip to content

Commit

Permalink
Merge pull request globalpayments#3 from apetrovici/feature/globalpay…
Browse files Browse the repository at this point in the history
…ments-woocommerce

TR-16: [WooCommerce]: add validation message for invalid card type
  • Loading branch information
ahumulescu authored Jun 16, 2021
2 parents 9e0c06c + 01b6bb3 commit fa04109
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assets/frontend/js/globalpayments-secure-payment-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,11 @@
this.showValidationError( 'card-cvv' );
break;
case 'MANDATORY_DATA_MISSING':
var n = reason.message.search( "card type" );
if ( n>=0 ) {
this.showValidationError( 'card-number' );
break;
}
var n = reason.message.search( "expiry_year" );
if ( n>=0 ) {
this.showValidationError( 'card-expiration' );
Expand Down

0 comments on commit fa04109

Please sign in to comment.