kennebula / dingerpaymentintegration
aya供应商的支付集成服务
dev-main
2024-09-08 13:21 UTC
Requires
- phpseclib/phpseclib: ~2.0
This package is auto-updated.
Last update: 2024-09-08 13:23:52 UTC
README
需求
- PHP >= 8.0;
- composer;
功能
- PSR-4自动加载兼容结构。
- 与Laravel框架易于使用。
- 包含有用的工具以改善代码。
安装
composer require kennebula/dingerpaymentintegration
设置工具
运行命令
php artisan vendor:publish --provider="KenNebula\DingerPaymentIntegration\PackageServiceProvider" --tag="config"
配置输出
return [
#to fill dinger payment url
'url' => null,
#to fill client id
'clientId' => null,
#to fill public key
'publicKey' => null,
#to fill project name
'projectName' => null,
#to fill merchant name
'merchantName' => null,
#to fill encryption key
'encryptionKey' => null,
#to fill call back key
'callBackKey' => null
];
-
此命令将在config文件夹内创建aya.php文件,如下所示:
-
重要 - 您需要在此配置文件中填写aya信息以使用此包。
包使用
发送支付(获取重定向URL)
use KenNebula\DingerPaymentIntegration\Dinger;
AYA::sendPayment(@multidimensionalArray $items,@String $customer_name, @Int $total_amount, @String $merchant_order_no);
-
注意
-
items数组必须包括名称、金额、数量。
-
customerName必须是字符串。
-
totalAmount必须是整数。
-
merchantOrderId必须是字符串。
输出加载
- 这将生成dinger预构建表单URL。
提取回调数据
use KenNebula\DingerPaymentIntegration\Dinger;
Dinger::callback(@String $paymentResult,@String $checkSum);
-
注意
-
paymentResult必须是字符串。
-
checkSum必须是字符串。
回调输出
- 这将返回包含支付信息的解密数据数组。
许可证
KenNebula保留自2024年。