Applies To
Product: NetSuite 2021.1
Scenario:
When adding credit card number in Reference Checkout, you may encounter a ‘Credit Card type is not supported’ error.
Solution
One possible cause of the error ‘Credit Card type is not supported’ when adding credit card information in Reference Checkout is that the name of the Payment Method listed in Setup > Accounting > Accounting Lists > Type: Payment Method is not the same as the default out-of-the-box supported names listed on the Utils.js for regular expressions:
// regex for credit card issuer validation
var cards_reg_ex = {
‘VISA’: /^4[0-9]{12}(?:[0-9]{3})?$/
, ‘Master Card’: /^5[1-5][0-9]{14}$/
, ‘American Express’: /^3[47][0-9]{13}$/
, ‘Discover’: /^6(?:011|5[0-9]{2})[0-9]{12}$/
, ‘Maestro’: /^(?:5[0678]\d\d|6304|6390|67\d\d)\d{8,15}$/
}