-
Notifications
You must be signed in to change notification settings - Fork 206
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
Invalid shipping address for UK and Apple Pay #1198
Comments
There is an additional note on apple developer site with mode details on postal code truncated:
|
User in 2911575-zen reported that the "invalid shipping address" error message Also, they have reported no errors at all when shipping zones are not implemented although it is not entirely clear to me what exactly does that mean and I'm asking for clarification. |
The fix for this is probably in the core at the zip code to zone matching logic. It should properly recognize and treat partial UK postal codes. |
Thank you for looking in to this guys (I'm the customer who reported the issue) I received the support email. It might also be worth considering if the the postcode issue is also effecting Chrome Payment Requested buttons. I haven't personally set up Chrome/Google Pay to test. Do you know a work around in the interim? Thx |
I did some experiments with Chrome Payment Request buttons and full postal code was passed causing no issues. So this is Apple Pay only thing. |
Do you know if this is fixed in the 4.2.0 update ?? Thanks :) |
Another example, using Stripe 4.5.0 - confirmed as Vasily mentioned, this is an Apple Pay thing https://wordpress.org/support/topic/apple-pay-wildcard-shipping-postcodes/#post-13191932 |
I am having trouble with a very similar issue. Apple Pay was working on my site until I integrated a couple of plugins, DPD for WooCommerce & Flexible Shipping. Both are required so that we can create shipping labels directly within the Wordpress dashboard for DPD consignments. However now I have this installed, I have had to disable standard flat rate & free shipping rates that are built into WooCommerce and replace them with the Flexible Shipping opiton. Within the flexible shipping options I can create a number of shipping options that are directly linked to a service offered by DPD, eg before 12pm, Saturday etc. This all works fine but the issue arises when I try to use this in conjunction with Apple Pay, I get the dreaded 'Shipping Address Invalid'. As soon as I disable Flexible Shipping as the shipping method and reenable the standard options all is fine again. I don't believe the postcode wildcards is causing any further issues as I have removed them and tested and I get the same issue with flexible shipping. If reverted to standard shipping and still include shipping wildcards then it works fine. So to conclude I can either have Apple Pay live and working but then we will need to create a DPD consignment manually each time an order is placed or turn off Apple Pay and have the easier shipping methods integrated fully. ps Google Pay works with these integration plug-ins with no issue at all. |
Just wanted to add that this also happens with Canadian addresses and Apple Pay that also use the combination of letters and numbers in the addresses |
I believe this is another instance of the same bug. I created two shipping zones for the UK: one with postcodes and wildcards and the second one for the rest:
When I use Apple Pay, it doesn't match the first zone even though it should:
If I cancel it and go to the cart page, this how the postcode is truncated:
However, if I fill in the postcode normally, it shows the correct rate:
@vbelolapotkov can you please confirm that it's related to the same bug? |
Hi there @thedermacompany, My wildcard setup can be seen on this screenshot: https://d.pr/i/IvI7Gr Even if I add the postcode like So the issue might be with the combination of letters and numbers in the postcode in general. |
What I am referring to is when you open up the Zone 1 wildcards.
I believe you may have set these up incorrectly.
Are you looking for a list that include mainland UK postcode for Zone 1?
Kind regards,
Asa / Head of Operations
[email protected] / 01582 808829
www.thedermacompany.co.uk
… On 21 Dec 2020, at 15:49, treibalen ***@***.***> wrote:
Hi there @thedermacompany <https://github.com/thedermacompany>,
My wildcard setup can be seen on this screenshot: https://d.pr/i/IvI7Gr <https://d.pr/i/IvI7Gr>
Even if I add the postcode like GL40TY to the zone, it doesn't match with Apple Pay, but works with calculations on cart/checkout page.
So the issue might be with the combination of letters and numbers in the postcode in general.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1198 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDCL6DXLBSSSVP3DXKWYIDSV5VBNANCNFSM4NAWWHEQ>.
|
3590824-zen |
I wasn't able to reproduce this issue - It works fine for me when I use a UK postcode with a wilcard flat rate shipping method. Apple Pay selects the right shipping method and the payment goes through. Apple Pay continues to provide a partial postcode (first three digits) to Can someone on this thread please confirm if the issue isn't happening anymore? Then we can close this. |
The issue still exists for some UK postcodes, specifically when trying SK11* today using latest released versions of Woocommerce and Stripe gateway. As per earlier examples Apple Pay returns Shipping Address Invalid |
@graftonhosting, thanks for checking! I had tested with a 2 and a 3 character wildcard postcode, that's why it worked for me. Unfortunately, Apple Pay only exposes the first 3 characters for WooCommerce to calculate the shipping options. This is due to privacy reasons. Other browsers don't do that. This seems like an ongoing discussion at W3C. I added a comment there explaining our use case. If I understood correctly, they have an ongoing PR to allow merchants to negotiate the redacted fields. For now, I don't have any ideas on how to fix this, but for those having problems, I'd suggest having a maximum of 3 characters wildcard postcodes. |
Thanks for looking at this Ricardo For most of the UK it would be sound to use 2-3 character wildcards. The issue arises in areas like the Scottish highlands where couriers charge different rates across the first 4 digits of a post code. A made up example would be say: AB41* = The courier charges normal UK mainland shipping at £5 Again the above is a made up example, but If we to choose a flat rate for just AB* or AB4* I could either disadvantage the a customer as the charge is too high, or be under charging the shipping for another customer. Anyway it might be worth putting that differentiation forward? |
You need to enter these postcodes as follows:
UK Mainland
AB6...AB43
AB46…AB49
UK Offshore
AB37...AB38
AB44...AB45
AB51...AB56
Kind regards,
Asa / Head of Operations
[email protected] / 01582 808829
www.thedermacompany.co.uk
… On 11 Feb 2021, at 09:37, jarman2020 ***@***.***> wrote:
Thanks for looking at this Ricardo
For most of the UK it would be sound to use 2-3 character wildcards. The issue arises in areas like the Scottish highlands where couriers charge different rates across the first 4 digits of a post code. A made up example would be say:
AB41* = The courier charges normal UK mainland shipping at £5
AB47* = The courier charges a "Scottish highlands" rate of £20
Again the above is a made up example, but If we to choose a flat rate for just AB* or AB4* I could either disadvantage the a customer as the charge is too high, or be under charging the shipping for another customer.
Anyway it might be worth putting that differentiation forward?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1198 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDCL6CF7UL67TKALONTSQ3S6OQOTANCNFSM4NAWWHEQ>.
|
Thanks for this Asa.. I will look at setting my zones up like that. Unfortunately, I can't test if that works with Apple Pay as I don't live in those zones. Maybe Ricardo could check? Cheers |
I have tested this before on my system and these worked fine alongside Apple Pay.
Only issue I encountered was trying to use in conjunction with a shipping plugin to use with DPD so that we could apply & print shipping labels from within the system.
Then the Apple Pay wouldn’t work as the shipping options were unable to be picked up by Apple Pay so would show the error invalid shipping address.
Kind regards,
Asa / Head of Operations
[email protected] / 01582 808829
www.thedermacompany.co.uk
… On 11 Feb 2021, at 10:40, jarman2020 ***@***.***> wrote:
Thanks for this Asa..
I will look at setting my zones up like that. Unfortunately, I can't test if that works with Apple Pay as I don't live in those zones. Maybe Ricardo could check?
Cheers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1198 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDCL6DZD4Z4CMDFRWFJTMLS6OXYVANCNFSM4NAWWHEQ>.
|
Unfortunately I'm getting another bug if I set up using the below. UK Mainland UK Offshore UK mainland zone 1 is at the top of the zones list. I enter an AB6 post code for example but get "No shipping options were found for" ? |
Yes, it's definitely still an issue for 4 character postcode prefixes. I have a shipping zone that should include LN1 to LN10 but not LN11, LN12, LN13. However I set up the zones it is not possible to avoid the Apple Pay error because of the 3 character limit. |
Unfortunately, it looks like there's nothing we can do in Stripe to fix this. TL;DR: From Apple:
We get only the first 3 characters of a postal code when calculating shipping methods for the UK and Canada, e.g. full postal code is That creates an issue with wildcard shipping zones like Perhaps what we can do here is to provide a notice for the merchant explaining the incompatibility with Apple Pay if Apple Pay is enabled and the store has UK or CA shipping zones with more than 4 digits. @v18 Any thoughts? |
@ricardo - since we're not able to provide a fix for this - it sounds like a good idea to let merchants know about this incompatibility. Probably in the shipping zone area would be best, but could also do it near the payment request buttons. @LevinMedia - I'd be curious to hear your thoughts about how to best let the users know about this problem: basically when using Apply Pay for shipping addresses in the UK, when using 4+ digit wildcard postal codes to calculate shipping, we aren't able to correctly calculate shipping and cannot complete the order. This is because Apple Pay only exposes the first 3 digits of the post code. |
Related fix in WooCommerce Payments: Automattic/woocommerce-payments#1528 |
@v18 I can sync the changes to this repository. |
Added by @v18:
There's a fix for this in WCPay - it needs to be ported over.
Describe the bug
Apple Pay anonymises the part of the shipping address (postalCode and address lines) until payment is processed. This leads to
invalid shipping address
error in the payment request when shipping zones configured in a specific way.I.e. when shipping zones are configured based on zip code regex (e.g. BN11*) it's not detected correctly by payment request due to zip code is truncated by Apple Pay.
More details and screenshots:
Support ticket: 2911575-zen.
Slack chat: p1589288438496600-slack-CNXMMQBDW
To Reproduce
Invalid shipping address
error.Expected behaviour
Correct shipping zone and rate applied based on the selected shipping address.
The text was updated successfully, but these errors were encountered: