This repository contains a paystack package for bagisto v2.0
This package integrates the Paystack payment gateway into Bagisto, allowing for seamless online payments.
Follow these steps to install and configure the Paystack payment gateway package in Bagisto:
-
Clone the repository to your local machine: git clone https://github.com/your-username/bagisto-paystack.git
-
Upload the package to your Bagisto project directory: cp -r bagisto-paystack /path/to/bagisto/packages/webkul
-
Navigate to your Bagisto project directory: cd /path/to/bagisto
-
Install the package dependencies using Composer: composer install
-
in your composer.json add this code to it under autoload psr-4 array
"Webkul\\Paystack\\": "packages/Webkul/Paystack/src", -
Register your service provider in the config/app.php file, also located in the Bagisto root directory:
<?php return [ // Other configuration options 'providers' => ServiceProvider::defaultProviders()->merge([ // Other service providers Webkul\Paystack\Providers\PaystackServiceProvider::class, ])->toArray(), // Other configuration options ]; -
In the config/bagisto-vite.php file, add the following line under the ‘viters’ section:
'paystack' => [ 'hot_file' => 'paystack-vite.hot', 'build_directory' => 'themes/paystack/build', 'package_assets_directory' => 'src/Resources/assets', ], -
Go to
app/Http/Middleware/VerifyCsrfToken.phpfile and add the following line under‘$except’variables.protected $except = [ 'checkout/cyber-paystack/*', ];
After making these changes, run the following commands:
composer dump-autoload
php artisan config:cache
- Configure your Paystack API keys in the
.envfile:
PAYSTACK_SECRET_KEY=secretkey
PAYSTACK_PAYMENT_URL=https://api.paystack.co
MERCHANT_EMAIL=
- You`re all set! Log in to your Bagisto admin panel and configure the Paystack payment gateway under the Payment Methods section.
## Support
If you encounter any issues or have questions, feel free to reach out to us at redconetech@gmail.com.
## Contributing
We welcome contributions to improve this package. Fork the repository, make your changes, and submit a pull request.
Happy selling with Paystack on Bagisto!