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

Wrong capture_method for sofort orders since v2.4.2 - payment rejected #118

Closed icemansparks closed 2 years ago

icemansparks commented 2 years ago

After updating to version 2.4.2 last week, SOFORT Payments get rejected in stripe with the following error - saying that the capture_method for sofort payments needs to be "automatic" rather than "manual":

"message": "The following payment method types ["sofort"] can only be used with PaymentIntents that have capture_method=automatic. Please retry by creating a PaymentMethod with capture_method=automatic." "type": "invalid_request_error"

I could not find any option for this kind of value in the module settings though.

Seems like there were multiple changes on the following file regarding sofort payment as well: controllers/front/webhook.php

SCR-20220214-c8o

clotairer commented 2 years ago

You right the condition here looks like not right. In your case, your controller just need to be charged and go to the else case.

We changed the condition to fix a bug (An error appears when paying with Alipay, Bancontact, EPS, iDEAL and P24 after redirect from stripe test payment page when Authorize payment according to our internal bug tracker) and get a regression. FPX, OXXO, Giropay, SOFORT was right according to our QA ingeneer before the commit, I suppose he test back only Alipay, ... and not those previously worked. So, if you don't use Alipay, Bancontact, EPS, iDEAL and P24, you can put the older condition L551.

icemansparks commented 2 years ago

I would honestly rather not change payment related code by myself and instead wait for the fix in the module itself from you guys (since we're also using iDEAL, Giropay and Bancontact this would not bring us full closure on all problems anyway).

Meanwhile, we will deactivate SOFORT payment in the shop.

clotairer commented 2 years ago

OK, that's clear. We will do our best to found a quick fix.

davidaames commented 2 years ago

I have the same problem, what would i have to change on L551 exactly to make sofort work again?

clotairer commented 2 years ago

@davidaames I don't know if your are at ease with code. It's better to send an message to our support : https://addons.prestashop.com/en/contact-us?id_product=24922 and indicate that @clotairer sent you to the support and that you need level 2 support for issue #118. we will assist you in this modification and we could work on a long term fix.

davidaames commented 2 years ago

@clotairer Thank you very much, i'll do that!

clotairer commented 2 years ago

Hi,

You can download the (pre)release 2.4.3 or wait the avalability on PrestaShop Addons.

Thank you.