in reply to Re^3: Using Modules
in thread Using Modules
and that does work... so now all I have to do is when I program each gateway, I just have to add it to the database first, figure out what type I made it then add that type to the forefront of the chargeCard subroutine name. And that will make them all dynamic, where I can use more than one at the same time... in case one gateway declines the transaction for some dumb reason other than no funds available.my ($_merid,$_mertype) = $dbh->selectrow_array(qq{SELECT `id`,`type` F +ROM `merchants` WHERE #SomeWhereStatement#}); require "/path/to/modules/$_mertype.conf"; my $_subvar = $_mertype . "chargeCard"; my $cardCharged = &$_subvar($_merid);
|
|---|