getting wrong postal code on onshippingcontactselected callback event in apple pay.

We are putting valid postal code SW1E 6RA for UK but we are getting wrong shippingContact onshippingcontactselected callback event.


Below response we are getting.


{"administrativeArea":"London","country":"United Kingdom","countryCode":"GB","familyName":"","givenName":"","locality":"London","postalCode":"SW1E ","subAdministrativeArea":"","subLocality":""}


In above response we are getting wrong PostalCode but I was put correct one.


Do anyone have any idea why I am getting wrong postal code?


Thanks,

Partha

Replies

https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment/1916097-shippingcontact

Before the user authorizes the transaction with Touch ID, Face ID, or passcode, you receive redacted address information when onshippingcontactselected is triggered. Although the address is redacted for privacy, it includes sufficient information for you to compute taxes and shipping costs and refresh the corresponding values and total in the payment sheet.


SW1E is the first part of the postcode. The rest of it is hidden / redacted in onshippingcontactselected.

After the user authorises the transcation, you get access to the full address.