Download the PHP package softscholar/laravel-payments without Composer
On this page you can find all versions of the php package softscholar/laravel-payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download softscholar/laravel-payments
More information about softscholar/laravel-payments
Files in softscholar/laravel-payments
Package laravel-payments
Short Description Payment gateway service by SoftScholar
License MIT
Informations about the package laravel-payments
Laravel Payments by SoftScholar
Laravel Payments is a service package for integrating payment gateways into your Laravel application, developed by SoftScholar. This package currently supports the Nagad Payment Gateway, with plans to add support for more gateways in the future.
Note: This package uses Nagad API version 4.0.1.
Table of Contents
- Installation
- Configuration
- Configuration Options
- Setting Environment Variables
- Usage
- Supported Payment Gateways
- License
- Contributing
Installation
To install the package, run the following command in your Laravel project directory:
Configuration
After installing the package, you need to publish the configuration file to set up credentials for the payment gateways. Run the following command to publish the configuration file:
This will create a configuration file named spayment.php
in the config
directory of your Laravel project. You can customize this file to configure credentials and settings for the Nagad Payment Gateway or any other gateways that will be supported in the future.
Configuration Options
The configuration file will look something like this:
Setting Environment Variables
To use the Nagad Payment Gateway, add the necessary environment variables to your .env
file:
Replace your-merchant-id, your-merchant-secret, your-public-key, your-private-key, and your-callback-url with the actual credentials provided by Nagad.
After setting these variables, the package will be ready to use with the Nagad gateway. Additional gateways can be configured similarly in the future as they are added to the package.
Usage
To use the Laravel Payments package, you can create a new instance of the Payment
class and call the purchase
method to initiate a payment. Here is an example of how you can use the package to make a payment using the Nagad gateway:
The purchase
method will return a redirect URL that you can use to redirect the user to the Nagad payment page. The user will be able to complete the payment on the Nagad website, and once the payment is completed, the user will be redirected back to the callback URL specified in the checkout data.
Callback data example
More detailed documentation will be added in the future as more gateways are added to the package. You can also check the Nagad API Documentation for more information on how to use the Nagad Payment Gateway.
You can get the example application of: Laravel Payments Example You can check the example application to see how to use the package.
Supported Payment Gateways
The Laravel Payments package currently supports the following payment gateways:
- Nagad
- More gateways will be added in the future
License
The Laravel Payments package is open-source software licensed under the MIT license.
Contributing
Open source contributions are welcome! If you would like to contribute to the package, please fork the repository and submit a pull request with your changes.
If you have any questions or need help with the package, please feel free to contact us at SoftScholar or email to Email.
All versions of laravel-payments with dependencies
ext-openssl Version *