Skip to content

Commit

Permalink
增加小程序支付的文档
Browse files Browse the repository at this point in the history
  • Loading branch information
mailbaoer committed Jun 6, 2018
1 parent 951aa0e commit 9174d9f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@


## 快速开始
以下是APP支付简单例子
以下是APP和小程序支付简单例子
```go
wePay := &WePay{
AppId: "xxx",
MchId: "xxx",
PayKey: "xxx",
NotifyUrl: "xxx",
TradeType: "xxx",
TradeType: "xxx", // APP支付填写`APP`,小程序支付填写`JSAPI`
Body: "xxx",
}

results, outTradeNo, err := wePay.AppPay(100))
# APP支付
results, outTradeNo, err := wePay.AppPay(100) // 金额,以分为单位

# 小程序支付
results, outTradeNo, err := wePay.WaxPay(100, "open_id") // 金额,以分为单位;open_id为获取的用户的open_id
```

## 使用
Expand Down

0 comments on commit 9174d9f

Please sign in to comment.