Skip to content
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

Apple Pay wrongly uses the user's shipping country as billing country #872

Open
herschel666 opened this issue Feb 8, 2024 · 6 comments
Open

Comments

@herschel666
Copy link

When opening the Apple Pay payment dialog, the Recurly SDK retrieves the user's shipping address and subsequently updates the Checkout Pricing instance assuming the shipping address's country to be the billing country. In case the shipping country has a different VAT rate than the billing country, this leads to a wrong price being displayed in the Apple Pay payment dialog.

Example:

Given, we have a product that costs €19.90 in Austria, including a VAT rate of 20%. If the buyer's set their shipping address to be in Germany, the German VAT rate of 19% will be applied in the Apple Pay payment dialog, leading to the wrong price of €19.73 being displayed.

@cbarton
Copy link
Member

cbarton commented Feb 13, 2024

@herschel666 The Apple Pay with pricing assumes that the shipping address will be used in the subsequent purchase request which will more than likely apply tax at the destination, which in this case is the shipping address. It uses the underlying pricing.shippingAddress method to attach the shipping address to the pricing instance to which then calculates the tax.

If you are not using the shipping address when creating the purchase and would like to use the billing address as the destination when the invoice is created, we can add an option to the Apple Pay module to not set the shipping address on the pricing module when it is requested from the user. Would that be an appropriate suggestion that would solve for your use case?

@herschel666
Copy link
Author

Yes, that sounds good. We're selling a SaaS product so there won't be any shipping address required anyway.

@cbarton
Copy link
Member

cbarton commented Feb 21, 2024

We can still add an option but in your case since you are not using the shipping address, does it work properly if you remove postalAddress from the requiredShippingContactFields?

@herschel666
Copy link
Author

No, I only have ["email"] set on the requiredShippingContactFields. Still, it doesn't work.

@cbarton
Copy link
Member

cbarton commented Feb 29, 2024

I wonder if there is a bug in the library that needs to be investigated if that is the case. I'll do some digging next week.

@cbarton
Copy link
Member

cbarton commented Mar 6, 2024

@herschel666 Unfortunately, I can't reproduce the behavior you are experiencing.

When I configure recurly.ApplePay with requiredShippingContactFields: ["email"], the shippingMethodSelected event does not trigger, and if it did there would not be a shipping contact returned. Adding "postalAddress" triggers it as expected and loads the tax estimate.

If possible, can you provide me with your recurly.ApplePay configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants