yahrdy / aamarpay
Laravel package for aamarpay payment gateway
Installs: 1 729
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 3
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.13.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-04-09 08:29:54 UTC
README
Laravel aamarpay is a laravel package for aamarpay payment gateway.
Installation
You can install the package via composer:
composer require yahrdy/aamarpay
You can publish the config file with:
php artisan vendor:publish --tag="aamarpay-config"
This is the contents of the published config file:
return [ 'url' => env('AAMARPAY_SERVER_URL', 'https://sandbox.aamarpay.com/request.php'), 'verify_url' => env('AAMARPAY_VERIFY_URL', 'https://sandbox.aamarpay.com/api/v1/trxcheck/request.php'), 'store_id' => env('AAMARPAY_STORE_ID', 'aamarpaytest'), 'signature_key' => env('AAMARPAY_SIGNATURE_KEY', 'dbb74894e82415a2f7ff0ec3a97e4183'), 'success_url' => env('AAMARPAY_SUCCESS_URL', 'http://localhost:8000/api/verify'), 'cancel_url' => env('AAMARPAY_CANCEL_URL', 'http://localhost:8000/api/verify'), 'fail_url' => env('AAMARPAY_FAIL_URL', 'http://localhost:8000/api/verify'), ];
Usage
// Use the facade to initiate a payment, it will return a redirect url public function checkout(){ return Aamarpay::checkout($amount, $name, $address, $phone, $value1 = null, $value2 = null, $value3 = null, $value4 = null); } // To verify the payment, keep the redirect post parameter in the request // This will return a json response with the payment information public function verify(Request $request){ return Aamarpay::verify($request); }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.