How to autoload third party libraries?

Hello, I´m trying to include a library for a payment module but getting grey hairs out of it.
What´s the correct way cause either I get message that says like below or I can´t set the correct path even though the files are there. I´m missing something completly I guess.
I want to include following file and library like this:

require_once ('/usr/share/php/Com/Tecnick/Barcode/autoload.php');

but as you see the path gets totally messed.



Fatal error: require_once(): Failed opening required '/home/shop/public_html/includes/library/lib_Com/Tecnick/Barcode/Barcode.inc.php' (include_path='.:/usr/share/php') in /home/shop/public_html/includes/autoloader.inc.php on line 102```

My wish is to make qr codes for Swish payment. Tested and it works just fine in setup outside Litecart.

Please show me in the right direction
/H

Yes ist´s composer. Thanks for quick reply, i´ll have a look at your links and read a bit.
Love your concept with Litecart compared to many other softwares. Logical and quick.

Regards/ H

tim

Thank you for the kind words.
I did work very hard to come up with it all :)

Hoping doing things a little different than the industry is better in the long run.

I am having the same problem, but the library is not Composer nor I can install composer on the host system.

Redsys is a credit card payment system in Spain being used by most Spanish banks (is one of two payments services).

They request the some PHP libraries and installed and to add and include command on the code.

When I do so, I get the same error;
Fatal error: require_once(): Failed opening required '.../includes/library/lib_ISOperationMessage.inc.php' (include_path='.:/usr/lib/php7.4') in /.../includes/autoloader.inc.php on line 102

How can I add this Third-Party library?

تم إغلاق هذا الموضوع بسبب عدم النشاط لفترة طويلة، ولا يمكن إرسال المشاركات إليه.
عرض الكود على GitHub