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

Partial refund problem #55

Closed bibidinu closed 2 years ago

bibidinu commented 3 years ago

Every time I issue a partial refund, I mark the order as canceled and send the email to the customer as canceled. How can I solve the problem?

mribeiro202 commented 3 years ago

Hello @bibidinu

Where do you make the refund from? Stripe Dashboard or PrestaShop Back Office ?

bibidinu commented 3 years ago

Prestashop Back Office from module Stripe

mribeiro202 commented 3 years ago

We are currently reworking the refund functionality of our module as we are aware of some malfunctions. When our refund patch version is released I will let you know. Have you tried using the functionality within the Stripe Dashboard?

mribeiro202 commented 3 years ago

Hi @bibidinu ,

We made a fix on the next release for your issue. This is not actually available but i will tell you when the new version will be on addons.

Have a nice day

andromaque commented 2 years ago

Hello,

has this bug been resolved?

Whereas the partial refund is made through the Stripe dashboard or the module, the order status is changed to "cancelled", which is very annoying because then we have to deal with the customer stressed out thinking that it's order has been cancelled.

Thank you.

clotairer commented 2 years ago

Hello,

We have no ETA schedule with Stripe for this bug that trigger the refactoring of the refund.

If you want PrestaShop do nothing if the refund is done on Stripe dashboard, you can try to add

break;

just after line 812 of this file before the IF condition.

https://github.com/202-ecommerce/stripe_official/blob/9eec25464685526ad3ed764d68edb9138170ad81/classes/actions/ValidationOrderActions.php#L812-L814

After an update of the module, you'll need to modify this line. If you prefer a stronger solution, there is a hook to define your own ValidationOrderActions class (eventually extended of this one) with your modification on a custom module. I can tell you more if you want.

devonto commented 2 years ago

Hello, I have a client facing the same issue in 2.4.4.

The code in the above hack suggestion is different from what is in the current release. There appears to be code to check if the refund amount is the total amount.

This code does not appear to be working in the scenario where the order has already shipped. Can you add an option to handle a partial refund after shipping?

clotairer commented 2 years ago

A pull request is in progress #165

With this PR, a partial refund from Stripe Dashboard will not canceled the order.

clotairer commented 2 years ago

Fixed by #165

clotairer commented 2 years ago

2.4.5-RC1 released here and can be downloaded to test.

Thank you.