X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpayment_gateway.html;h=2840df35bc52e8110d0a94b0ef46f4fecbe52a33;hb=92aedddd3684167abb60cd3f1d77bbc156c592e6;hp=4c7bae1726130d92e49bec291475ad10d9f33ae8;hpb=40a1170d519ad54a029c8306881a06c56cd9506a;p=freeside.git diff --git a/httemplate/edit/payment_gateway.html b/httemplate/edit/payment_gateway.html index 4c7bae172..2840df35b 100644 --- a/httemplate/edit/payment_gateway.html +++ b/httemplate/edit/payment_gateway.html @@ -5,12 +5,13 @@ 'fields' => $fields, 'field_callback' => $field_callback, 'labels' => { - 'gatewaynum' => 'Gateway #', + 'gatewaynum' => 'Gateway', + 'gateway_namespace' => 'Gateway type', 'gateway_module' => 'Gateway', 'gateway_username' => 'Username', 'gateway_password' => 'Password', 'gateway_action' => 'Action', - 'gateway_options' => 'Options: (Name/Value pairs, one element per line)', + 'gateway_options' => 'Options (Name/Value pairs,
one element per line)', 'gateway_callback_url' => 'Callback URL', }, ) @@ -18,18 +19,18 @@ <%init> @@ -38,72 +39,91 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my %modules = ( - '2CheckOut' => 'Business::OnlinePayment', - 'AuthorizeNet' => 'Business::OnlinePayment', - 'BankOfAmerica' => 'Business::OnlinePayment', #deprecated? - 'Beanstream' => 'Business::OnlinePayment', - 'Capstone' => 'Business::OnlinePayment', - 'Cardstream' => 'Business::OnlinePayment', - 'CashCow' => 'Business::OnlinePayment', - 'CyberSource' => 'Business::OnlinePayment', - 'eSec' => 'Business::OnlinePayment', - 'eSelectPlus' => 'Business::OnlinePayment', - 'Exact' => 'Business::OnlinePayment', - 'iAuthorizer' => 'Business::OnlinePayment', - 'Ingotz' => 'Business::OnlinePayment', - 'InternetSecure' => 'Business::OnlinePayment', - 'Interswitchng' => 'Business::OnlineThirdPartyPayment', - 'IPaymentTPG' => 'Business::OnlinePayment', - 'IPPay' => 'Business::OnlinePayment', - 'Iridium' => 'Business::OnlinePayment', - 'Jettis' => 'Business::OnlinePayment', - 'LinkPoint' => 'Business::OnlinePayment', - 'MerchantCommerce' => 'Business::OnlinePayment', - 'Network1Financial' => 'Business::OnlinePayment', - 'OCV' => 'Business::OnlinePayment', - 'OpenECHO' => 'Business::OnlinePayment', - 'PayConnect' => 'Business::OnlinePayment', - 'PayflowPro' => 'Business::OnlinePayment', - 'PaymenTech' => 'Business::OnlinePayment', - 'PaymentsGateway' => 'Business::OnlinePayment', - 'PayPal' => 'Business::OnlinePayment', - 'PlugnPay ' => 'Business::OnlinePayment', - 'PPIPayMover ' => 'Business::OnlinePayment', - 'Protx ' => 'Business::OnlinePayment', - 'PXPost' => 'Business::OnlinePayment', - 'SecureHostingUPG' => 'Business::OnlinePayment', - 'Skipjack' => 'Business::OnlinePayment', - 'StGeorge' => 'Business::OnlinePayment', - 'SurePay' => 'Business::OnlinePayment', - 'TCLink' => 'Business::OnlinePayment', - 'TransactionCentral' => 'Business::OnlinePayment', - 'TransFirsteLink' => 'Business::OnlinePayment', - 'Vanco' => 'Business::OnlinePayment', - 'viaKLIX' => 'Business::OnlinePayment', - 'VirtualNet' => 'Business::OnlinePayment', - 'WesternACH' => 'Business::OnlinePayment', -); + '2CheckOut' => 'Business::OnlinePayment', + 'AuthorizeNet' => 'Business::OnlinePayment', + 'BankOfAmerica' => 'Business::OnlinePayment', #deprecated? + 'Beanstream' => 'Business::OnlinePayment', + 'Capstone' => 'Business::OnlinePayment', + 'Cardstream' => 'Business::OnlinePayment', + 'CashCow' => 'Business::OnlinePayment', + 'CyberSource' => 'Business::OnlinePayment', + 'eSec' => 'Business::OnlinePayment', + 'eSelectPlus' => 'Business::OnlinePayment', + 'eWayShared' => 'Business::OnlineThirdPartyPayment', + 'ElavonVirtualMerchant' => 'Business::OnlinePayment', + 'Exact' => 'Business::OnlinePayment', + 'iAuthorizer' => 'Business::OnlinePayment', + 'Ingotz' => 'Business::OnlinePayment', + 'InternetSecure' => 'Business::OnlinePayment', + 'Interswitchng' => 'Business::OnlineThirdPartyPayment', + 'IPaymentTPG' => 'Business::OnlinePayment', + 'IPPay' => 'Business::OnlinePayment', + 'Iridium' => 'Business::OnlinePayment', + 'Jettis' => 'Business::OnlinePayment', + 'Jety' => 'Business::OnlinePayment', + 'LinkPoint' => 'Business::OnlinePayment', + 'MerchantCommerce' => 'Business::OnlinePayment', + 'Network1Financial' => 'Business::OnlinePayment', + 'OCV' => 'Business::OnlinePayment', + 'OpenECHO' => 'Business::OnlinePayment', + 'PayConnect' => 'Business::OnlinePayment', + 'PayflowPro' => 'Business::OnlinePayment', + 'Paymentech' => 'Business::BatchPayment', + 'PaymenTech' => 'Business::OnlinePayment', + 'PaymentsGateway' => 'Business::OnlinePayment', + 'PayPal' => 'Business::OnlinePayment', + #'PaySystems' => 'Business::OnlinePayment', + 'PlugnPay' => 'Business::OnlinePayment', + 'PPIPayMover' => 'Business::OnlinePayment', + 'Protx' => 'Business::OnlinePayment', #now SagePay + 'PXPost' => 'Business::OnlinePayment', + 'SagePay' => 'Business::OnlinePayment', + 'SecureHostingUPG' => 'Business::OnlinePayment', + 'Skipjack' => 'Business::OnlinePayment', + 'StGeorge' => 'Business::OnlinePayment', + 'SurePay' => 'Business::OnlinePayment', + 'TCLink' => 'Business::OnlinePayment', + 'TransactionCentral' => 'Business::OnlinePayment', + 'TransFirsteLink' => 'Business::OnlinePayment', + 'Vanco' => 'Business::OnlinePayment', + 'viaKLIX' => 'Business::OnlinePayment', + 'VirtualNet' => 'Business::OnlinePayment', + 'WesternACH' => 'Business::OnlinePayment', + 'WorldPay' => 'Business::OnlinePayment', +); + +my %modules_for_namespace; +for (keys %modules) { + $modules_for_namespace{$modules{$_}} ||= []; + push @{ $modules_for_namespace{$modules{$_}} }, $_; +} my @actions = ( 'Normal Authorization', 'Authorization Only', - 'Authorization Only, Post Authorization', + 'Authorization Only,Post Authorization', ); my $fields = [ { field => 'gateway_namespace', - type => 'hidden', - curr_value_callback => sub { my($cgi, $object, $fref) = @_; - $modules{$object->gateway_module} - || 'Business::OnlinePayment' - }, + type => 'select', + options => [ qw( + Business::OnlinePayment + Business::BatchPayment + Business::OnlineThirdPartyPayment + ) ], + labels => { + 'Business::OnlinePayment' => 'Direct', + 'Business::BatchPayment' => 'Batch', + 'Business::OnlineThirdPartyPayment' => 'Hosted', + }, + onchange => 'changeNamespace', }, { field => 'gateway_module', type => 'select', options => [ sort { lc($a) cmp lc ($b) } keys %modules ], - onchange => 'setNamespace', }, 'gateway_username', 'gateway_password', @@ -112,10 +132,16 @@ my $fields = [ type => 'select', options => \@actions, }, - 'gateway_callback_url', + { + field => 'gateway_callback_url', + type => 'text', + size => 40, + }, { field => 'gateway_options', type => 'textarea', + rows => '8', + cols => '40', curr_value_callback => sub { my($cgi, $object, $fref) = @_; join("\r", $object->options ); }, @@ -125,7 +151,7 @@ my $fields = [ my $field_callback = sub { my ($cgi, $object, $field_hashref ) = @_; if ($object->gatewaynum) { - if ( $field_hashref->{field} eq 'gateway_module' ) { + if ( $field_hashref->{field} =~ /gateway_(module|namespace)/ ) { $field_hashref->{type} = 'fixed'; } }