summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-08-08 22:09:41 +0000
committerivan <ivan>2011-08-08 22:09:41 +0000
commit1dfbdf3fc791665e7476277758fd3093ba82cdff (patch)
treec839fd8202af4f140912ab89448ce570a39ecb33
parentea4fcd69d517caea9b223996332727607649ea3a (diff)
add business-onlinepayment-currency config setting, RT#13904
-rw-r--r--FS/FS/Conf.pm8
-rw-r--r--FS/FS/cust_main/Billing_Realtime.pm4
2 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index dd80e92..1e8833c 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -805,6 +805,14 @@ my %payment_gateway_options = (
},
{
+ 'key' => 'business-onlinepayment-currency',
+ 'section' => 'billing',
+ 'description' => 'Currency parameter for Business::OnlinePayment transactions.',
+ 'type' => 'select',
+ 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD ) ],
+ },
+
+ {
'key' => 'countrydefault',
'section' => 'UI',
'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index 97e7c94..0156c53 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -299,6 +299,10 @@ sub _bop_content {
$content{referer} = 'http://cleanwhisker.420.am/'; #XXX fix referer :/
$content{phone} = $self->daytime || $self->night;
+ my $currency = $conf->exists('business-onlinepayment-currency')
+ && $conf->config('business-onlinepayment-currency');
+ $content{currency} = $currency if $currency;
+
\%content;
}