Skip to content

Commit

Permalink
Feat 发送红包文档
Browse files Browse the repository at this point in the history
  • Loading branch information
aimuz committed Jul 23, 2018
1 parent 856ba2a commit 73bc1a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*_test.go
test
test/*
test/*
.idea
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,31 @@ valid := pay.WaxpayVerifySign(verifyParams, appKey, waxNotify.Sign) //appKey 为
resp := new(pay.WaxPayNotifyResp)

if valid {
业务处理逻辑···
// 业务处理逻辑···
resp.ReturnCode = "SUCCESS"
resp.ReturnMsg = "OK"
} else {
错误处理逻辑···
// 错误处理逻辑···
resp.ReturnCode = "FAIL"
resp.ReturnMsg = "Verify Failed"
}
```

### 发送普通红包
```go
wx := &WePay{
AppID: "xx",
PayKey: "xx",
MchID: "xx",
TradeType: "xx",
CertFile: "xx", // 证书路径
keyFile: "xx", // 证书秘钥路径
RootCaFile: "xx", // 根证书路径
}

billNO, redPackResp, err := wx.SendRedPack(totalAmount, openID, sendName, wishing, actName, remark)

```

#### APP支付

Expand All @@ -64,4 +79,6 @@ if valid {
- [ ] 扫码支付
- [ ] 刷卡支付
- [ ] 企业付款
- [ ] 现金红包
- [x] 现金红包
- [x] 发送红包
- [ ] 裂变红包

0 comments on commit 73bc1a6

Please sign in to comment.