#changmin-woocommerce
1 messages · Page 1 of 1 (latest)
Hi 👋 apologies but WooCommerce built the Stripe integration that their plugin utilizes, so we aren't sure how it works or how to interact with it. The WooCommerce support team should be able to provide more assistance.
This is not woocommerce problem
we code our own stripe apple pay by Stripe script, the same error
stripe.paymentRequest can not get the postal code which contains space ' ' inside it, like 'H2X 1M6' in Canada
Taking a closer look
I noticed this in the docs:
To maintain privacy, browsers may anonymize the shipping address by removing sensitive information that is not necessary to calculate shipping costs. Depending on the country, some fields can be missing or partially redacted. For example, the shipping address in the U.S. may only contain a city, state, and ZIP code. The full shipping address appears in the PaymentResponse object after the purchase is confirmed in the browser’s payment interface
I think this explains why theaddressLineoption is missing, but I don't know about the postal code
Thank you for your patience, I'm seeing the same behavior, doing some more digging.
Thank you for the assist nightpool! I am seeing this behavior when I test with our payment request button itself. The billing address is redacted in the payment request portions of code but you can see it in full if you check the address info on the PaymentMethod or charge after the payment has been confirmed https://stripe.com/docs/api/payment_methods/update#update_payment_method-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is there a reason you are looking for the address line in that callback beyond updating shipping info?
Thank you very much!
Actually we are using Canada Post API to get Shipping method cost, if address_line not empty that will be more accurate, but if address line empty, we can still get the shipping method cost from PostalCode, that means PostalCode is mandatory
Actually we are using Canada Post API to get Shipping method cost, if address_line not empty that will be more accurate, but if address line empty, we can still get the shipping method cost from PostalCode, that means PostalCode is mandatory
👋 @pine mango has to head out, but I'm hopping in to help - is the issue still that you're getting a truncated postal code?
@ionic yew Are you still there?
Canada Post API need the full Postal Code, if the address is US address, the zip code is in number type with no space, then Canada Post API can return shipping methods code by this US zip number. But Canada and other countries' code are in different format, not only number.
I think this is an apple pay restriction, not ours - https://developer.apple.com/forums/thread/15217
And Google has the same policy?
This is not make sense, so apple pay restriction only restrict Canada and not restrict US?
why Stripe can return full zip code if this is US address?
I don't believe Google would have the same policy - it's really an apple specific thing
You see the same partial postal code with Google Pay as well? Then this must be a canada specific restriction that I wasn't aware of
yes
that screenshot is from Chrome debug tool
This should be the " '' space problem, it's not make sense that the policy only for Canada. and US address return full zip code, Canada and US belong to one market.
Have you tried the same Canada address but removed the space?
this is auto set by Google autocomplete
so maintain privacy only face to Canada, and not US? that means all the company in Canada cannot use Stripe script or API
the Stripe script shippingaddresschange return code will always not completed in Canada
I know it's confusing, but from what I can see, there really isn't any way around this