[freeside-commits] branch FREESIDE_4_BRANCH updated. 14be094b5656a1c460afc1670b6765549630676a
Ivan Kohler
ivan at freeside.biz
Wed Feb 13 10:02:51 PST 2019
The branch, FREESIDE_4_BRANCH has been updated
via 14be094b5656a1c460afc1670b6765549630676a (commit)
from 24c2d0b0530f4ffc09ca3a474aa756d3fffda499 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 14be094b5656a1c460afc1670b6765549630676a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 13 10:02:50 2019 -0800
restore fallback to customer billing address for CC transactions, RT#77641, RT#71513
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index 09f4d25be..d190c2e20 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -361,14 +361,23 @@ sub _bop_content {
$content{name} = $payname if $payname;
- $content{address} = $options->{'address1'};
- my $address2 = $options->{'address2'};
- $content{address} .= ", ". $address2 if length($address2);
-
- $content{city} = $options->{'city'};
- $content{state} = $options->{'state'};
- $content{zip} = $options->{'zip'};
- $content{country} = $options->{'country'};
+ if ( exists($options->{'address1'}) ) {
+
+ $content{address} = $options->{'address1'};
+ my $address2 = $options->{'address2'};
+ $content{address} .= ", ". $address2 if length($address2);
+
+ $content{$_} = $options->{$_} foreach qw( city state zip country );
+
+ } elsif ( ref($self) ) {
+
+ $content{address} = $self->address1;
+ my $address2 = $self->address2;
+ $content{address} .= ", ". $address2 if length($address2);
+
+ $content{$_} = $self->$_() foreach qw( city state zip country );
+
+ }
# can't set phone if called as class method
$content{phone} = $self->daytime || $self->night
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Billing_Realtime.pm | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
More information about the freeside-commits
mailing list