From 1dfbdf3fc791665e7476277758fd3093ba82cdff Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 8 Aug 2011 22:09:41 +0000 Subject: [PATCH] add business-onlinepayment-currency config setting, RT#13904 --- FS/FS/Conf.pm | 8 ++++++++ FS/FS/cust_main/Billing_Realtime.pm | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index dd80e9277..1e8833c9f 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 97e7c94eb..0156c5376 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; } -- 2.11.0