I'm doing an Apple Pay WEB integration (using JS) and Braintree as a payment provider.
I need to calculate some taxes (US sales tax) for the order. Current flow: The user clicks Pay with Apple Pay button, the Apple Pay payment sheet is displayed (we require shipping address containing the postal address,zipcode,name and email).
After that the payment sheet is displayed -> I call the session.onshippingcontactselected function, but at this point I can only get the locality,administrativeArea,postalCode,country and countryCode values from the shippingContact, so I'm not getting the addressLines containing the street name and its number. I need these values as well to accurately calculate my tax.
I know that Apple says in docs that they only provide the full address after the user authorizes the payment, meaning after the payment was done (this is too late for me, cause I need to know the tax amount before the order is being placed/before the user authorizes/pays the order).
Is there a workaround through this?