payment link request refactoring

This commit is contained in:
ragu 2024-02-15 10:43:10 +01:00
parent 6212b1aefb
commit addf1ab6db
13 changed files with 227 additions and 194 deletions

View file

@ -27,6 +27,7 @@ use Mod::DBtank;
use Mod::Callib;
use Mod::Basework;
use Mod::Pricing;
use Mod::Payment;
use Mod::MailTransport;
use Data::Dumper;
use Sys::Hostname;
@ -37,6 +38,7 @@ my $dbt = new DBtank;
my $cal = new Callib;
my $bw = new Basework;
my $pri = new Pricing;
my $pay = new Payment;
my $mailtrans = new MailTransport;
sub new {
@ -3009,7 +3011,7 @@ sub auth_verify(){
#first prepaid account check (not save because without rental history)
if($auth_primary->{int03} == 3){
my $prepaidhash = { prepaid_total => 0 };
$prepaidhash = $pri->collect_prepaid($dbh_primary,$auth_primary) if($auth_primary->{c_id});
$prepaidhash = $pay->collect_prepaid($dbh_primary,$auth_primary) if($auth_primary->{c_id});
if(!$prepaidhash->{prepaid_total} || $prepaidhash->{prepaid_total} < 0){
my $vde = $auth_primary->{int12} || 1;
$update_primary->{int12} = $vde;