summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2005-03-13 11:34:45 +0000
committerivan <ivan>2005-03-13 11:34:45 +0000
commitc62991706722410987b249893f1323b4ba0e7a5f (patch)
tree8d6cb7358f299e4269321e916dfe351545d862f0
parente28cba4f7305371968c96cfc57697221a58bc8cc (diff)
when refunding against a specific card payment, use the card details from the payment instead of the customer record
-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} ) =