diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-13 21:33:58 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-13 21:33:58 -0800 |
commit | 092990ee23947a1f7e893a72f38ce8923ca3b8ea (patch) | |
tree | 42e823a00f7929ed1e9c22ed05533f9a9374328f | |
parent | 5f4452d8d9cfe03330e3dc1da529ff6cf0f65882 (diff) |
add debugging, RT#32857
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 11 |
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 8285cbfdf..6c75fe950 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -360,6 +360,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; } @@ -542,7 +544,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 @@ -593,9 +597,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 ); |