summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2005-12-13 03:13:25 +0000
committerivan <ivan>2005-12-13 03:13:25 +0000
commit452dc46f00628a3628f839b1af70e0f9295246e7 (patch)
tree707a213257b62cf716a4f4e63fc4d385f7f64c2e
parentb8ba3708111342732addb80c21e0f05838a53337 (diff)
fix options in gateway adding
-rw-r--r--httemplate/edit/process/payment_gateway.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/edit/process/payment_gateway.html b/httemplate/edit/process/payment_gateway.html
index 0fc5b66..b9e4d47 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');
}