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

Can I allow for amex cvv validation required length 3 #686

Open
ArtjomsFomins opened this issue Jul 3, 2023 · 1 comment
Open

Can I allow for amex cvv validation required length 3 #686

ArtjomsFomins opened this issue Jul 3, 2023 · 1 comment

Comments

@ArtjomsFomins
Copy link

ArtjomsFomins commented Jul 3, 2023

  • SDK version: ^3.85.3
  • Browser and OS Version: Chrome 111.0.5563.146 (Official Build) (64-bit) on Ubuntu 20.04.6 LTS
  • Envrioment: Local

Is it possible that for amex cvv rules, I could set required length 3 and 4, so it would possible to pass validation with 3 or 4 length
I tried with maxlength: 3 but it didn't help

Errors that I have if type cvv length 3
state.cards[0]

code: {name: "CID",  size:4},
niceType : "American Express"
supported : true
type: "american-express"

Braintree error:

code: "HOSTED_FIELDS_FIELDS_INVALID"
deitals: {
 invalidFieldKeys: ['cvv']
},
message: "Some payment input fields are invalid. Cannot tokenize invalid card fields.",
name : "BraintreeError",
type: "CUSTOMER"
@hollabaq86
Copy link

👋 @ArtjomsFomins thanks for reaching out. We use set values for CVV length based on the derived card type, for Amex the default length is 4.

You mentioned trying setting the maxLength to 3, have you tried setting minLength to 3 as well?

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

2 participants