Search code examples
javascriptevent-handlingpayment-gatewayrecurly

Recurly js Card Element Event handling Script Required


Recurly js Card Element event handling

User should be able to continue entering credit card, without needing to click to MM/YY, etc. Continuing to type should move to next relevant box through js. Because tried with external script is not working for reculry element.


Solution

  • This gets complicated when you consider that not all credit cards have the same number of digits in the card number. American Express, for example, is of the form: XXXX-XXXXXX-XXXXX (15 digits) whereas a Visa/MasterCard is of the form: XXXX-XXXX-XXXX-XXXX (16 digits)