X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpayment_gateway.html;h=dfe52f109b49fa490b5a1c0b424f6a8c433a8bf9;hb=e513d7cb331d7c7d99d1ea7b5f0a5f8e08e0d725;hp=a9909c3655c4b80ac6fb32cdbf6c2f737fcfca6e;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git
diff --git a/httemplate/edit/payment_gateway.html b/httemplate/edit/payment_gateway.html
index a9909c365..dfe52f109 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>
@@ -48,6 +48,7 @@ my %modules = (
'CyberSource' => 'Business::OnlinePayment',
'eSec' => 'Business::OnlinePayment',
'eSelectPlus' => 'Business::OnlinePayment',
+ 'eWayShared' => 'Business::OnlineThirdPartyPayment',
'ElavonVirtualMerchant' => 'Business::OnlinePayment',
'Exact' => 'Business::OnlinePayment',
'iAuthorizer' => 'Business::OnlinePayment',
@@ -87,28 +88,44 @@ 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',
'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',
@@ -117,10 +134,16 @@ my $fields = [
type => 'select',
options => \@actions,
},
- 'gateway_callback_url',
+ {
+ field => 'gateway_callback_url',
+ type => 'text',
+ size => 40,
+ },
{
field => 'gateway_options',
type => 'textarea',
+ rows => '12',
+ cols => '40',
curr_value_callback => sub { my($cgi, $object, $fref) = @_;
join("\r", $object->options );
},
@@ -130,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';
}
}