Closed ricardo closed 1 month ago
Hey team! Please add your planning poker estimate with Zenhub @rafaelzaleski @ricardo
Just noting that as part of this issue, let's also remove the now unnecessary limitation on Apple Pay registration in test mode. This way it's easier to test Apple Pay going forward.
Describe the bug
When clicking the Apple Pay button with the
_wcpay_feature_stripe_ece
option set to1
, the Apple Pay dialog closes and an error is thrown in the console:This is because we need to register the domain first with this new endpoint: https://api.stripe.com/v1/payment_method_domains (src).
We might want to consider setting
applePay
toauto
instead ofalways
when rendering the button to make sure it's not available in case the domain verification has failed or the button shouldn't be displayed for some reason.To fix this, we can update or add a new endpoint to the server and trigger domain registrations when WooPayments gets updated: https://github.com/Automattic/woocommerce-payments/blob/ff072f5f1e28be9c7667d1c484d62f93b629d2c7/includes/class-wc-payments-apple-pay-registration.php#L83
To Reproduce