summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-11-06 23:39:46 +0000
committerivan <ivan>2009-11-06 23:39:46 +0000
commitcb31f44355a8499fce406b84cff29c8b16c3fd52 (patch)
tree7b4145d52dd18a0cb74d115c3c918820deacaf2a
parent96f404db9f0ad24b48f38f3c6971a867d15b8973 (diff)
backport using business-onlinepayment-description in all cases to 1.7
-rw-r--r--FS/FS/cust_main.pm18
1 files 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<zip>, I<payinfo> and I<paydate> are also available. Any of these options,
if set, will override the value from the customer record.
I<description> 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<invnum> is specified, this payment (if successful) is applied to the
specified invoice. If you don't specify an I<invnum> 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<zip>, I<payinfo> and I<paydate> are also available. Any of these options,
if set, will override the value from the customer record.
I<description> 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<invnum> is specified, this payment (if successful) is applied to the
specified invoice. If you don't specify an I<invnum> you might want to