Support from Acquia helps fund testing for Drupal Acquia logo

Comments

olteanu5000’s picture

Attached patch with desired functionality. Inspired by paypal wpp module and commerce_be2bill module.

olteanu5000’s picture

Status: Active » Needs review
vasike’s picture

Title: Allow Paypal WPS refund from admin order management page » Allow Paypal WPS Capture and Refund from admin order management page
Version: 7.x-1.0-rc1 » 7.x-2.x-dev
Issue summary: View changes
FileSize
21.86 KB

Let's move this one to the current (2.x) version of the module.
patch re-rolled.

Also re-titled, the patch includes also the Capture option for Authorized payments.

vasike’s picture

Status: Needs review » Needs work

it seems it needs more work.

vasike’s picture

Title: Allow Paypal WPS Capture and Refund from admin order management page » Allow Paypal WPS Capture, Void and Refund from admin order management page
Status: Needs work » Needs review
FileSize
30.97 KB

There is a new patch for this - it is a re-work of the previous one.
I added also the Void option to the Pending payments.

vasike’s picture

it seems there some more work needed for Refund, some changes to WPS IPN process for refunds.
there is an updated patch for this.

vasike’s picture

there is a new patch that completes the solution for this with Rules integration:
Rules Actions available for Capture/Refund/Void.
This means it could also used with VBOs (Rules components).

YurkinPark’s picture

Version: 7.x-2.x-dev » 7.x-2.3
FileSize
43.67 KB

Thanks for the patch. As i discovered, this patch can be implemented for 7.x-2.3 as well.
I found one issue after implementing this patch. Sometimes, PayPal doesn't authorize payment, and returns

[payment_status] => Pending
...
[pending_reason] => paymentreview

instead of

[payment_status] => Pending
...
[pending_reason] => authorization

This means you have not provide service/ship merchandise. Check in official documentation https://developer.paypal.com/docs/classic/express-checkout/integration-g... . My patch implements previous (7th) patch and provides tools which you can use to cover "payment under review" case.

YurkinPark’s picture

In case we have many failed transaction before, sometimes i'm obtaining non last transaction (which is paypal transaction). Added condition to match payment method commerce_paypal_wps_check_ipn_pending_reason rule condition callback.

rszrama’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Status: Needs review » Needs work

New functionality targets the -dev version, even if the patch applies cleanly on prior point releases. However, it isn't clear to me why you disabled a FALSE return value in the IPN validation function. That seems ... quite drastic to have no explanation. : P

ruvenshilpakar’s picture

Hi,
I tried this patch but when i try to complete the checkout and get redirected to the paypal account page, i get an error and nothing happens. What could i be doing wrong? I used the#9 patch

lathan’s picture

Status: Needs work » Needs review
FileSize
42.73 KB

Reroll patch against 7.x-2.x and - added a comment as to why 'disabled a FALSE return value in the IPN validation function'.

lathan’s picture

fix incorrect path in last patch

Ronino’s picture

I could only test refunds via the sandbox and it mostly works, great! When I do a partial refund first though and then want to refund the remainder, I get these errors:

Refund failed, so the transaction will remain in a pending status.
Can not do a full refund after a partial refund

I enhanced #13 to fix this.

fpalewacki’s picture

Hey, I've fixed a couple of issues and typos and improve multi currency support to get the proper errors returned from PayPal if we created a transaction in a different currency.

Refund request was not sending the currency parameter so if you used different currency in commerce than in PayPal then the transaction would have different currency than the request sent to PayPal resulting in e.g. issuing the "3 EUR" refund but in USD

This ticket is kinda old, I'm on "7.x-2.7" version

jsuchogorskafp’s picture

I've fixed issue about order balance, when refund was did from paypal.

Refund from paypal got a confirmation with the e.g "0 EUR", so the order balance does not change.
Refund from platform got confirmation with correct amount and order balance changed.