summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-01-13 21:34:00 -0800
committerIvan Kohler <ivan@freeside.biz>2015-01-13 21:34:00 -0800
commit3737dfd3e904c8b309ab6f773205d1bdc1ab2d5c (patch)
treec237e2280a144f149db5ddbfdcbc560740323bc7 /FS
parente41904a3e2d5d8c9f0d178126420eeb9dd33c39c (diff)
add debugging, RT#32857
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main/Billing_Realtime.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index 6e89f71b8..a0b32edf1 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -364,6 +364,8 @@ sub realtime_bop {
if ( $DEBUG ) {
warn "$me realtime_bop (new): $options{method} $options{amount}\n";
warn " cc_surcharge = $cc_surcharge\n";
+ }
+ if ( $DEBUG > 2 ) {
warn " $_ => $options{$_}\n" foreach keys %options;
}
@@ -546,7 +548,9 @@ sub realtime_bop {
? $options{'balance'}
: $self->balance;
+ warn "claiming mutex on customer ". $self->custnum. "\n" if $DEBUG > 1;
$self->select_for_update; #mutex ... just until we get our pending record in
+ warn "obtained mutex on customer ". $self->custnum. "\n" if $DEBUG > 1;
#the checks here are intended to catch concurrent payments
#double-form-submission prevention is taken care of in cust_pay_pending::check
@@ -597,9 +601,16 @@ sub realtime_bop {
};
$cust_pay_pending->payunique( $options{payunique} )
if defined($options{payunique}) && length($options{payunique});
+
+ warn "inserting cust_pay_pending record for customer ". $self->custnum. "\n"
+ if $DEBUG > 1;
my $cpp_new_err = $cust_pay_pending->insert; #mutex lost when this is inserted
return $cpp_new_err if $cpp_new_err;
+ warn "inserted cust_pay_pending record for customer ". $self->custnum. "\n"
+ if $DEBUG > 1;
+ warn Dumper($cust_pay_pending) if $DEBUG > 2;
+
my( $action1, $action2 ) =
split( /\s*\,\s*/, $payment_gateway->gateway_action );