#changmin-woocommerce

1 messages · Page 1 of 1 (latest)

stray compass
#

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.

ionic yew
#

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

stray compass
#

Taking a closer look

plush bronze
#

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 the addressLine option is missing, but I don't know about the postal code

stray compass
#

Thank you for your patience, I'm seeing the same behavior, doing some more digging.

deep stone
#

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

#

Is there a reason you are looking for the address line in that callback beyond updating shipping info?

ionic yew
ionic yew
stable flume
#

👋 @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?

stable flume
#

@ionic yew Are you still there?

ionic yew
#

Yes

#

I'm always here

#

Thanks for your effort

ionic yew
# stable flume <@821126297283330060> 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.

stable flume
ionic yew
#

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?

stable flume
#

I don't believe Google would have the same policy - it's really an apple specific thing

ionic yew
#

yes , I'm testing my case on Chrome

#

same return problem

stable flume
#

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

ionic yew
#

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.

stable flume
#

Have you tried the same Canada address but removed the space?

ionic yew
#

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

stable flume
#

I know it's confusing, but from what I can see, there really isn't any way around this

plush bronze
#

it seems like this is a decision made by Google and Apple

#

in terms of how much information they're willing to expose

#

since post codes in Canda are a lot more detailed then zip codes in the US