dokan icon indicating copy to clipboard operation
dokan copied to clipboard

⚠️⚠️ Refund Functions with Stripe Express - Impossible to process full refunds from Refund Request

Open Sophie-2e opened this issue 10 months ago • 9 comments

Bug Description

Following up on GITHIB #2110: https://github.com/getdokan/dokan/issues/2110 which has been closed while some issues are still there.

  • [x] From refund request: Problem to fully refund an order because of tax errors

  • [ ] From refund request: Problem to fully refund an order because no way of adding shipping cost

  • [ ] From Coupon Store Credit request: Still cannot add the shipping cost to the refunded cost

  • [x] Also noticed that in the refund request page, it is the user name of the customer that is displayed when it should be first name and last name like it is in the other detail

Step To Reproduce

testing refund function from customer dashboard

Expected Behaviour

That we can add the shipping costs + that we don't face the issue with tax errors

Actual Behaviour

  • [x] From refund request: Problem to fully refund an order because of tax errors:
Screenshot 2024-04-12 at 14 24 55 Screenshot 2024-04-12 at 14 24 29
  • [ ] From refund request: Problem to fully refund an order because no way of adding shipping cost:
Screenshot 2024-04-12 at 14 24 55
  • [ ] From Coupon Store Credit request: Still cannot add the shipping cost to the refunded cost:
Screenshot 2024-04-12 at 14 26 01
  • [x] Also noticed that in the refund request page, it is the user name of the customer that is displayed when it should be first name and last name like it is in the other detail
Screenshot 2024-04-12 at 14 40 58

Additional Information

No response

Environment (please complete the following information)

1. Dokan Version: [3.10.2]
2. Dokan Pro Version: [3.10.2]
3. WooCommerce Version: [8.7.0]
4. Browser [all]
5. Current Theme: [all]

Sophie-2e avatar Apr 12 '24 12:04 Sophie-2e

@Sophie-2e, I have thoroughly tested the refund functionality from the customer dashboard using the provided steps, but I was unable to reproduce the reported issues. Both the vendor refund and RMA refund processes worked as expected without any tax errors or issues related to adding shipping costs.

To investigate, I followed these steps:

  1. Placed a new order on the test site as a customer.
  2. Initiated a refund request for that order from the customer dashboard.
  3. Tested the refund process using the vendor refund option as well as the RMA refund option.
  4. During both refund processes, I was able to include the shipping cost without any issues.
  5. The tax calculations were also accurate, and no errors were encountered.
  6. On the refund request page, the customer's first name and last name were displayed correctly.

I've recorded a video demonstrating the entire testing process, which you can find attached below. As you'll see, I couldn't reproduce any of the reported issues on my end.

Video Attachment

However, I understand that the issue may be specific to a particular site or configuration.

Please let me know if you need any additional information or if you can provide access to a staging site exhibiting the reported problems.

mralaminahamed avatar Apr 25 '24 04:04 mralaminahamed

Hello @mralaminahamed, @mrabbani ,

No you did not test the right functions explained in this github because:

  1. you did not use Stripe Express to pay the order, you used Cash on delivery. The title of the github expressly indicates that the issue occurs with Stripe Express.
  2. You did not do a FULL refund but a Partial Refund while the title of the github expressly indicates that the issue occurs with FULL refund
  3. You did not have any option to add the shipping cost so you definitely did not proceed with the refund of the delivery cost, now you have tested and successfully reproduced the bug, you can proceed with working on fix.
  4. You did not test the refund from the Vendor Order Detail in your video as you said in your last answer, but anyways, just read again the github issue with the 4th points mentioned as you did not test them in the end.
  5. You did not do the full refund so this is why you did not reproduce the error with the tax, test again.
  6. No, On the refund request page, in your video, you see the Display Name of this user, and not his First Name Last Name, so now you have tested and successfully reproduced the error, you can proceed with fixing that.
  7. You did not test store credit for the shipping cost, but anyways you cannot add any shipping cost via refund ticket as you seen yourself when shooting your video, only product cost can be added, so I guess you can proceed with fixing this too.

So all errors still occur. Check the video I sent in Dokan Support Ticket #21455, follow the exact same steps, from payments getaway, products ordered, up to languages and you will reproduce all the bugs mentioned in this github as even with Dokan 3.10.3, I still got the exact same errors.

All bugs reported since August 2023...it is about time that it gets properly tested and then fixed. If you need more videos, just ask in Dokan Support Ticket #21455, but anyways if you follow the steps explained in this github, you will also reproduce the errors:

  1. From refund request: Problem to fully refund an order because of tax errors
  2. From refund request: Problem to fully refund an order because no way of adding shipping cost => bug that you successfully reproduced
  3. From Coupon Store Credit request: Still cannot add the shipping cost to the refunded cost => bug that you successfully reproduced as you see in the refund ticket o seller dashboard, you could not add the shipping cost
  4. in the refund request page, it is the user name / Display Name of the customer that is displayed when it should be first name and last name like it is in the other detail => bug that you successfully reproduced too

