commercelayer-react-checkout icon indicating copy to clipboard operation
commercelayer-react-checkout copied to clipboard

Klarna payment method unavailable on initial selection

Open scriptology opened this issue 8 months ago • 0 comments

Description

In my attempts to add the Klarna payment method, I encountered a bug: the Klarna payment method becomes available after returning to the billing address and re-selecting the payment method. The error repeats with each new order.

Steps to Reproduce

  1. Create an order via API
  2. Go to the hosted version of the checkout page
  3. Fill in the billing address
  4. Click Continue payment
  5. Select the Klarna payment method (here I get a 422 error due to the missing country code)
  6. Return to the billing address
  7. Click Continue payment again
  8. Select the Klarna payment method (now the payment method is available)

Expected Result

I expect the Klarna payment method to be available immediately after filling in the billing address and clicking Continue payment.

Actual Results

When selecting the Klarna payment method for the first time, I get a 422 error due to the missing country code. The payment method becomes available after returning to the billing address and re-selecting the payment method.

Screenshots

https://github.com/commercelayer/mfe-checkout/assets/1895925/64e82ebf-b2f7-4d91-a791-890ad473a9fe

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: Chrome
  • Version: 125.0.6422.142

Additional context I would appreciate recommendations on how to bypass this bug without deploying the checkout page on my side.

scriptology avatar Jun 17 '24 17:06 scriptology