pay/README.md

31 lines
549 B
Markdown
Raw Normal View History

2017-08-09 09:04:28 +08:00
<h1 align="center">Pay</h1>
2017-08-09 08:54:15 +08:00
## 使用方法
2017-08-09 08:55:06 +08:00
### 1、通过 composer 加载
2017-08-09 09:01:18 +08:00
```composer required yansongda/pay```
2017-08-09 08:54:15 +08:00
2017-08-09 08:55:06 +08:00
### 2、在代码中使用
2017-08-09 08:54:15 +08:00
```php
use Yansongda\Pay\Pay;
$config = [
'alipay' => [
'app_id' => '',
2017-08-12 15:39:44 +08:00
'notify_url' => '',
'return_url' => '',
2017-08-09 08:54:15 +08:00
'ali_public_key' => '',
'private_key' => '',
],
];
2017-08-11 14:48:17 +08:00
$config_biz = [
2017-08-09 08:54:15 +08:00
'out_trade_no' => '',
'total_amount' => '',
'subject' => '',
];
$pay = new Pay($config);
2017-08-10 12:18:55 +08:00
return $pay->dirver('alipay')->gateway('web')->pay($biz);
2017-08-09 09:05:17 +08:00
```
## LICENSE
MIT