Java – Braintree does not update the user’s preferred / default payment method
When a customer wants to select his payment method when creating a sales order, I see that it has changed in dropinui (small scale mark). I think it should become the default payment method, but this is not what happens on my server. I still get the first payment order
This is what I am doing:
String token = btGateway.customer().find(customerId).getDefaultPaymentMethod().getToken().toString();
Case:
>Customer a places an order with a credit card – all good > customer a places another order, this time adds a PayPal account, and the UI displays two options. The customer selects his preferred payment method – all good
On my server, I didn't get different payment tokens for credit card and paypal
to update:
According to Ryan's answer, I have a new question: how to obtain the token of the payment method selected from dropin (whether there is a delegated method that returns the payment method in IOS) Is there any way to determine the payment method selected by the user so that I can obtain a token for it?
Solution
When you select a payment method from dropin, the payment method will not be automatically set to the customer's default value If you want to set the default payment method, you can do this through the SDK
The card displayed in dropin is the most recently used card
If you have any other questions, please feel free to email support@braintreepayments.com.