Accessing PHP library in CI4 |
this looks like its about namespaces by the way i came across a nifty check using spark
cd to root of app and run from command line: Code: php spark namespaces thats tells you what namespaces can be found. on the Code: require_once('libwebtopay/WebToPay.php'); CI4 uses as far as i can see 2 ways to find classes, if you use composer to get software it automatically loads if not you add entries to app/Config/Autoload.php Now i use PHPmailer and had a similar problem. First i told CI4 where to find classes via $psr4 in Autoload, then there are several classes so i listed them all in the controller: use PHPMailer\PHPMailer\OAuth; use PHPMailer\PHPMailer\Exception; use .. you see that Exception class for PHPMailer, i think you have an exception class in your webpay which it needs to have access to: Do you have a link to the webpay so i can have a look ? Also always interested in 3rd party stuff i might be able to use! |
Messages In This Thread |
Accessing PHP library in CI4 - by Hexes - 10-27-2020, 04:06 PM
RE: Accessing PHP library in CI4 - by paulbalandan - 10-27-2020, 11:14 PM
RE: Accessing PHP library in CI4 - by Hexes - 10-28-2020, 02:14 AM
RE: Accessing PHP library in CI4 - by captain-sensible - 10-28-2020, 03:01 AM
RE: Accessing PHP library in CI4 - by Hexes - 10-28-2020, 07:21 AM
RE: Accessing PHP library in CI4 - by captain-sensible - 10-28-2020, 09:14 AM
RE: Accessing PHP library in CI4 - by paulbalandan - 10-28-2020, 10:04 AM
|