How can Omnipay be integrated with CodeIgniter? |
I have previously utilized ci-merchant, but based on my research, it appears that ci-merchant's "V2" has transitioned into omnipay. As a user of CodeIgniter, I am currently facing difficulties in getting the provided example to function properly.
To address this issue, I have successfully installed omnipay without any complications. In my controller, I have implemented the following code: use Omnipay\Common\GatewayFactory; class Homepage extends BC_basecontroller { public function index() { $gateway = GatewayFactory::create('PayPal_Express'); $gateway->setUsername('adrian'); $gateway->setPassword('12345'); } } This code snippet aligns with the example provided in the GitHub repository for omnipay, which can be found at https://github.com/adrianmacneil/omnipay. However, upon execution, I encounter the following error: PHP Fatal error: Class 'Omnipay\Common\GatewayFactory' not found in...... If anyone has any insights on how to resolve this issue and successfully integrate omnipay within the CodeIgniter framework, I would greatly appreciate your assistance. |
Welcome Guest, Not a member yet? Register Sign In |