yomastrategic / yomafleet-payment
Yoma车队支付网关包,适用于Visa、Master、JCB、Wave、Kpay等...
v2.0.0
2024-05-14 08:36 UTC
Requires
- php: >=7
- guzzlehttp/guzzle: ^6.3.1|^7.0.1
- simplesoftwareio/simple-qrcode: ~4
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^8.5.8|^9.3.3
This package is not auto-updated.
Last update: 2024-09-20 18:13:07 UTC
README
在您的 composer.json 中添加此包并更新 composer。
composer require yomafleet/payment-provider
安装
Laravel 5.x
更新 composer 后,将 ServiceProvider 添加到 config/app.php 文件中的 providers 数组
Yomafleet\PaymentProvider\PaymentGatewayServiceProvider::class,
您可以选择使用外观来缩短代码。将以下内容添加到您的外观中
'Gateway' => Yomafleet\PaymentProvider\Facades\Gateway::class,
使用
使用外观:use Yomafleet\PaymentProvider\Facades\Gateway;
$result = Gateway::request();
return $result->verify($data);
使用 php artisan vendor:publish
命令创建一个位于 config/payment.php
的配置文件,这将允许您定义本地配置以更改某些设置(默认纸张等)。您也可以使用您的 ConfigProvider 来设置某些键。
配置
默认配置设置在 config/payment.php
中设置。将此文件复制到您的配置目录以修改值。您可以使用此命令发布配置
php artisan vendor:publish --provider="Yomafleet\PaymentProvider\PaymentGatewayServiceProvider"
测试
$ ./vendor/bin/phpunit
许可证
MIT 许可证(MIT)。请参阅 许可证文件 获取更多信息。