I have installed the Authorize.net library in Magento using composer. Now, this library is available in the vendor directory but I don't have any idea how to use it in my custom module. The directory structure of Authorize.net in the vendor directory. authorize.net structure in vendor directory

1 Answer 1


Namespace of that library should be available in the composer.json. I don't have Authorize.net, so below is an example from the Monolog:

"autoload": {
    "psr-4": {"Monolog\\": "src/Monolog"}

In this case you can use Logger class from src/Logger directory as: Monolog\Logger

Same should work for the Authorize.net

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.