From cb31f44355a8499fce406b84cff29c8b16c3fd52 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 6 Nov 2009 23:39:46 +0000 Subject: backport using business-onlinepayment-description in all cases to 1.7 --- FS/FS/cust_main.pm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index ee9064d70..a2569f7ec 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2672,7 +2672,8 @@ I, I and I are also available. Any of these options, if set, will override the value from the customer record. I is a free-text field passed to the gateway. It defaults to -"Internet services". +the value defined by the business-onlinepayment-description configuration +option, or "Internet services" if that is unset. If an I is specified, this payment (if successful) is applied to the specified invoice. If you don't specify an I you might want to @@ -2711,7 +2712,17 @@ sub realtime_bop { warn " $_ => $options{$_}\n" foreach keys %options; } - $options{'description'} ||= 'Internet services'; + unless ( $options{'description'} ) { + if ( $conf->exists('business-onlinepayment-description') ) { + my $dtempl = $conf->config('business-onlinepayment-description'); + + my $agent = $self->agent->agent; + #$pkgs... not here + $options{'description'} = eval qq("$dtempl"); + } else { + $options{'description'} = 'Internet services'; + } + } eval "use Business::OnlinePayment"; die $@ if $@; @@ -3657,7 +3668,8 @@ I, I and I are also available. Any of these options, if set, will override the value from the customer record. I is a free-text field passed to the gateway. It defaults to -"Internet services". +the value defined by the business-onlinepayment-description configuration +option, or "Internet services" if that is unset. If an I is specified, this payment (if successful) is applied to the specified invoice. If you don't specify an I you might want to -- cgit v1.2.1