Repository Details
Shared by


HelloGitHub Rating
0 ratings
Free•MIT
Claim
Discuss
Collect
Share
538
Stars
Yes
Chinese
Go
Language
No
Active
3
Contributors
13
Issues
No
Organization
None
Latest
146
Forks
MIT
License
More
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