summaryrefslogtreecommitdiff
path: root/httemplate/misc/process
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-02-20 20:10:34 -0800
committerIvan Kohler <ivan@freeside.biz>2013-02-20 20:10:34 -0800
commit4a473190250bb7fe9108d64693fc4d6e451f707b (patch)
tree506cbe00e47a463e8d117c7d1a78bc3fad782c30 /httemplate/misc/process
parentefb0128d8e8737a78224831535b44342d0660a23 (diff)
parentf00c16b7e3e6306723ea8b3029e061cff100b901 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r--httemplate/misc/process/payment.cgi10
1 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 506e26684..981614e76 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -210,7 +210,15 @@ if ( $cgi->param('save') ) {
$new->set( 'paycvv' => '');
}
- $new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}};
+ if ( $payby eq 'CARD' ) {
+ my $bill_location = FS::cust_location->new;
+ $bill_location->set( $_ => $cgi->param($_) )
+ foreach @{$payby2fields{$payby}};
+ $new->set('bill_location' => $bill_location);
+ # will do nothing if the fields are all unchanged
+ } else {
+ $new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}};
+ }
my $error = $new->replace($cust_main);
errorpage("payment processed successfully, but error saving info: $error")