Now what I want to do is show all the payment methods
a customer used before and let him to choose for the next transaction.
I have successfully fetch all the payment methods, however I find if a customer used use a PayPal
account before, I can not set a credit card as the default one by use
$updateResult = Braintree_PaymentMethod::update(
‘credit_card_token',
[
'options' => [
'makeDefault' => true
]
]
);
or
$updateResult = Braintree_Customer::update(
$customerId,
array(
'creditCard' => array(
'paymentMethodNonce' => $nonceFromTheClient,
'options' => array(
'makeDefault' => true
)
)
)
);
The drop-in
UI will still show the PayPal account first. Although I can see the this credit card is shift to the default on by query
$paymentMethod = Braintree_PaymentMethod::find('token’);
$paymentMethod -> default
So my question is can I set directly show credit card as the default
payment method in drop-in UI even the user use PayPal before?