- 微信支付图片上传API V3死活调不通,付费100元,求大佬指教,有愿意帮忙的吗?
求大佬指教,非常感谢!!! 之前的提问: https://developers.weixin.qq.com/community/develop/doc/000642b76805b0b664fa7e20e56800
2020-09-16 - 图片上传报“商户没有权限”,请问怎么解决?
报错信息如下? {"code":"PARAM_ERROR","message":"商户没有权限"}
2020-09-16 - 上传图片报签名错误,其他接口签名是正确的,请大佬帮忙看下?,非常感谢!
let res = await cloud.downloadFile({ fileID: event.fileID }) let filebuffer = res.fileContent let filename = event.filename let sha256 = crypto.createHash('sha256').update(filebuffer).digest('hex') var body = JSON.stringify({ 'filename': filename, 'sha256': sha256 }) let method = 'POST' let url = '/v3/merchant/media/upload' // let jsonStr = JSON.stringify({ filename, sha256 }) var timestamp = Date.parse(new Date()) / 1000 const randomstr = '95E9D72DB0389359EB54850779354B21' var data = method + '\n' + url + '\n' + timestamp + '\n' + randomstr + '\n' + body + '\n' // console.log('data>>>>>>>>>>>>>>>>>',data) let sign = crypto.createSign('RSA-SHA256'); sign.update(new Buffer(data, 'utf-8')); let sig = sign.sign(privateKey, 'base64'); console.log(sig) body = '--boundary'+'\n'+'\r\n' +'Content-Disposition: form-data; name="meta";'+'\n'+'\r\n' +'Content-Type: application/json' + '\n'+'\r\n' +body+'\n'+'\r\n' +'--boundary'+'\n'+'\r\n' +'Content-Disposition: form-data; name="file"; filename="'+filename+'";'+'\n'+'\r\n' +'Content-Type: image/png'+'\n'+'\r\n' +'\n'+'\r\n' +filebuffer+'\n'+'\r\n' +'--boundary--'+'\n'+'\r\n' console.log(body) // ////////////////////////////////////////// var mchid = 'xxxxxx' var serial_no = 'xxxxxxxxx' var options = { method: method, headers: { 'Accept': 'application/json', // 'Content-Type':'application/json', 'Content-Type': 'multipart/form-data;boundary=boundary', 'Accept-Charset': 'utf-8', 'User-Agent': 'my-reddit-client', 'Authorization': 'WECHATPAY2-SHA256-RSA2048 mchid="'+mchid+'",nonce_str="'+randomstr+'",signature="'+sig+'",timestamp="'+timestamp+'",serial_no="'+serial_no+'"' }, body: body, uri: "https://api.mch.weixin.qq.com"+url }; return rp(options).then( function (res) { console.log(res) return res } ).catch( function (err) { console.log(err) return err } )
2020-09-16 - 通过api v3调用支付有礼接口,返回"请求参数错误",没有额外信息,请问怎么处理啊 ?
返回内容如下,并没有提示哪个字段出错,如何检查呢? name: "StatusCodeError"statusCode: 400message: "400 - "{\"code\":\"PARAM_ERROR\",\"message\":\"请求参数错误\"}""error: "{"code":"PARAM_ERROR","message":"请求参数错误"}"
2020-09-13 - 微信支付API-v3在云开发中也需要签名吗?
在云开发中调用发放代金券的接口,也需要签名吗?云开发不是自动鉴权吗?有没有简便的方法?
2020-09-11