projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d7135a6
)
save changes to credit card billing address, #940
author
Mark Wells
<mark@freeside.biz>
Thu, 21 Feb 2013 00:48:48 +0000
(16:48 -0800)
committer
Mark Wells
<mark@freeside.biz>
Thu, 21 Feb 2013 00:48:48 +0000
(16:48 -0800)
httemplate/misc/process/payment.cgi
patch
|
blob
|
history
diff --git
a/httemplate/misc/process/payment.cgi
b/httemplate/misc/process/payment.cgi
index
506e266
..
981614e
100644
(file)
--- 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( '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")
my $error = $new->replace($cust_main);
errorpage("payment processed successfully, but error saving info: $error")