Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The payment tab on the order management page (admin/commerce/orders/%commerce_order/payment) allows for adding a Paypal WPP payment, but I would like to allow for initiating a refund. Are there any plans for this?
There is some discussion about order (or line item) cancellations and refunds in general (not tied to a specific payment gateway) in this Drupal Commerce issue: http://drupal.org/node/1419784#comment-5815272.
Comment | File | Size | Author |
---|---|---|---|
#6 | refund.patch | 9.68 KB | webadpro |
#4 | paypal-refund.png | 115.65 KB | kimberlydb |
#2 | commerce_paypal-paypal_refund-1848156-6850466.patch | 7.36 KB | olteanu5000 |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedJust wanna say I'm totally down with adding this, but I doubt it'll get into the 1.0 release. I'll add it in any minor release, though - there are equivalent features in the Authorize.Net, CyberSource, and other integrations if whoever gets this needs an example to look at.
Comment #2
olteanu5000 CreditAttribution: olteanu5000 commentedTry the attached patch for the functionality.
Comment #3
Exploratus CreditAttribution: Exploratus commentedI'm surprised didnt get much action. Is this patch still valid? Worth the try?
Comment #4
kimberlydb CreditAttribution: kimberlydb commentedWorks well, the only issue I have is when i have multiple partial payments on an order and try to refund a partial amount on a partial transaction, it doesn't do the math quite correctly and I get an error complaining about payment status. That's a rare situation for me though, so otherwise works quite well.
In the screenshot I had 3 credit card payments of $1.15, $1.00, and $1.00. I tried to refund $0.50 on the bottom $1.00 payment and it takes the order total ($3.15 - 0.5) rather than the transaction total (1 - 0.5) so now even though it correctly refunded $0.5 through paypal, it reflects an incorrect amount making it appear like the customer has a balance.
Comment #5
rszrama CreditAttribution: rszrama at Centarro commentedOn a real cursory examination, this patch needs to be re-rolled to remove mention of voiding. Voids are performed against authorizations before they are captured, not against captured transactions. I think everything can just be reduced to "refund" and it'd be ok - though I have yet to test this in a sandbox env't.
Comment #6
webadpro CreditAttribution: webadpro commentedHi,
I would like to submit a new patch.
This patch takes a different approach than applying the refund directly on the original transaction.
Each refund creates a new transaction which is attached to the original transaction.
Comment #7
jmu3 CreditAttribution: jmu3 commented#6 works well
Thank you @webadpro.