Skip to main content

#140 Shipped orders status change to confirmed again and again and again

Posted in ‘Stripe for VirtueMart’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information (available for public)

PHP version
8.1.31

Latest post by b2z on Friday, 17 January 2025 08:46 EET

kilombo

Good morning,

 

When a client pays for one order the status change from "confirmed by client" to "confirmed", and that's ok.... The problem is that when we ship the order and we change the status to "Shipped" after a few hours status come back by it self to  "confirmed" that's a real problem because it can get us to make doubled shipments.... I need this sorted out ASAP.

 

Thanks in advance.

 

Nuno Ferreira

b2z

Hello Nuno!

Normally Stripe sends one payment notification (webhook attempt) if it is successful. If something fails, then Stripe tries to resend notification again. It seems that Stripe in your case is trying to send several payment notifications (webhook attempts).

Can you please check your Stripe dashboard under Developers - Webhooks - Logs. Is it trying to send several attempts (payment_intent.succeeded) for the same payment id / order?

Another way - you can provide us temporary access to your Stripe dashboard (send credentials to support@norrnext.com) and we will try to check where the problem is.

Kind regards,

Dmitrijs

b2z

Also a good place to check is Stripe Dashboard - Developers - Events. You can find the needed payment succeeded event there and click on it. You will see the event data and all webhook attempts.

If you do not know what payment event you need to check then you can easily find Payment ID inside the VirtueMart order. Proceed to VirtueMart, select the order you want to check, and inside it proceed to Payment Method. Notice there Payment ID. It should be something like this - pi_3Qex9DKnqV0ZissC0hNbequO.

Kind regards,

Dmitrijs

kilombo

Good morning Dmitrijs,

 

Thanks for your fast reply, everything seems normal, payments are ok and confirmed, the problem seems to be that everytime we change the status of the order on virtuemart to shipped the Stripe changes it back to confirmed after a few hours... I believe that some how Stripe rechecks the order from times to times and since it's confirmed in the dashboard it push's the status back to confirmed.... I already created a developer user to the dashboard and Stripe sent you one invitation to the support email, since we use the google Auth i cannot provide credentials, i also explained that on the email i just sent you.

 

Thanks in advance, and great work by the way, the component it's quite simple to configure and i put it working in just a few minutes, it's really great stuff, the support is marvelous, you guys answered quite fast... Keep up the good work guys.

 

Best regards,

 

Nuno Ferreira

b2z

Hi Nuno,

Thank you for your kind words.

I checked your Stripe logs. My guess was right - the problem is with the webhook delivery. Stripe sends payment success event notification, but instead of "200 OK" response code it receives "400 Bad Request" with very strange response text - "oops". Because of 400 code Stripe tries to send notification again and again, because it thinks that the event was not processed successfully. I do not remember exactly, how many times it tries to resend notification, but it does not important at the moment.

What is important to understand why this strange "400 Bad Request" response is happening. You say that the order is changing its status every time. This means that our plugin on every repeated Stripe notification does its internal checks and as a final step calls VirtueMart internal function. VirtueMart function updates the status of the order to "Confirmed". After that the same VirtueMart function performs several things and my guess that this point is the cause of "400 Bad Request".

And that is the biggest problem, because I need somehow to debug the VirtueMart code and find out what exactly is failing. Note, I need to do it on your website, because I cannot replicate the problem on our test websites.

Is it ok for you if I will make some debug actions to find out the cause?

Kind regards,

Dmitrijs

kilombo

Good morning,

 

Just sent you one email for the support with the login details, just becarefull, site is online and we are always receiving orders.

 

Thanks in advance,

Nuno Ferreira

b2z

Hi Nuno,

I applied a fix in our plugin to prevent the repeated status change. Please confirm that now the status does not change.

I will also try to find a way to cheat VirtueMart in our plugin to prevent "400 Bad request" that VirtueMart returns in response to webhooks delivery. Cannot guarantee the success, but at least I will try.

Kind regards,

Dmitrijs

b2z

Hi Nuno,

"400 Bad request" is also has been fixed. I managed to cheat VirtueMart on our plugin's level :) 

Please confirm that now the status is working correctly.

Kind regards,

Dmitrijs

kilombo

Thank you very much Dmitrijs, great work mate.... Everything is top notch and working just fine. You guys have the best support.

b2z

Hi Nuno,

You are welcome!

If you will like our product, we would be happy to see your short testimonial/review at the Joomla Extensions Directory 

https://extensions.joomla.org/extension/extension-specific/virtuemart-extensions/stripe-pro-for-virtuemart/

or on TrustPilot

https://www.trustpilot.com/evaluate/norrnext.com

Kind regards,

Dmitrijs

Support information

Support hours: You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+3), but not limited. Our staff is pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days.


Our time: / Your time:

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. We also ask you to remove temporary credentials at your site after the problem is resolved. Thank you.

Support of free extensions is not provided on this forum. Please submit your questions or report issues via Github tracker. See link on the product page.