X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpayment_gateway.html;h=a469beb7fbde19a1a0a74c0a96027afb427eb255;hb=a7ec2c2a6b5fcc26e8da765abdf4d459cc41a20a;hp=62e35fcdb2880c9e3d07a726b4f697f3def9bd16;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/httemplate/edit/payment_gateway.html b/httemplate/edit/payment_gateway.html index 62e35fcdb..a469beb7f 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,17 @@ <%init> @@ -88,7 +88,17 @@ my %modules = ( 'VirtualNet' => 'Business::OnlinePayment', 'WesternACH' => 'Business::OnlinePayment', 'WorldPay' => 'Business::OnlinePayment', -); + + 'KeyBank' => 'Business::BatchPayment', + 'Paymentech' => 'Business::BatchPayment', + 'TD_EFT' => 'Business::BatchPayment', +); + +my %modules_for_namespace; +for (keys %modules) { + $modules_for_namespace{$modules{$_}} ||= []; + push @{ $modules_for_namespace{$modules{$_}} }, $_; +} my @actions = ( 'Normal Authorization', @@ -99,17 +109,23 @@ my @actions = ( 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', @@ -126,6 +142,8 @@ my $fields = [ { field => 'gateway_options', type => 'textarea', + rows => '12', + cols => '40', curr_value_callback => sub { my($cgi, $object, $fref) = @_; join("\r", $object->options ); }, @@ -135,7 +153,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'; } }