202-ecommerce / stripe_official

After years of hard work with Stripe connector for PrestaShop, 202 ecommerce stop the development of Stripe module on January 9th 2023. Thanks for all contributors that help us!
20 stars 20 forks source link

Uncaptured payments - Pending webhook response #104

Closed mrabsinthe closed 2 years ago

mrabsinthe commented 2 years ago

I updated to the latest version 2.4.0 today and immediately after it was updated, a customer complained that she did not received order confirmation but her card was charged. There was really no order confirmation sent and no order was created. In stripe dashboard, her transaction was marked as uncaptured - Pending webhook response (A webhook that is subscribed to the event hasn't successfully responded yet) - I therefore captured the payment manually - the transaction is now missing order number in stripe dashboard.

We have NEVER had this scenario with "Pending webhook response" before! Also, as you can see, each transaction is in dashboard duplicated now with "Incomplete" record - this was also not been happening before. I have therefore uploaded back my backup files of the previous version 2.3.1 that was working sort of fine (apart from Sofort, apart from the fact that partial refund cancelled an order, etc). PS 1.7.7.8 PHP version: 7.3.33 I cannot believe that you can't get it finally right... Any ideas how to make this version work properly? Stripe-uncaptured1 Stripe-uncaptured

clotairer commented 2 years ago

Hi @mrabsinthe

Thank you for your report. Could you please tell me from on witch version are Stripe Addons before your upgrade ?

We will try to reproduce this issue with your information. I'll be back if we need more information.

mrabsinthe commented 2 years ago

I upgraded from version 2.3.1 and since I uploaded those files back, all is back to normal, no "uncaptured" or "incomplete" payments.

alexandrebrubeyonds commented 2 years ago

Hello, we have exactly the same problem with 2.4.0 version.

clotairer commented 2 years ago

Thanks @alexandrebrubeyonds We are already in touch. I’ll be back ASAP.

clotairer commented 2 years ago

@alexandrebrubeyonds found a twice loading of front.js from Stripe Official addons. After that, two call of payment intent are generated and one out of two are obviously rejected by Stripe. You fix your problem by removing one front.js.

@mrabsinthe You probably have a similar bug in your theme or a conflict with an other module. Could you please tell us more about your store ? If this is not the same case, other merchant could have a bug after upgrade. You can also contact me by sending us a private message here https://addons.prestashop.com/en/contact-us?id_product=24922 (with reference Github issue 104).

In our side we will study how to prevent loading two payment intent in the JS lib.

mrabsinthe commented 2 years ago

Message already sent but I believe that the best solution is to prevent loading two payment intents in the JS lib (if it is really the case). Especially if it worked fine in version 2.3.1.

csingewald commented 2 years ago

We have the same Problem paying with SOFORT payment, Credit card and Austrian EPS works fine.

The log shows "PaymentModule::validateOrder - Order Status cannot be loaded".

csingewald commented 2 years ago

I think I found the cause, the order state with the id 0 could not be found. The configuration value STRIPE_OS_SOFORT_WAITING in the database table ps_configuration was missing. I added it with the value 2 and the problems were gone.

clotairer commented 2 years ago

@csingewald thank you for your update. You think to us that the upgrade of the module lost SOFORT configuration ? We will check that. From witch version do you come from ?

@mrabsinthe sorry, I don't found your message. All are anonymous on support interface and very hard to link github issue and support demand. Could you please tell me when do you have send your message last time ?

csingewald commented 2 years ago

@clotairer I came from 2.3.0 I think.

You should consider to use PS_OS_PAYMENT as default state, if no valid value could be found. In our case, it would be better than an invalid state.

mrabsinthe commented 2 years ago

@clotairer you replied in French which is pointless as I don't speak French. All I was saying is that I have a test server with the latest version of stripe installed. And if you give me your IP, I can let you have the access to see it. But as I have mentioned already, you better fix the module instead of checking the theme if there is a conflict or not. If version 2.3.1. works fine (sort of) than the problem is the module nothing else.

clotairer commented 2 years ago

Sorry @mrabsinthe , you have the same first name than @alexandrebrubeyonds I’ll send you our IP address

clotairer commented 2 years ago

We just released a beta you can downlaod here.