When a customer wants to choose his payment method while creating a sale order I see it changed in the DropInUI(small tick mark) and I assume that should become the default payment method but that is not what happens at my server, I still get the payment token for the first one.
Here's what I'm doing:
String token = btGateway.customer().find(customerId).getDefaultPaymentMethod().getToken().toString();
Case:
- Customer A places an order with his credit card - All Good
- Customer A places another order, this time adding a paypal account and the drop in ui shows two options, customer selects his preferred payment method - All good
At my server I don't get a different payment token for credit card and paypal.
UPDATE:
Based on the Ryan's answer, I have a new query: How do you get the token for the payment method selected from the dropin(is there a delegate method that returns the payment method in iOS). Is there a way to identify the payment method selected by user so I fetch the token for it?