yahrdy / aamarpay
Laravel 对 aamarpay 支付网关的包装包
dev-main
2023-07-03 07:42 UTC
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-09-09 09:24:02 UTC
README
Laravel aamarpay 是一个用于 aamarpay 支付网关的 Laravel 包装包。
安装
您可以通过 composer 安装此包
composer require yahrdy/aamarpay
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="aamarpay-config"
这是发布配置文件的内容
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', 'https://:8000/api/verify'), 'cancel_url' => env('AAMARPAY_CANCEL_URL', 'https://:8000/api/verify'), 'fail_url' => env('AAMARPAY_FAIL_URL', 'https://:8000/api/verify'), ];
使用方法
// 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 以获取有关最近更改的更多信息。
致谢
许可
MIT 许可证 (MIT)。请参阅 许可文件 以获取更多信息。