You can already proceed with fixing the 3 bugs that you successfully reproduced and you need to test the FULL refund function (meaning refunding all the products of the order, including shipping cost, and also with coupon store credit) so you can then work on the resolution of this 4th error.

Waiting for your news.

Sophie-2e avatar Apr 25 '24 10:04 Sophie-2e

Thank you for the detailed feedback and clarification, @Sophie-2e. I appreciate you taking the time to point out the areas where my testing was incomplete or missed the specific conditions mentioned in the GitHub issue. Based on your comments, it's clear that I need to revisit my testing approach to accurately reproduce the reported issues.

I will follow the exact steps outlined in the GitHub issue and the video provided in Dokan Support Ticket #21455 to ensure I can accurately reproduce all the reported bugs. If I encounter any difficulties or need further clarification, I will reach out in the support ticket.

Thank you again for your patience and for providing such detailed feedback. I will update you once I have completed the testing and can confirm the reproduction of the issues mentioned in the GitHub issue.

CC: @mrabbani, @tanjiralmamun

mralaminahamed avatar Apr 25 '24 14:04 mralaminahamed

Hello @mralaminahamed, you're welcome and glad we are all on the same page 😉 Will be waiting for your news

CC: @mrabbani, @tanjiralmamun

Sophie-2e avatar Apr 26 '24 08:04 Sophie-2e

Thank you, @Sophie-2e, for your valuable feedback and guidance throughout this process. Your detailed comments and instructions helped me thoroughly investigate and reproduce the reported issues accurately.

I have successfully addressed the actual issue. I would like to inform you that in the refund request popup, the RMA module was displaying the subtotal price instead of the total price. The issue occurred because the order included a coupon, which deducted the order price, but the subtotal price remained unchanged. As a result, the total price calculated after applying the coupon was different from the subtotal price being shown.

The fix for this issue will be included in our next dokan pro release, which is scheduled for the future. However, if you require the fix sooner and cannot wait for the public release, please contact our support team, and they will assist you in obtaining the patch or update before it becomes publicly available.

mralaminahamed avatar Apr 26 '24 08:04 mralaminahamed

@mralaminahamed Super good news!

What about:

  • the "Problem to fully refund an order because no way of adding shipping cost" via RMA request (both refund and store credit) ?
  • the user name/ display name of the customer being displayed in RMA request in Seller Dashboard when it should be first name and last name like it is in the other detail?

Sophie-2e avatar Apr 26 '24 08:04 Sophie-2e

  1. The user name/display name of the customer being displayed in the RMA request in the Seller Dashboard instead of the first name and last name:

I noticed that in the screenshot you provided, you were using a user account that did not have the first name set as the display name. Instead, the username was set as the display name.

However, when I used the 'Plugin Support' user account and checked the display name, I confirmed that the functionality is working correctly. As you can see from the attached screenshots, when the user has set their first name and last name, the RMA request section displays the customer's full name as expected.

Screenshots:

  1. Client name at Refund page: See the screenshot
  2. Client name at WP Profile Page: See the screenshot
  3. Your client's name at WP Profile Page: See the screenshot

mralaminahamed avatar Apr 26 '24 10:04 mralaminahamed

  1. the "Problem to fully refund an order because no way of adding shipping cost" via RMA request (both refund and store credit) ?

@imtiaz-pranto vai, Please share your update for adding shipping cost for refund an order

mralaminahamed avatar Apr 26 '24 10:04 mralaminahamed

Dear @Sophie-2e , regarding the inability to include shipping costs in refunds via RMA requests, currently, our system does not support adding shipping and shipping tax calculations during the refund process. This limitation is due to our integration with Stripe, which doesn't support automated modifications for these costs at this moment.

We will continue to explore potential solutions. In the meantime, for refunds that require shipping cost adjustments, a custom solution might be necessary.

On a positive note, other issues related to Stripe refunds have been addressed and will be included in the next release.

This issue will be closed with this update. Thank you for your assistance.

imtiaz-pranto avatar Apr 26 '24 11:04 imtiaz-pranto

Happy Monday @mralaminahamed and @imtiaz-pranto,

First of all, good job @mralaminahamed! Thank you for your investigation, tests, explanations, solutions and report of the bug 👌

Then noted for the shipping costs @imtiaz-pranto, I created a feature request on GitHub as a future improvement for later: https://github.com/getdokan/dokan/issues/2261 😉

Sophie-2e avatar Apr 29 '24 07:04 Sophie-2e