收藏
回答

微信支付JSAPI退款,域名无法访问

云开发ID:cup-customer-release

云函数版本:Nodejs12.16

在云开发环境下,使用urllib包,请求https://api.mch.weixin.qq.com/secapi/pay/refund

该接口一直运行正常,直到2021-12-22日,突然返回

Unable to load BIO, POST https://api.mch.weixin.qq.com/secapi/pay/refund/ -1 (connected: false, keepalive socket: false, socketHandledRequests: 0, socketHandledResponses: 0)

发现,请求根本无法触达微信支付的服务,直接被"找不到域名"。

该账号微信支付正常,只有退款接口无法使用。下边是node.js urllib包报错信息

__proto__: Promise
[[PromiseStatus]]: "rejected"
[[PromiseValue]]: Error: Unable to load BIO, POST https://api.mch.weixin.qq.com/secapi/pay/refund/ -1 (connected: false, keepalive socket: false, socketHandledRequests: 0, socketHandledResponses: 0) headers: {} at Object.createSecureContext (_tls_common.js:262:21) at Object.connect (_tls_wrap.js:1574:48) at Agent.createConnection (https.js:126:22) at Agent.createSocket (_http_agent.js:287:26) at Agent.addRequest (_http_agent.js:250:10) at new ClientRequest (_http_client.js:302:16) at Object.request (https.js:310:10) at Object.n.request (C:\Program Files (x86)\Tencent\微信web开发者工具\code\package.nw\js\common\cloud-functions-debugger-server\worker\node.js:1:29152) at Object.requestWithCallback (C:\lib\git\git\lite_cup_yun\cloudfunctions\order\node_modules\urllib\lib\urllib.js:1013:19) at C:\lib\git\git\lite_cup_yun\cloudfunctions\order\node_modules\urllib\lib\urllib.js:162:13
data: undefined
headers: {}
path: "/secapi/pay/refund/"
res:
aborted: false
data: undefined
headers: {}
keepAliveSocket: false
remoteAddress: ""
remotePort: ""
requestUrls: ["https://api.mch.weixin.qq.com/secapi/pay/refund/"]
rt: 2
size: 0
socketHandledRequests: 0
socketHandledResponses: 0
status: -1
statusCode: -1
statusMessage: null
timing: null
__proto__: Object
status: -1
message: "Unable to load BIO, POST https://api.mch.weixin.qq.com/secapi/pay/refund/ -1 (connected: false, keepalive socket: false, socketHandledRequests: 0, socketHandledResponses: 0)↵headers: {}"
stack: "Error: Unable to load BIO, POST https://api.mch.weixin.qq.com/secapi/pay/refund/ -1 (connected: false, keepalive socket: false, socketHandledRequests: 0, socketHandledResponses: 0)↵headers: {}↵    at Object.createSecureContext (_tls_common.js:262:21)↵    at Object.connect (_tls_wrap.js:1574:48)↵    at Agent.createConnection (https.js:126:22)↵    at Agent.createSocket (_http_agent.js:287:26)↵    at Agent.addRequest (_http_agent.js:250:10)↵    at new ClientRequest (_http_client.js:302:16)↵    at Object.request (https.js:310:10)↵    at Object.n.request (C:\Program Files (x86)\Tencent\微信web开发者工具\code\package.nw\js\common\cloud-functions-debugger-server\worker\node.js:1:29152)↵    at Object.requestWithCallback (C:\lib\git\git\lite_cup_yun\cloudfunctions\order\node_modules\urllib\lib\urllib.js:1013:19)↵    at C:\lib\git\git\lite_cup_yun\cloudfunctions\order\node_modules\urllib\lib\urllib.js:162:13"
__proto__: Object
回答关注问题邀请回答
收藏

1 个回答

  • Memory
    Memory
    2021-12-23

    你微信支付证书是不是过期了

    2021-12-23
    有用
    回复
登录 后发表内容