diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-14 03:10:06 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-14 03:10:06 -0800 |
commit | efdd51f41e878349a942b0cb97e97e9feda1b3f0 (patch) | |
tree | 9367f256c61507078f180de0f6ddb476856c5676 | |
parent | 092990ee23947a1f7e893a72f38ce8923ca3b8ea (diff) |
ensure realtime_bop can properly use transactions for its state
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 6c75fe9..330a454 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -3,6 +3,7 @@ package FS::cust_main::Billing_Realtime; use strict; use vars qw( $conf $DEBUG $me ); use vars qw( $realtime_bop_decline_quiet ); #ugh +use Carp; use Data::Dumper; use Business::CreditCard 0.28; use FS::UID qw( dbh ); @@ -319,6 +320,10 @@ my %bop_method2payby = ( sub realtime_bop { my $self = shift; + confess "Can't call realtime_bop within another transaction ". + '($FS::UID::AutoCommit is false)' + unless $FS::UID::AutoCommit; + local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG; my %options = (); |