Drop-in prevented from tokenizing: "Street address is required"
See original GitHub issueGeneral information
- SDK/Library version: braintree-web-drop-in 1.21.0
- Environment: Production
- Browser and OS: Firefox 72.0.2 on Linux
Issue description
Some users have been consistently experiencing the hostedFieldsFailedTokenizationError
error, even though their information was correct. We have not been able to reproduce this issue until today when I encountered it myself. I’ve double-checked my information and it is correct.
I can reproduce it by:
- Having no vaulted payment methods
- Clicking “Card”
- Entering my credit card information, including CVV and Canadian postal code.
- Calling
requestPaymentMethod()
, which fails tokenization with the errorhostedFieldsFailedTokenizationError
The same error is triggered with or without a space in the postal code: H0H0H0
or H0H 0H0
Possibly related to #486 ?
Here is the sanitized GraphQL request:
{
"clientSdkMetadata": {
"source": "client",
"integration": "dropin2",
"sessionId": "-snip-"
},
"query": "mutation TokenizeCreditCard($input: TokenizeCreditCardInput!) { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } } }",
"variables": {
"input": {
"creditCard": {
"number": "-snip-",
"expirationMonth": "-snip-",
"expirationYear": "-snip-",
"cvv": "-snip-",
"billingAddress": {
"postalCode": "-snip-"
}
},
"options": {
"validate": true
}
}
},
"operationName": "TokenizeCreditCard"
}
Here is the sanitized GraphQL response:
{
"extensions": {
"requestId": "-snip-"
},
"data": {
"tokenizeCreditCard": null
},
"errors": [
{
"message": "Street address is required",
"locations": [
{
"line": 1,
"column": 67
}
],
"path": [
"tokenizeCreditCard"
],
"extensions": {
"errorType": "user_error",
"errorClass": "VALIDATION",
"legacyCode": "81811",
"inputPath": [
"input",
"creditCard",
"billingAddress",
"streetAddress"
]
}
}
]
}
braintreegateway.com fraud management config:
braintree-web-drop-in config:
{
authorization: this.authorization,
container: this.$refs.braintree,
vaultManager: true,
dataCollector: { kount: true, paypal: true },
translations: {
hostedFieldsFailedTokenizationError: 'Please verify your information and try again.',
hostedFieldsFieldsInvalidError: 'Credit card validation failed. Please check your information and try again.',
},
card: {
overrides: {
styles: {
input: {
border: 'none',
},
'::placeholder': {
color: '#bcc8e2',
opacity: '1',
},
},
},
},
paypal: {
flow: 'vault',
buttonStyle: {
tagline: 'false',
size: 'medium',
},
},
paypalCredit: {
flow: 'vault',
buttonStyle: {
tagline: 'false',
size: 'medium',
},
},
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
dropin.js - Documentation - Braintree Open Source
dropin -model'); var EventEmitter = require('@braintree/event-emitter'); var assets ... See a full list of details in the [Hosted Fields client ...
Read more >AVS and CVV Response Codes - PayPal Developer
A system error prevented any verification of street address or postal code. AVS not applicable (A), AVS information was provided but this type...
Read more >Payment Method: Create | PHP
Street address must be less than or equal to 255 characters. Required to perform card verification when AVS rules are configured to require...
Read more >How to show "Google Pay" option in Braintree Dropin?
However, when trying to create the Dropin-UI by myself, ... I crete the dropin-request using the Tokenization key like this:
Read more >Encryption and Tokenization White Paper - Townsend Security
Many organizations will find both technologies helpful in different places in their it infrastructure. White Paper www.townsendsecurity.com. 724 Columbia Street ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @AlbinoDrought thanks for using Braintree Web Drop-in.
AVS street address rules trigger when a credit card is vaulted. By default, when you generate a client token with a customer id, Drop-in will attempt to vault the card upon tokenization on the client, which triggers the verification.
We’re looking to add this feature in an upcoming release, and will notify when it is ready.
In the meantime as a workaround, you can:
card.vault.vaultCard = false
If I disable the AVS option “Street Address not provided (I)”:
I can successfully tokenize the same unchanged drop-in form.