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

Drop-in prevented from tokenizing: "Street address is required" #597

Closed
AlbinoDrought opened this issue Feb 24, 2020 · 7 comments
Closed

Comments

@AlbinoDrought
Copy link

General 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:

  1. Having no vaulted payment methods
  2. Clicking "Card"
  3. Entering my credit card information, including CVV and Canadian postal code.
  4. Calling requestPaymentMethod(), which fails tokenization with the error hostedFieldsFailedTokenizationError

The same error is triggered with or without a space in the postal code: H0H0H0 or H0H 0H0

image

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:

image

image

image


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',
        },
      },
    }
@AlbinoDrought
Copy link
Author

If I disable the AVS option "Street Address not provided (I)":

image

I can successfully tokenize the same unchanged drop-in form.

@sshropshire
Copy link
Contributor

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:

  1. Prevent tokenizing automatically on the client. Edit the cardCreateOption and set card.vault.vaultCard = false
  2. Vault the card using the Braintree Server SDK and the nonce from the client along with the billing address you have collected from your customer

@kahnyoudiggit
Copy link

Hello -

We're running into a similar issue, however only some of our TokenizeCreditCard mutations have the validate: true option. Others have validate: false. These both happen for a DropIn that was created with a client token with a customer id - and when validate: false is used, the credit card is still vaulted.

Do you have any more information why validate: false and validate: true might be used?

@crookedneighbor
Copy link
Contributor

It shouldn't vault at all if validate: false is passed. validate is the key used to determine if it should vault the payment method when a customer id is used to generate the client token.

Please reach out to our support team with some timestamps for the requests you are making so we can investigate. https://help.braintreepayments.com/

@crookedneighbor
Copy link
Contributor

@kahnyoudiggit was the support team able to help you track down what was happening?

@kahnyoudiggit
Copy link

I believe so! Thanks for following up

@armandodlvr
Copy link
Contributor

closing for inactivity. If you continue to encounter errors, please contact Support

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

5 participants