-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple Pay "Payment not completed" when region value is not recognized #1534
Comments
@lojel thanks for reporting. Are you using Stripe Gateway version 5.1.0? We have fixed some state matching related issues in our latest release.
Unfortunately it's not possible for us to automatically detect and replace these types of inputs, since variations like these can be infinite, customers can use abbreviated values like
I think this is a regular customer validation error. Much like if zip code is in invalid format. If we decide to log this error, it makes sense to apply the same logging for all customer validation errors. Although it might not be necessary if the issue is properly reported to the user (by closing the Apple Pay dialog automatically and displaying the specific error).
The "Payment Not Completed" error message is default to Apple. A more specific error message is displayed to the user behind the Apple Pay dialog. For me (iPhone X, iOS 14.4.2), the Apple Pay dialog is closed automatically right after an error happens. Perhaps that's not the case for all iOS versions and device types. As action steps, I think we need to make sure we can close the Apple Pay dialog automatically on all iOS devices, displaying the error message behind it. |
@ricardo thanks for the feedback. Here is further information:
|
Sounds good. Feel free to open a PR if you come up with any improvements.
Ok. I'll close this issue as this is not a problem with the plugin specifically. |
We have multiple online stores and and ship to multiple countries but for this case we will compare our US store to our Hong Kong store. The Apple Pay payments in the US never fail on the user side, however multiple users in Hong Kong reported that the Apple Pay payment failed repeatedly so we investigated and here is what we found:
1) PAYMENTS FAILS WHEN REGION VALUE IS NOT RECOGNIZED BY APPLE PAY
The Apple Pay form for billing/shipping in the US has a "state" field with a dropdown list that contains all the existing states. This ensure that Apple Pay always recognize the selected value.
However outside the US the state field is often replaced with "region" but this field is blank instead and needs to be manually filled by the customer.
A comparison the form in the US and in Hong Kong for instance:
Let's take Hong Kong as an example here to illustrate the issue cause this is where we debugged this. However it could be any other country or territory with a blank "Region" field in the Apple Pay form.
In Hong Kong there are 3 official regions: Hong Kong Island, Kowloon, and New Territories. When the region is filled with one of these value then the payment goes through however the issue happen cause in reality most people type these regions differently. It’s very common that people use "KL" instead of "Kowloon" or "HK" instead of "Hong Kong Island" which result in a payment failure cause the region doesn't match the one recognized by Apple Pay.
2) PAYMENT FAILURES FOR THE REASON DESCRIBED ABOVE ARE NOT LOGGED
Even more concerning, the payment failures for this specific issue are not logged by the plugin so it's very difficult to debug it or even acknowledge that the problem even exist. It is possible that at the moment multiple Woocommerce stores shipping outside the US have Apple Pay payment failures on a regular basis.
3) THE USER IS NOT INFORMED WHY THE PAYMENT IS FAILING
On the user-side, the Apple Pay flyout window just displays “Payment Not Completed” (see attached below) with no further information on the user level and no record of failed payment in Woocommerce. It's like the payment attempt never happened for Woocommerce.
4) HOW WE TEMPORARILY FIXED THAT
We have temporarily fixed that on our side by programmatically fixing the region name when it's incorrectly entered (e.g. "KL" is replace and fixe with the recognized regions "Kowloon") and default the region name to "New Territories" when the value entered is not recognized in our script. However this only fixes the issue in Hong Kong for us but every time we expend our shipping to a new country with the same issue we will need to deploy a similar fix.
5) THE NEXT STEPS FOR US
Display meaningful error messages to the customer for Apple Pay instead of “Payment not completed”. This way the customer himself will be able to take corrective actions and make his payment.
Notify our development team when Apple Pay payment failures occur so we can take preventive actions.
📝 That being said some stores might be loosing sales at the moment because of this issue so I think fixing this on the plugin level would be a major improvement for stores using Apple Pay but also for the users.
Please let us know what you can do. Thanks
The text was updated successfully, but these errors were encountered: