`options.preselectVaultedPaymentMethod` does not preselect the active vaulted payment method
See original GitHub issueGeneral 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
issue (note the text we add from the user’s active payment method conflicting with the selected card.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (7 by maintainers)
Top GitHub Comments
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.We’re also seeing this. Any update, Braintree?