add business-onlinepayment-currency config setting, RT#13904
authorivan <ivan>
Mon, 8 Aug 2011 22:09:28 +0000 (22:09 +0000)
committerivan <ivan>
Mon, 8 Aug 2011 22:09:28 +0000 (22:09 +0000)
FS/FS/Conf.pm
FS/FS/cust_main/Billing_Realtime.pm

index b3fdfdc..e1e72e1 100644 (file)
@@ -820,6 +820,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\')',
index 91f22ee..da6b31b 100644 (file)
@@ -306,6 +306,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;
 }