summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cust_main.pm23
1 files changed, 10 insertions, 13 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index deb14ae0c..479b19a4a 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -2159,20 +2159,17 @@ sub realtime_refund_bop {
$payname = "$payfirst $paylast";
}
- if ( $method eq 'CC' ) {
-
- $content{card_number} = $self->payinfo;
- $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
- $content{expiration} = "$2/$1";
+ if ( $method eq 'CC' ) {
- #$content{cvv2} = $self->paycvv
- # if defined $self->dbdef_table->column('paycvv')
- # && length($self->paycvv);
-
- #$content{recurring_billing} = 'YES'
- # if qsearch('cust_pay', { 'custnum' => $self->custnum,
- # 'payby' => 'CARD',
- # 'payinfo' => $self->payinfo, } );
+ if ( $cust_pay ) {
+ $content{card_number} = $cust_pay->payinfo;
+ #$self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
+ #$content{expiration} = "$2/$1";
+ } else {
+ $content{card_number} = $self->payinfo;
+ $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
+ $content{expiration} = "$2/$1";
+ }
} elsif ( $method eq 'ECHECK' ) {
( $content{account_number}, $content{routing_code} ) =