projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d069ae1
)
add some additional debugging to refunds
author
ivan
<ivan>
Sun, 13 Mar 2005 11:12:19 +0000
(11:12 +0000)
committer
ivan
<ivan>
Sun, 13 Mar 2005 11:12:19 +0000
(11:12 +0000)
FS/FS/cust_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
e5748ec
..
deb14ae
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-2122,6
+2122,7
@@
sub realtime_refund_bop {
#first try void if applicable
if ( $cust_pay && $cust_pay->paid == $amount ) { #and check dates?
#first try void if applicable
if ( $cust_pay && $cust_pay->paid == $amount ) { #and check dates?
+ warn "FS::cust_main::realtime_bop: attempting void\n" if $DEBUG;
my $void = new Business::OnlinePayment( $processor, @bop_options );
$void->content( 'action' => 'void', %content );
$void->submit();
my $void = new Business::OnlinePayment( $processor, @bop_options );
$void->content( 'action' => 'void', %content );
$void->submit();
@@
-2134,10
+2135,14
@@
sub realtime_refund_bop {
warn $e;
return $e;
}
warn $e;
return $e;
}
+ warn "FS::cust_main::realtime_bop: void successful\n" if $DEBUG;
return '';
}
}
return '';
}
}
+ warn "FS::cust_main::realtime_bop: void unsuccessful, trying refund\n"
+ if $DEBUG;
+
#massage data
my $address = $self->address1;
$address .= ", ". $self->address2 if $self->address2;
#massage data
my $address = $self->address1;
$address .= ", ". $self->address2 if $self->address2;
@@
-2183,7
+2188,7
@@
sub realtime_refund_bop {
#then try refund
my $refund = new Business::OnlinePayment( $processor, @bop_options );
#then try refund
my $refund = new Business::OnlinePayment( $processor, @bop_options );
- $refund->content(
+
my %sub_content =
$refund->content(
'action' => 'credit',
'customer_id' => $self->custnum,
'last_name' => $paylast,
'action' => 'credit',
'customer_id' => $self->custnum,
'last_name' => $paylast,
@@
-2196,6
+2201,8
@@
sub realtime_refund_bop {
'country' => $self->country,
%content, #after
);
'country' => $self->country,
%content, #after
);
+ warn join('', map { " $_ => $sub_content{$_}\n" } keys %sub_content )
+ if $DEBUG > 1;
$refund->submit();
return "$processor error: ". $refund->error_message
$refund->submit();
return "$processor error: ". $refund->error_message