Open raedsports opened 1 year ago
Hello @raedsports ,
I think there may be a misunderstanding between the PayPal and Amazon Pay checkout flows; when initiating Amazon Pay checkout from the cart/minicart, the 'Express Checkout' flow is launched. Here, the user authenticates with Amazon and is redirected back to the store's checkout. Shipping address, billing address, and payment method information from the user's Amazon account are then used to pre-populate fields in the Magento checkout and make the ordering process quicker; it is not intended to place the order directly through the Amazon page. This is opposed to (what I'm assuming is) a one-click checkout offered through the PayPal plugin.
If you believe there is something deeper affecting your integration, could you provide a staging or pre-prod site where we could do some testing in sandbox mode? I do not have a live Amazon account in the EU region suitable for testing on the live site. If you like, we can continue the conversation through email or an internal Jira ticket in the interest of privacy.
Thanks, Spencer
Hey @sgabhart22 , I understand that Amazon Pay is not Paypal express. The problem is: As soon as Klarna Checkout is activated, the return address after confirming the Amazon Payment will open the Klarna checkout, not a plain Magento checkout to place the order. How can this be fixed? I see that the very same issue has been brought up here several times before during the last years, so I'd assume there should be a good solution for this available by now? I don't have a dev environment for you for this, only our live shop, sorry. Greetings from Germany, Stephan
Hi again @raedsports ,
Sorry for misunderstanding the problem, I didn't see the nature of the issue at first. I did some testing on a local instance, and realized a couple of things. First, the package klarna/m2-checkout
seems to be incompatible with Magento versions >= 2.4.4, but presumably you are using the actively maintained klarna/m2-klarna
extension that includes Klarna Checkout.
Second, Klarna Checkout defines its own checkout URL (checkout/klarna by default), which means the Amazon Pay scripts will not run to autofill the address fields. This can be solved by changing a configuration value in the AP module (Advanced > Developer Options > Magento Checkout URL Path), but unfortunately this does not fix the overall integration issues. Because this is more of a hosted checkout experience, the Amazon Pay module cannot interact with Klarna Checkout elements directly. According to the Klarna documentation for Adobe Commerce (https://docs.klarna.com/platform-solutions/adobe-commerce/adobe-commerce-244-and-above/kco-overview/configuration/):
Only certain external payment methods are supported by Klarna. Only PayPal Express support is provided by the Klarna Checkout Module.
Because PayPal is the only external payment method that this extension supports, I'm not sure how much we can do from our side to fix the integration. The Klarna team would need to make the decision to offer Amazon Pay as an available payment method for use with Klarna Checkout. At the moment, it appears that these two extensions are mutually exclusive. However we can look into having discussions with Klarna to see if there's any interest in adding AP to their available methods.
Thanks, Spencer
Hey Spencer, thanks a lot for the detailed feedback about the issue. That explains why it worked together in our Magento 2.3.6 installation but doesn't work anymore in our new Magento 2.4.6 installation. I'd honestly highly appreciate any effort from you to get in touch with the Klarna team to get this fixed in the near future. We'd love to continue offering amazon pay as an alternative to Klarna and PayPal express. We deactivated AP for now in our shop. I'm looking forward for your feedback about the results of a talk with Klarna. Greetings from Germany, Stephan
P.S.: couldn't an alternative checkout URL be an option to solve this too? Something like baseurl/checkout/amazonpay could call an alternative checkout to the Klarna checkout, couldn't it? Just a thought for a workaround?
Hey Stephen,
We have a meeting later today with some solutions architects from Amazon, and we'll definitely discuss the problem with Klarna checkout. For the idea of using an alternative checkout path for Amazon Pay, I'd say that could be a possible solution... though, off the top of my head, I can't picture exactly what that implementation might look like.
Another simple option to offer both Klarna and Amazon Pay together would be to simply disable the Klarna Checkout but leave Klarna Payments enabled as a payment method, using a more standard Magento checkout. But I understand if the shop is committed to Klarna Checkout, it is a clean and attractive checkout experience.
At any rate, I'll keep you updated regarding any communications with the Klarna team!
Thanks, Spencer
Hey Spencer, Disabling Klarna Checkout is not an option for us, since the offer a variety of easy to use payment options for our international customer base. So Klarna Payments is not a suitable way for this problem in my opinion. Thanks for keeping me updated, Stephan
Hello again Stephen,
Sorry for the delay, but I just recently received an update that a couple of the Amazon Pay folks we work with are looking into opening discussions with Klarna to see if an integration with the new module can be achieved. I'll continue to keep you updated as I'm made aware of anything else that develops on this front.
Thanks, Spencer
Hello, is there still no fix?
We have a similar issue. Paypal "forces" us to use Dominate Checkout (because their new Paypal Checkout is not available else with Magento2 in our region) which has their own hosted Checkout Page and use /checkout_page/ with redirect of /checkout/ so AmazonPay can not redirect to normal checkout.
I could solve it maybe if I create a new store view where I disable Dominate Checkout but need to add "?___store=AmazonPay" to the url which has the Amazon Session id &amazonCheckoutSessionId=77c453-4e3a-48f23-xxx-f9xxd019932 but I can not add it at Magento Checkout URL Path because it adds it before to sessionId and so it leads to 404 not found. Can I add the storeid code somewhere in the AmazonPay Module Code which generates the url?
This solution is not so good but maybe working but it would be best of course if there is a better fix directly from AmazonPay.
Thank you
What I expected:
Paying via Amazon pay from the cart should open Amazon, confirm the payment, lead me back to the shop with a cornfirmation of the purchase and create the order in the backend.
What happened instead:
Amazon pay opens, but when clicking the "checkout" button, it takes me back to the shop but then the Klarna checkout opens without order confirmation / order creation from amazon pay. Instead Klarna offers their payment options in the checkout. When trying the same with paypal express, it works flawless out of the box without going to Klarna checkout. Amazon pay won't work out of the box.
Steps to reproduce the issue:
Your setup