Recently, I have faced this problem. After trying some days later, I have success. I will mention those steps as:
Step-1: At first install composer in your system. Follow this link for composer->http://getcomposer.org/
Step-2: Install Omnipay in your system according to this instruction https://github.com/adrianmacneil/omnipay#installation
Step-3: Create a composer.json file in your root directory. And paste this code in it
{
"require": {
"omnipay/omnipay": "*"
}
}
Step-4: Then install curl in your system using this command
curl -s http://getcomposer.org/installer | php
Step-5: Update composer using:
php composer.phar update
Step-6: Include the composer autoloader. Just add this line to the top of your index file file:
require_once __DIR__./vendor/autoload.php';
Step-7: If it not works provide the 0777 file permission.
sudo chmod -R 0777 your_directory
Even
rm -rf vendor/
and then re-run composer update too.
I hope this will work.For any further problem follow:
- http://philsturgeon.co.uk/blog/2012/05/composer-with-codeigniter
- CodeIgniter + omnipay installation
I hope you will success like as me.
Warning: Do not miss to add the ominipay controller and library to your controller and library.