Reputation: 67
I am trying to using omnipay for implementing online payment.
I have read several article on this topic. Also, I have read the omnipay documentation on github. But I could not understand, how can I implement it ?
Because, The documentation is not clear to me.
Is there any good article on it ?
Upvotes: 3
Views: 2835
Reputation: 3105
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:
I hope you will success like as me. Warning: Do not miss to add the ominipay controller and library to your controller and library.
Upvotes: 4