Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tioncico authored May 17, 2019
1 parent b6468b6 commit 10cd035
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,12 @@ $aliConfig->setAppId('2016091800538339');
$aliConfig->setPublicKey('阿里公钥');
$aliConfig->setPrivateKey('阿里私钥');
$pay = new \EasySwoole\Pay\Pay();
$param = [];//伪代码,post数据
unset($param['sign_type']);//需要忽略sign_type组装
$order = new \EasySwoole\Pay\AliPay\RequestBean\NotifyRequest($param,true);

if (isset($param['sign_type'])) {
unset($param['sign_type']);
}
$param = [];//param为post的数据
$order = new \EasySwoole\Pay\AliPay\RequestBean\NotifyRequest($param, true);
$aliPay = $pay->aliPay($aliConfig);
$result = $aliPay->verify($order);
var_dump($result);
Expand All @@ -403,7 +406,8 @@ var_dump($result);
## 服务器确认收到异步通知字符串获取

```php
\EasySwoole\Pay\AliPay::success()
\EasySwoole\Pay\AliPay::success();//成功响应
\EasySwoole\Pay\AliPay::fail();//失败响应
```

# 微信支付
Expand Down Expand Up @@ -606,9 +610,16 @@ go(function () use ($wechatConfig) {

```php
$pay = new \EasySwoole\Pay\Pay();
$data = $pay->weChat($this->wechatConfig)->verify($content);
$content = '';//content为xml原始数据,在easyswoole中可通过$this->request()->getBody()->__toString()取出
$data = $pay->weChat($wechatConfig)->verify($content )
```

## 服务器确认收到异步通知字符串获取

```php
\EasySwoole\Pay\WeChat\WeChat::success();//成功响应
\EasySwoole\Pay\WeChat\WeChat::fail();//失败响应
```



Expand Down

0 comments on commit 10cd035

Please sign in to comment.