Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
171 stars 69 forks source link

Hong Kong addresses always fail validation via Apple Pay #9123

Open zoupkat opened 1 month ago

zoupkat commented 1 month ago

Describe the bug

Apple Pay currently sends us an address in a format we don't expect; the Hong Kong Region (e.g. "New Territories") is put into the postalCode property of the paymentRequest object, instead of the region like we would expect.

This makes it so that when you try to pay via Apple Pay with a Hong Kong address the payment always fails with a very cryptic error message.

This means customers are unable to pay merchants through Apple Pay when using a Hong Kong address.

_FYI: This was an issue that was also present in WC Stripe but they managed to fix it/close it: https://github.com/woocommerce/woocommerce-gateway-stripe/issues/1630

This was also discussed in a Slack thread internally (access only available to Automattic agents) before creating the report here._

To Reproduce

Reproduction and testing steps available in https://github.com/woocommerce/woocommerce-gateway-stripe/pull/1593

Expected behavior

Address validation succeeds for valid addresses and payments can be processed.

AashikP commented 1 month ago

User report in 8488611-zen

pierorocca commented 1 month ago

I've pass this along to our contacts at Apple Pay. There's definitely a challenge if a wallet provide maps addresses differently than what's expected by the core platform and by WooPayments. We'll have to look at a temporary workaround if Apple isn't able to place Region into Region.

tamhas commented 1 month ago

Okay we, and every other business in HK are using WC Stripe now then ... not really everyone else is using Shopify 😂 Hope you can fix though, so my few HK clients at least can enjoy WooCommerce for their online bookings and ordering. Thanks

tamhas commented 1 month ago

Honestly, surprised you wouldn't just look how at WC Stripe has done it and implement that! Wordpress is open source you know