46 lines
1.1 KiB
Markdown
46 lines
1.1 KiB
Markdown
# 支付模块
|
|
|
|
## 1. 安装
|
|
|
|
```shell
|
|
composer require yansongda/pay
|
|
```
|
|
|
|
## 2. 文档参考
|
|
|
|
> https://github.com/yansongda/pay
|
|
|
|
## 3. 生成支付订单
|
|
```php
|
|
use Modules\Payment\Traits\WithPayments;
|
|
|
|
$order = Order::first();
|
|
|
|
$payment = $order->createWechatPayment(User::first(), -1, 'mp');
|
|
|
|
$payment->getPaymentParams();
|
|
```
|
|
|
|
|
|
## 4. 支付渠道 GATEWAY 参考值
|
|
// 支付宝
|
|
//web 电脑支付 array $order Response
|
|
//wap 手机网站支付 array $order Response
|
|
//app APP 支付 array $order Response
|
|
//mini 小程序支付 array $order Collection
|
|
//scan 扫码支付 array $order Collection
|
|
// 不支持的
|
|
//pos 刷卡支付 array $order Collection
|
|
//transfer 账户转账 array $order Collection
|
|
|
|
// 微信支付
|
|
//mp 公众号支付 array $order Collection
|
|
//wap 手机网站支付 array $order Response
|
|
//app APP 支付 array $order JsonResponse
|
|
//miniapp 小程序支付 array $order Collection
|
|
//scan 扫码支付 array $order Collection
|
|
// 不支持的
|
|
//pos 刷卡支付 array $order Collection
|
|
//transfer 账户转账 array $order Collection
|
|
//redpack 普通红包 array $order Collection
|
|
//groupRedpack 裂变红包 array $order Collection |