X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Ffreeswitch_nibblebill.pm;h=921444596514fa9079fa2c5763fa43c47c11ae6f;hp=6611f7827afcf952499339d99d3e1494d1689f41;hb=fcce61390d750f98bd82e84d4664ae9c03202be2;hpb=83eb68cd59af488d57c23b653f44a7ae9aa4a753 diff --git a/FS/FS/part_export/freeswitch_nibblebill.pm b/FS/FS/part_export/freeswitch_nibblebill.pm index 6611f7827..921444596 100644 --- a/FS/FS/part_export/freeswitch_nibblebill.pm +++ b/FS/FS/part_export/freeswitch_nibblebill.pm @@ -3,7 +3,7 @@ use base qw( FS::part_export ); use vars qw( %info ); # $DEBUG ); use Tie::IxHash; -use DBI; +use FS::DBI; #use FS::Record qw( qsearch ); #qsearchs ); #use FS::svc_phone; #use FS::Schema qw( dbdef ); @@ -61,7 +61,8 @@ sub _export_insert { sub nibblebill_insert { my($datasrc, $username, $password, $phonenum, $amount) = @_; - my $dbh = DBI->connect($datasrc, $username, $password) or die $DBI::errstr; + my $dbh = FS::DBI->connect($datasrc, $username, $password) + or die $FS::DBI::errstr; #check for existing account $dbh->{FetchHashKeyName} = 'NAME_lc'; @@ -119,7 +120,8 @@ sub _adjust { sub nibblebill_adjust_cash { my($datasrc, $username, $password, $phonenum, $amount) = @_; - my $dbh = DBI->connect($datasrc, $username, $password) or die $DBI::errstr; + my $dbh = FS::DBI->connect($datasrc, $username, $password) + or die $FS::DBI::errstr; my $sth = $dbh->prepare('UPDATE accounts SET cash = cash + ? WHERE id = ?') or die $dbh->errsrr; @@ -129,8 +131,8 @@ sub nibblebill_adjust_cash { sub export_getstatus { my( $self, $svc_phone, $htmlref, $hashref ) = @_; - my $dbh = DBI->connect( map $self->option($_), qw( datasrc username password ) ) - or return $DBI::errstr; + my $dbh = FS::DBI->connect( map $self->option($_), qw( datasrc username password ) ) + or return $FS::DBI::errstr; my $sth = $dbh->prepare('SELECT cash FROM accounts WHERE id = ?') or return $dbh->errstr;