question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`options.preselectVaultedPaymentMethod` does not preselect the active vaulted payment method

See original GitHub issue

General information

  • SDK/Library version: 1.23.0
  • Environment: sandbox and production
  • Browser and OS: any

Issue description

When initializing with braintree.dropin.create with a token connected to a customer ID the preselectVaultedPaymentMethod is true by default, but a different card shows at the top of the UI and is selected than the users active payment method.

The below is what I would expect and to me this seems like an issue… or I’m doing something wrong. Would someone clarify if this is expected?

Expected: The users active payment method should show selected at the top of the UI list of payment methods.

Actual: A random payment method is selected and shown at the top of the list of payment methods in the UI.

payload from gateway.paymentMethod.find(token) https://developers.braintreepayments.com/reference/request/payment-method/find/node Screen Shot 2020-08-22 at 2 13 25 PM

issue (note the text we add from the user’s active payment method conflicting with the selected card. Screen Shot 2020-08-22 at 2 13 51 PM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
crookedneighborcommented, Nov 16, 2020

I think allowing it to be configured could still be valuable, so I opened a PR for it: https://github.com/braintree/braintree-web-drop-in/pull/675

With this PR, if you configure it to not show the default payment method first, then the API will decide, which will typically be the latest payment method added to the customer. I say typically because the order is not guaranteed.

I think for your use case in particular, I’d go ahead and just update the default payment method on your customer when your system adjusts the active payment method in your backend.

1reaction
imkanecommented, Nov 7, 2020

We’re also seeing this. Any update, Braintree?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vaulting a Payment Method | Braintree GraphQL API
Once vaulted, a payment method can be reused as many times as possible without your customer needing to re-enter or authenticate their payment...
Read more >
Braintree Payment Settings - knowledge base - CV Connect
NOTE - When Braintree Payments is active, you can choose to use Braintree ... during checkout, toggle ON Preselect Vaulted Payment Method.
Read more >
Default payment method - WordPress.org
Hi, WooCommerce seems to select the first payment method by default. ... however, I'm wondering if it's possible to not preselect a payment...
Read more >
Dropin - Documentation - Braintree Open Source
Removes the currently selected payment method and returns the customer to the payment options view. Does not remove vaulted payment methods. Source:.
Read more >
Online Purchase Payment Methods - Venmo
What funding source is used to pay for purchases with ... sometimes payment methods that are active on a user's account may not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found