Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Cart cannot be loaded or an order has already been placed using this cart #93

Closed
rjtubera opened this issue Sep 17, 2021 · 7 comments
Closed

Comments

@rjtubera
Copy link

Hi we have multiple 500 errors, which says "Cart cannot be loaded or an order has already been placed using this cart" even though the payment was already succeeded. Why is stripe still calling this webhook even though payment is already successful??

@mribeiro202
Copy link

Hi @rjtubera ,

Can you tell me more about your environment?
What version of PrestaShop do you use?
What is your version of the Stripe module?
What version of php is used?
What web server do you use (ngnix, apache, IIS, ...)?

Can you tell me how I can reproduce this problem to do a test on my side?

Have you thought about contacting the support department?
https://addons.prestashop.com/en/payment-card-wallet/24922-stripe-official-sca-ready.html

Have a nice day

@Ashley-Butcher
Copy link

Hello..

We're having this exact problem too. The 500 errors occur on the webhooks (from Stripe to PrestaShop). We have a multistore environment in PrestaShop 1.7.7.8, stripe module version 2.3.6.

Payments "succeed" for the customer, and they assume the order has been paid. For Stripe, the payment is stuck in "uncaptured" because of the webhook failures.

All webhooks fail, i.e. for an order processing there is 2x payment_intent.requires_action which Stripe gets a 400 error (no response body), followed by charge.succeeded which yields a 500 error (The cart cannot be loaded, or an order has already been placed using this cart.).

The previous version of the stripe module appeared to have fix the issue with registering webhooks in a multistore environment, however this again looks like yet another multistore environment bug.

This is very serious, as this is now the third version in a row which still does not correctly accept payments.

@Ashley-Butcher
Copy link

Further follow-up: The cart ID in the uncaptured transaction is correct, however the cart in PrestaShop returns to an abandoned status. We are having to capture and convert abandoned carts, which is frustrating.

I am further confused how the stripe module is able to sell the customer the order is accepted and placed, when actually the process has fallen apart, which indicates something is wrong with the error checking here too.

@Ashley-Butcher
Copy link

In working around this problem, we have been capturing payments in the Stripe dashboard, and then converting abandoned carts into orders. We've tried experimenting with flipping this process around this morning, by converting the cart to an order first, then capturing the payment.

I've noticed that once an order exists, the webhook called when the payment is captured is actually able to find the order and transition the order status in PrestaShop correctly. This leads me to believe that the issue may not be related to the store context at the time the webhook call from Stripe to Prestashop is being called, but rather something in the cart to order conversion process after payment has been accepted that goes wrong.

Note: we have other payment modules, and they do not have any problems with orders or statuses, and we have already eliminated any exceptions such as carriers or country configuration that could be interfering.

Still, our scenario is that the client makes a purchase in a store with an ID other than 1 (and a shop group other than 1), and is told the order was placed successfully, however the cart is not converted into an order, and the payment remains uncaptured, with the aforementioned webhook errors. I still suspect multistore is a contributing factor here, and I maintain that there is a failure in error checking if the customer sees the order has been processed when it in fact has not.

@githubjonny
Copy link

We are seeing the same issue but we are not a multisite.

Got webhooks with:
Failed : charge.succeeded
HTTP status code : 500 (Internal Server Error)
"Cart cannot be loaded or an order has already been placed using this cart"

No order in the Prestashop admin (both module + prestashop running latest versions).

Can't seem to find the pattern though as most orders seem to go through without any issues.

Only found out as a customer rang wanting to know when delivery would be!

@githubjonny
Copy link

Looking at strip > payments > all > filter > cancelled + uncaptured, it looks like this issue started for us on 3 Sept 2021

@clotairer
Copy link
Collaborator

We publish last week the release 2.4.0 witch solve issued about uncaptured payments.

You can update your addons. If you have any trouble do not hesitate to contact our technical support here : https://addons.prestashop.com/en/contact-us?id_product=24922

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

No branches or pull requests

5 participants