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

Placing order with Klarna, Clearpay payment through GraphQL removes cart before payment is completed (Plugin v9) #2500

Closed
rcbello opened this issue Feb 9, 2024 · 2 comments
Assignees
Labels
Bug report Indicates that issue has been marked as a possible bug

Comments

@rcbello
Copy link

rcbello commented Feb 9, 2024

Describe the bug
In a headless implementation using graphql, calling placeOrder mutation on cart with Klarna or Clearpay payment makes it inaccessible even before payment is completed or adyenPaymentDetails mutation is called.
After placeOrder mutation, calling cart query with cart id returns 'Cart is inactive' error. And, calling customerCart returns a new empty cart.
Calling adyenPaymentDetails with payment data, order number and cart id also results in inactive cart error, so payment cannot be completed.
This doesn't happen for Paypal or Credit Card with 3DS2 which follow the same flow.

To Reproduce
Steps to reproduce the behavior:

  1. Prepare a customer cart for payment, add product, set shipping address, shipping method and billing address.
  2. Call setPaymentMethodAndPlaceOrder with klarna or clearpay payment method, and placeOrder in a single graphql mutation.
  3. placeOrder response will be an order with isFinal=false and additional action that needs to be completed. Order with pending status will be created.
  4. Complete payment by calling adyenPaymentDetails with action result, order number, and cart id.
  5. 'Cart is inactive' error will be returned. And, original cart will be inaccessible.

Expected behavior
Original customer cart should still be accessible and payment can be completed by calling adyenPaymentDetails mutation.

Magento version
2.4.6-p2

Plugin version
9.0.7

Additional context
We're using graphql api for our native iOS and Android apps.
Doesn't happen for Adyen Paypal payment method and Klarna used to work in plugin v8.

@rcbello rcbello added the Bug report Indicates that issue has been marked as a possible bug label Feb 9, 2024
@dimitriBouteille
Copy link
Contributor

Same issue :) #2478

@candemiralp
Copy link
Member

Hello @rcbello,

Thanks for creating this issue. As @dimitriBouteille mentioned, this Github issue is a duplicate of #2478 and we are currently handling it.

I am closing this duplicate issue. Please feel free to follow-up the issue from the original issue.

Best Regards,
Can

@candemiralp candemiralp self-assigned this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

No branches or pull requests

3 participants