Comments (5)
是的,官网返回的code,正常应该是0
from powerwechat.
你这个不能判断error为依据,因为请求没有出错。
这里的err是请求过程中异常报错。
而微信返回的内容是正常的,给了业务code的错误信息, 你要通过判断code如果不等于0的情况,然后做相应处理
from powerwechat.
你这个不能判断error为依据,因为请求没有出错。
这里的err是请求过程中异常报错。
而微信返回的内容是正常的,给了业务code的错误信息, 你要通过判断code如果不等于0的情况,然后做相应处理
要加上这样处理吗:
response, err := payment.Order.JSAPITransaction(ctx, options)
if err != nil {
return nil, err
}
if response.Code != "" {
return nil, errors.New(response.Message)
}
from powerwechat.
我看请求的 src/payment/kernel/baseClient.go
295行代码:
returnResponse, err := df.Request()
if err != nil {
return returnResponse, err
}
发送http请求后,没有找到close的地方,这个会导致内存泄漏吗?
from powerwechat.
这个封装的层,还在看底层的请求层
你也可以内存工具看看。
from powerwechat.
Related Issues (20)
- Q: 程序启动后会默认创建 wechat 目录 HOT 1
- 微信API请求类型错误 HOT 2
- services.PaymentApp.Security.GetCertificates(c.Request.Context())方法有可能实现为不需要传c.Request.Context()的吗? HOT 1
- 微信支付v3 API列表(投诉查询及处理接口) HOT 2
- 小游戏虚拟支付功能可以接入吗 HOT 2
- 企微回调是必须的吗? HOT 1
- 接收微信服务器消息不支持json格式数据吗 HOT 1
- “获取应用的jsapi_ticket”这个接口,文档里写的需要参数access_token,为什么函数里不传这个参数? HOT 5
- weComService.MiniProgram()报错 HOT 1
- 似乎依赖版本有问题 HOT 8
- 请求企业微信接口的时候是否支持 http 代理? HOT 3
- 类型为click的菜单如何在回调函数中获取菜单的key HOT 1
- 企业微信 AddMomentTask 发布朋友圈这个方法返回数据结构问题 HOT 3
- 升级到最新版后发生了goruntine泄露 HOT 4
- 替换过时的ioutil包,采用io包平替 HOT 3
- When will there be a version of rust HOT 1
- 开放平台授权小程序的代授权有bug HOT 1
- 官网打不开了? HOT 2
- 小程序:消息解密(services.MiniProgramApp.Server.Notify) xml格式时报错:plain is to small 2;json格式报错:EOF HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerwechat.