From acfdb8bec93849e35ae5c4abc276d6ca8006f717 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 23 Oct 2015 20:24:40 -0500 Subject: RT#38432: OFM - Send refund receipt --- FS/FS/msg_template.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'FS/FS/msg_template.pm') diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm index 1d357b1a3..01a656366 100644 --- a/FS/FS/msg_template.pm +++ b/FS/FS/msg_template.pm @@ -614,6 +614,18 @@ sub substitutions { $cust_pay->paymask : $cust_pay->decrypt($cust_pay->payinfo) } ], ], + # for refund receipts + 'cust_refund' => [ + 'refundnum', + [ refund => sub { sprintf("%.2f", shift->refund) } ], + [ payby => sub { FS::payby->shortname(shift->payby) } ], + [ date => sub { time2str("%a %B %o, %Y", shift->_date) } ], + [ payinfo => sub { + my $cust_refund = shift; + ($cust_refund->payby eq 'CARD' || $cust_refund->payby eq 'CHEK') ? + $cust_refund->paymask : $cust_refund->decrypt($cust_refund->payinfo) + } ], + ], # for payment decline messages # try to support all cust_pay fields # 'error' is a special case, it contains the raw error from the gateway -- cgit v1.2.1