When doing an auth_only transaction it is handy to include the transaction type and PNRef returned by PayFlow Pro in an admin email so users are not required to look the order up to get the information. To include this value, hook_token_values and hook_token_list will need to be implemented.

Cheers,

Antoine

CommentFileSizeAuthor
#1 uc_payflowpro-1012368.patch2.8 KBjantoine

Comments

jantoine’s picture

Status: Active » Needs review
StatusFileSize
new2.8 KB

A patch is attached. It was also necessary to record which module the payment belonged too.

Cheers,

Antoine

kwinters’s picture

Thanks for the patch! I'll test it out when I get a chance.

Do you think adding some extra instructions somewhere would be useful, or is the ubercart + token help text enough?

jantoine’s picture

Ubercart has great instructions on how to customize the email templates and these tokens will be automatically included in the list of 'replacement patterns' at 'admin/store/ca/uc_checkout_customer_notification/edit/actions' and 'admin/store/ca/uc_checkout_admin_notification/edit/actions'. I think that would be enough, but it wouldn't hurt too add this information to the README.txt file or the documentation page.

Cheers,

Antoine

jantoine’s picture

Status: Needs review » Needs work

A better way to include payment information in an email template would be to store all payment related data in the uc_payment_receipts table via the $data parameter of the uc_payment_enter() method. Then, in the template file, all payment data can be retrieved via the uc_payment_load_payments() method no matter the payment method. I'll update this issue with a patch that stores additional payment information in the uc_payment_receipts table.

Cheers,

Antoine