We need to implement the IPN hook in the WPP module to be able to update transactions when they are acted on via the PayPal UI. Right now this primarily means marking pending authorizations as captured, but this will be expanded to include other operations as they become available (i.e. voids and credits).

Comments

c4rl’s picture

Subscrub

j0rd’s picture

I would say 80% of processor have this kind of functionality. Not just paypal. It can be mildly abstracted, by adding some helper functions which deal with the adjustment of orders, so that it's not a full re-write every time.

Some processors postback when there's a chargeback, refund or void. Others provide you with an end-point on their servers where you can download the adjustment log and act upon it.

Much like Payment Processors currently have a hook for entering payment, they also need hooks for Authorization, Capture, Auth+Capture, Refund, Void and Chargebacks. These all need to be separately implemented and should be implemented for all processors. Auth+Capture is the only required one to process transactions.

Then processing these types of IPN are quite simple and you put up your end-point for the postback or cron-script to fetch the data, then run it through these helper functions which ideally should already be implemented.

Not sure if this is something which Drupal Commerce currently deals with, but it's something I've hammered Ubercart about many times and was never accomplished. It'll make things easier and more standard between processors.

jakonore’s picture

sub

andyg5000’s picture

Status: Active » Needs review
StatusFileSize
new6.15 KB

Here's a patch for WPP that provides IPN updates to transactions. I've left out Completed because it seems to be redundant since the module already determines if captures are successful. The following status will be handled by this patch: Pending, Voided, Refunded, Reversed, Cancel_Reversal, and Expired. It adds two new fields to the settings page: paypal email address & ipn logging option.

rszrama’s picture

Status: Needs review » Needs work

I'm gonna have to do some additional testing on this after the 1.0, but I know it's at least going to need the trim() / strtolower() treatment on the e-mail address comparison that we gave to WPS IPN validation: #1418030-11: Better support business e-mail address comparison / acceptance

In fact, we might just make this issue dependent on that one so we can use a single abstract e-mail validation routine between the two payment methods.

tomtech’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.