Repository Details
Shared by
HelloGitHub Rating
0 ratings
Go 的微信支付 SDK
Past 7 days Received 0 stars ✨
Use arrow keys to explore dates, Home and End for the first and last date, Escape to dismiss.| Date | Star | Daily change |
|---|---|---|
| 周二 | 536 | — |
| 周三 | 536 | 0 |
| 周四 | 536 | 0 |
| 周五 | 536 | 0 |
| 周六 | 536 | 0 |
| 周日 | 536 | 0 |
| 周一 | 536 | 0 |
536
Stars
Yes
Chinese
Go
Language
No
Active
3
Contributors
13
Issues
No
Organization
None
Latest
144
Forks
MIT
License
Go 的微信支付 SDK。微信系的 SDK,填补 Go 在微信支付开发界的空白。支持刷卡支付、统一下单、查询订单、撤销订单、关闭订单等。示例代码如下:
```go
// 创建支付账户
account1 := wxpay.NewAccount("appid", "mchid", "apiKey", false)
account2 := wxpay.NewAccount("appid", "mchid", "apiKey", false)
// 新建微信支付客户端
client := wxpay.NewClient(account1)
// 设置证书
account.SetCertData("证书地址")
// 设置支付账户
client.setAccount(account2)
// 设置http请求超时时间
client.SetHttpConnectTimeoutMs(2000)
// 设置http读取信息流超时时间
client.SetHttpReadTimeoutMs(1000)
// 更改签名类型
client.SetSignType(HMACSHA256)
```
Included in:
Vol.31
Comments
Rating:
No comments yet