From e74b34488a2a8a192ee2bea7030ecde462645290 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 18 Aug 2005 05:12:02 +0000 Subject: oops another missing file --- httemplate/edit/process/payment_gateway.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 httemplate/edit/process/payment_gateway.html (limited to 'httemplate/edit/process/payment_gateway.html') diff --git a/httemplate/edit/process/payment_gateway.html b/httemplate/edit/process/payment_gateway.html new file mode 100644 index 000000000..0fc5b66c6 --- /dev/null +++ b/httemplate/edit/process/payment_gateway.html @@ -0,0 +1,28 @@ +<% + +my $gatewaynum = $cgi->param('gatewaynum'); + +my $old = qsearchs('payment_gateway',{'gatewaynum'=>$gatewaynum}) if $gatewaynum; + +my $new = new FS::payment_gateway ( { + map { + $_, scalar($cgi->param($_)); + } fields('payment_gateway') +} ); + +my $error; +if ( $gatewaynum ) { + $error=$new->replace($old); +} else { + $error=$new->insert; + $gatewaynum=$new->getfield('gatewaynum'); +} + +if ( $error ) { + $cgi->param('error', $error); + print $cgi->redirect(popurl(2). "payment_gateway.html?". $cgi->query_string ); +} else { + print $cgi->redirect(popurl(3). "browse/payment_gateway.html"); +} + +%> -- cgit v1.2.1 From 452dc46f00628a3628f839b1af70e0f9295246e7 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 13 Dec 2005 03:13:25 +0000 Subject: fix options in gateway adding --- httemplate/edit/process/payment_gateway.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process/payment_gateway.html') diff --git a/httemplate/edit/process/payment_gateway.html b/httemplate/edit/process/payment_gateway.html index 0fc5b66c6..b9e4d47da 100644 --- a/httemplate/edit/process/payment_gateway.html +++ b/httemplate/edit/process/payment_gateway.html @@ -10,11 +10,16 @@ my $new = new FS::payment_gateway ( { } fields('payment_gateway') } ); +my @options = split(/\r?\n/, $cgi->param('gateway_options') ); +pop @options + if scalar(@options) % 2 && $options[-1] =~ /^\s*$/; +my %options = @options; + my $error; if ( $gatewaynum ) { $error=$new->replace($old); } else { - $error=$new->insert; + $error=$new->insert(\%options); $gatewaynum=$new->getfield('gatewaynum'); } -- cgit v1.2.1