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 ?
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.
Related
I'm following this video tutorial (in spanish), which shows how to implement Jetstream with Bootstrap instead of Tailwinds: https://www.youtube.com/watch?v=Wt-OuBX6lEc&list=PLZ2ovOgdI-kWWS9aq8mfUDkJRfYib-SvF&index=31
The issue is this one: despite I've followed the steps strictly, I'm getting two important errors.
First of all, I should have a file named "app.css" into my folder "/public/css", but I don't. I don't have even a folder named 'css' into the 'public' directory, neither another lots of folders I should.
On the other hand, both my welcome view and my register view look ugly, like this:
The commands I've done are these ones:
Into:
leandro#leandro-Lenovo-B50-10:/var/www/html$
laravel new bootstrap --jet
cd bootstrap
Then,into:
leandro#leandro-Lenovo-B50-10:/var/www/html/bootstrap$
composer require nascent-africa/jetstrap --dev
php artisan jetstrap:swap livewire
npm install
npm run dev
php artisan migrate
sudo chmod -R 777 .
Also, the register view shows an error, unless I have activated VITE (with npm run dev).
Somewhere, I had to do a 'php artisan migrate:fresh', because a migration error.
I'm running the project into an Apache server.
I'm using:
Linux Mint 21 Vanessa
Apache/2.4.52 (Ubuntu)
PHP 8.2.1
Laravel v9.50.2
Does anyone have an idea of what's going wrong? It might be a conflict version, since I'm using Laravel 9, while the video is explained for Laravel 8.
I don't know if there's any additional information needed.
Thanks a lot!
Just tried to run a composer dump-autoload, but ended up with the following error, which I have never had previously
Class UpdateHelper\ComposerPlugin contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Composer\Plugin\PluginInterface::deactivate, Composer\Plugin\PluginInterface::uninstall) in /var/www/vhosts/example.com/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php on line 11
Searched on G to find some answers, but found nothing even remotely close the problem I am having here.
Any suggestions?
I just found a solution to this problem. Here it is for those who have the same problem.
I have had to delete the directory kylekatarnls located inside my vendor directory then run composer update --prefer-source and after that composer dump-autoload.
Now all is working just fine.
It seems like you're using Composer v2. If so, read on...
Composer v2 adds some new functions to their Plugin interface (namely deactivate() and uninstall())
However kylekatarnls/update-helper < v1.2.1 is implementing said interface but does not implement the new functions.
So to fix, you'll need to update kylekatarnls/update-helper to the latest (v1.2.1 at time of writing), which contains a fix (implements the missing methods):
composer update kylekatarnls/update-helper
I remove the vendor directory and the composer.lock file. After execute composer install and all works well.
Downgrade Composer to version 1 worked for me.
composer self-update 1.10.22
rm -rf vendor
composer install
This worked for me:
rm -rf vendor
rm -f composer.lock
composer install
Please delete or change name the directory "kylekatarnls" and composer update
1, mv kylekatarnls kylekatarnls_bk or rm -rf kylekatarnls
2, composer update
=> Success
when I run composer-self-update in Openshift I get the error below. I searched for a while but couldn't understand the solutions properly like this one - How can I composer update on OpenShift?
[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: the "/var/lib/openshift/.cartridge_repository/redhat-php/0.0.28/usr/bin/composer.phar" file could not be written
The answer in the question you linked does a pretty good job of explaining it if you follow the links, but I'm happy to try and explain it further for you.
Openshift supports action hooks which are scripts that are triggered to run at the appropriate git phase that you link them to.
To use the solution they suggest, you need to:
First; create a directory called .openshift/action_hooks inside the root directory of your project (e.g mkdir .openshift/action_hooks) - by placing it in the root directory it would map like this myproject/.openshift/action_hooks
Second; you now need to create a bash script called post_deploy inside the action_hooks directory that contains the following:
#!/bin/bash
export MY_PHPCOMPOSER=$OPENSHIFT_DATA_DIR/composer.phar
# if composer not exists, download
if [ ! -f $MY_PHPCOMPOSER ]; then
cd $OPENSHIFT_DATA_DIR
echo "Downloading composer..."
php -r "readfile('https://getcomposer.org/installer');" | php
fi
$MY_PHPCOMPOSER -n -q self-update
cd $OPENSHIFT_REPO_DIR
# install
php -dmemory_limit=1G $MY_PHPCOMPOSER install
You should now have a script that maps like this in your project; myproject/.openshift/action_hooks/post_deploy
Now every time you push to your repo in openshift it will execute that script and effectively run composer install.
If you have any trouble then be sure to check out the comments on that answer for a local permissions change you may need to make.
If you get stuck along the way then please comment or ask a new question and we can help you work through it.
I installed laravel and composer and created my first project in laravel. I want to integrate stripe using PHP. When I try to execute my first project in localhost I take this message:
Fatal error: Class 'Stripe\Stripe' not found in C:\xampp\htdocs\laravel\stripe\public\elda.php on line 21
To include the stripe libraries, I inserted inside the composer.json file the code from the API library for PHP. Here is an image of my composer.json file:
I run composer install in cmd and this is the output:
You may be getting outdated dependencies. Run update to update them.
I run composer update and the output is the error in the image below:
Can someone help me to solve this error?
Well, sorry did not make a comment of your post, but I have not enough points to do so. But you need to run composer install in the terminal after that includes a new package.
I had the same issue, but when I ran this command my issue is resolved.
composer require stripe/stripe-php
I hope this may help you, after you update your composer.
I'm a Ubuntu/git/composer noob, and I'm trying to follow the installation instructions here.
After running the php artisan config:publish loic-sharma/profiler command I get the following error:
PHP Fatal error: Class 'Profiler\ProfilerServiceProvider' not found in /var/www/epcr/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 158
I'm assuming the problem is that I haven't downloaded the code, but I'm not exactly sure how to go about doing that.
Most packages require you to manually add service provider in app/config/app.php. There is an array of providers inside.
Some providers require also facade alias.
So take a look at documentation, if it is provider, then it should be documented.
e.g.
'Miro\JSONSuite\JSONSuiteServiceProvider'
Try running composer dump-autoload
I needed to run composer update after I added the require to my composer.json file. After that I had a few permissions I needed to update and it worked after that.