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 Express Issues #1062

Open
IaroslavVerstiukOSF opened this issue Apr 3, 2024 · 3 comments
Open

Apple Pay Express Issues #1062

IaroslavVerstiukOSF opened this issue Apr 3, 2024 · 3 comments

Comments

@IaroslavVerstiukOSF
Copy link

Describe the bug
In one of our Salesforce commerce cloud project we were working on adding Adyen Appel Pay express payment options, our implementation was done using Adyen Apple Pay certificate.

During testing we saw that there are issues with what data is displayed in Apple Pay window, for example there are no information about taxation , no shipping discounts or order discounts are shown.
Taxation was not calculated at all, even checking your SFCC demo sandbox where ApplePay express was enabled taxes were not set and order was placed without taxation.

To Reproduce
Steps to reproduce the behavior:

  1. Add product to cart and apply any apportion for shipping method
  2. Click on Apple Pay button
  3. Check summary info
  4. You will see that there are not taxes, not shipping discount , taxes are not calculated at all

Expected behavior
Customer should be able to see full info on summary page same as on cart, taxes should be calculated.

Workaround done
We've extended applePayExpress.js file to add missing fields to order summary following SDK documentation https://docs.adyen.com/payment-methods/apple-pay/web-component/express-checkout/
Specifically newLineItems were added to reflect correct summary information.

Regarding taxation, it was not calculated as address is not set on the basket level, to handle this in shippingMethods.js file in function callGetShippingMethods we've added functionality to set basic address in cart that is available from apple pay

Please fix Apple Pay express in your SFCC cartridge

@amihajlovski
Copy link
Contributor

Hello @IaroslavVerstiukOSF

Thanks for reporting this and explaining the issue to this extent!

We tested this and can see that the taxes are correctly applied for the US locale (for other locales like french for example the taxes doesn't apply because those are part of the amount).
Can you explain better this part taxes should be calculated?

We are already aware that the tax line item is not part of the summary and we will look into providing that as part of the Apple Pay dialog. Although the taxes are visible on the confirmation page.

Kind Regards
Aleksandar
Adyen

@IaroslavVerstiukOSF
Copy link
Author

hi @amihajlovski

For US locale taxes needs to be calculated not only based on country code but also considering state and postal code.

In your code base for Apple Pay express flow, you are not setting address until you are calling
Adyen-PaymentFromComponent, there you set both addresses, but there is no basket recalculation at that step.

You are calculating basket only in Adyen-SelectShippingMethod endpoint , but at that time address is not set in the basket, so you can't get accurate tax.

What I did is modify callGetShippingMethods function that is called when we are getting available shipping methods and set address info there.

But the problem we are still facing is that is you use 3rd party tax service that do granular tax calculation , at that step we can't see full postal code due to security reasons, and you can only see once customer confirms and proceed with Authorization , which is in Adyen-PaymentFromComponent, if I try to recalculate taxes there having a full address , I might end up with different total that what was presented to the customer and when we try to authorize in this case we are getting error: 5_001 - Apple Pay token amount-mismatch

@amihajlovski
Copy link
Contributor

Hi @IaroslavVerstiukOSF

Thanks for your reply. We are already looking into this and will provide you an update!

Kind Regards,
Aleksandar
Adyen

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