Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for card surcharges #55

Open
judgej opened this issue Feb 3, 2017 · 2 comments
Open

Workaround for card surcharges #55

judgej opened this issue Feb 3, 2017 · 2 comments

Comments

@judgej
Copy link
Member

judgej commented Feb 3, 2017

The front end card tokenisation does not supply the card type. If the application is to add surcharges to specific cards, then it needs to know the card type before sending the payment request.

The card type will be supported in this gateway card tokenisation response soon, but until then, something like http://jquerycreditcardvalidator.com/ can provide a workaround by determining the card type on the front end and including it in the submitted form. This is unlikely to work for the iframe CC form, but would work for a custom CC form.

This ticket is just somewhere to log any examples of how this can be done.

@judgej
Copy link
Member Author

judgej commented Feb 4, 2017

Looking again at the docs, it seems that the card type is supplied in the API when a card identifier is created. This is an example response:

{
  "cardIdentifier" : "C6F92981-8C2D-457A-AA1E-16EBCD6D3AC6",
  "expiry" : "2015-06-16T10:46:23.693+01:00",
  "cardType" : "Visa"
}

It is just that the default JS onTokenise handler does not put the card type into the form to be submitted. Maybe just a custom handler is what is needed?

@judgej
Copy link
Member Author

judgej commented Aug 24, 2021

I think this is a non-issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant