When placing a transaction I would like the the Paypal order comments to be set as the Order ID and the IP of the user respectively, rather than just the items in the order. There is often a time that we need to reference our paypal transactions and it is just much easier to do so via the order number than the reference number.

CommentFileSizeAuthor
#4 uc_payflowpro_comment_hook.patch2.09 KBkwinters

Comments

kwinters’s picture

Status: Active » Needs work

The plan for this is to create a hook, since there are tons of possibilities for the comments field.

marcusahle’s picture

Do you have an estimated time frame on this?

kwinters’s picture

I might be able to do it this coming weekend.

kwinters’s picture

Title: Ability to set Paypal comments when a transaction is placed. » Transaction comments hook
Assigned: Unassigned » kwinters
Status: Needs work » Patch (to be ported)
StatusFileSize
new2.09 KB

Hook "uc_payflow_pro_transaction_comment" added, which replaces the order comment with text of your choosing.

Patch attached, and also committed to the development branch. Sample usage:

function mymodule_uc_payflow_pro_transaction_comment($order) {
	return 'Order ID: ' . $order->order_id;
}

FYI, the Ubercart order ID is already available as "Supplier Reference #" or "Invoice Number" when you're looking at a transaction from the Payflow manager interface. The customer IP address is not, so you will need the hook for that.

Status set to "to be ported" since this needs to be carried over into 2.x eventually.

marcusahle’s picture

Works like a charm. Thank you!

kwinters’s picture

Status: Patch (to be ported) » Fixed

Available in the 6.x-1.4 release. I'll port it to 6.x-2.x with a bunch of other things.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.