Open timur27 opened 1 week ago
This issue is the result of this fix for 3DS subscriptions missing payment methods and failing renewals as a result. Previously, tokens were only added when the payment_method_id
was present in the request, which is only the case when saving a payment method. This meant that 3DS payment methods were not stored in subscriptions. The solution was to get the payment_method_id
from the intent. This means that now the payment_method_id
is always present and 3DS tokens are saved again when paying with a saved 3DS card.
I think rather than just checking for the presence of a payment method id here, we need to check whether the payment method is intended to be saved, indicated either by the save payment method checkbox or when the order is a subscription order.
Describe the bug
After using a saved 3DS card during checkout, it gets re-saved on the store.
To Reproduce
Additional context
This behavior could potentially be related to our recent fixes for saving 3DS cards in https://github.com/Automattic/woocommerce-payments/commit/0635be28ae20d5c5743b1f127ce1c66cc3a524de.