add eway as an agent payment gateway, RT#71906, update list of gateways from http...
[freeside.git] / httemplate / edit / payment_gateway.html
index 37618d6..b44b315 100644 (file)
@@ -39,7 +39,7 @@
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
-my $json = JSON::XS->new;
+my $json = Cpanel::JSON::XS->new;
 $json->canonical(1);
 my %modules = (
   'Business::OnlinePayment' => [
@@ -47,27 +47,36 @@ my %modules = (
     'AuthorizeNet',
     'BankOfAmerica', #deprecated?
     'Beanstream',
+    'Braintree',
     'Capstone',
+    'CardFortress',
     'Cardstream',
     'CashCow',
     'CyberSource',
     'eSec',
     'eSelectPlus',
     'ElavonVirtualMerchant',
+    'eWay',
     'Exact',
+    'FirstDataGlobalGateway',
+    'GlobalPayments',
     'iAuthorizer',
     'Ingotz',
     'InternetSecure',
-    'IPaymentTPG',
+    #'IPaymentTPG',
     'IPPay',
     'Iridium',
     'Jettis',
     'Jety',
     'LinkPoint',
+    'Litle',
     'MerchantCommerce',
     'Network1Financial',
+    'NMI',
     'OCV',
+    'Ogone',
     'OpenECHO',
+    'PaperlessTrans',
     'PayConnect',
     'PayflowPro',
     'PaymenTech',
@@ -83,24 +92,30 @@ my %modules = (
     'Skipjack',
     'StGeorge',
     'SurePay',
+    'SynapseGateway',
     'TCLink',
     'TransactionCentral',
     'TransFirsteLink',
+    'USAePay',
     'Vanco',
     'viaKLIX',
     'VirtualNet',
+    'vSecureProcessing',
     'WesternACH',
     'WorldPay',
   ],
   'Business::OnlineThirdPartyPayment' => [
     #'eWayShared', support currently broken
-    #'Interswitchng',
-    'PayPal',
     'FCMB',
+    #'Interswitchng', #incomplete?
+    'PayPal',
   ],
   'Business::BatchPayment' => [
+    'BillBuddy',
+    'CardFortress',
     'KeyBank',
     'Paymentech',
+    'RBC',
     'TD_EFT',
   ],
 );
@@ -111,8 +126,7 @@ my @actions = (
                 'Authorization Only,Post Authorization',
               );
 
-my $fields = [
-               {
+my $fields = [ {
                  field               => 'gateway_namespace',
                  type                => 'select',
                  options             => [ qw(
@@ -131,7 +145,7 @@ my $fields = [
                  field    => 'gateway_module',
                  type     => 'select',
                  # does it even make sense to list all modules here?
-                 options  => [ sort { lc($a) cmp lc ($b) }
+                 options  => [ sort { lc($a) cmp lc($b) }
                                map { @$_ } values %modules ],
                },
                'gateway_username',
@@ -165,8 +179,11 @@ my $fields = [
 my $field_callback = sub {
   my ($cgi, $object, $field_hashref ) = @_;
   if ($object->gatewaynum) {
-    if ( $field_hashref->{field} =~ /gateway_(module|namespace)/ ) {
+    if ( $field_hashref->{field} eq 'gateway_module' ) {
+      $field_hashref->{type} = 'fixed';
+    } elsif ( $field_hashref->{field} eq 'gateway_namespace' ) {
       $field_hashref->{type} = 'fixed';
+      $field_hashref->{formatted_value} = $object->namespace_description;
     }
   }
 };