这要看你做什么业务,可以参考 https://pay.weixin.qq.com/wiki/doc/wxfacepay/faq/network.html#%E7%9B%B4%E8%BF%9E%E9%80%9A%E8%BF%87%E9%98%B2%E7%81%AB%E5%A2%99
关于防火墙开通端口的问题?请问内网开通访问https://api.weixin.qq.com/cgi-bin/的服务的防火墙,应该开通哪个端口?80?443?还是有其他的端口?
2021-09-06这不是bug,这是向下兼容,即你的手机可能不支持http2,则自动降级走http1.1
http2bughttps://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html 模拟器上调试已经走http2协议,但是在真机上调试走的还是http1.1协议,且基础库的版本号已经满足2.10.4的最低版本要求 [图片]
2021-09-05curl -Iv https://wechat.com * Rebuilt URL to: https://wechat.com/ * Trying 203.205.251.176... * TCP_NODELAY set * Connected to wechat.com (203.205.251.176) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Client hello (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server did not agree to a protocol * Server certificate: * subject: C=CN; ST=\U5E7F\U4E1C\U7701; L=\U6DF1\U5733\U5E02; O=Shenzhen Tencent Computer Systems Company Limited; CN=weixin.qq.com * start date: Jun 7 00:00:00 2021 GMT * expire date: Jun 15 23:59:59 2022 GMT * subjectAltName: host "wechat.com" matched cert's "wechat.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert Secure Site CN CA G3 * SSL certificate verify ok. > HEAD / HTTP/1.1 > Host: wechat.com > User-Agent: curl/7.54.0 > Accept: */* > < HTTP/1.1 301 Moved Permanently HTTP/1.1 301 Moved Permanently < Location: https://www.wechat.com/ Location: https://www.wechat.com/ < Connection: keep-alive Connection: keep-alive < Date: Sun, 05-Sep-2021 07:44:22 GMT Date: Sun, 05-Sep-2021 07:44:22 GMT < Strict-Transport-Security: max-age=15768000 Strict-Transport-Security: max-age=15768000 < Content-Length: 0 Content-Length: 0 < * Connectio<a href="/community/develop/issue/0" target="_blank"> #0 </a>to host wechat.com left intact curl -Iv https://www.wechat.com * Rebuilt URL to: https://www.wechat.com/ * Trying 203.205.251.178... * TCP_NODELAY set * Connected to www.wechat.com (203.205.251.178) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Client hello (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server did not agree to a protocol * Server certificate: * subject: C=CN; ST=\U5E7F\U4E1C\U7701; L=\U6DF1\U5733\U5E02; O=Shenzhen Tencent Computer Systems Company Limited; CN=weixin.qq.com * start date: Jun 7 00:00:00 2021 GMT * expire date: Jun 15 23:59:59 2022 GMT * subjectAltName: host "www.wechat.com" matched cert's "*.wechat.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert Secure Site CN CA G3 * SSL certificate verify ok. > HEAD / HTTP/1.1 > Host: www.wechat.com > User-Agent: curl/7.54.0 > Accept: */* > < HTTP/1.1 503 Service Unavailable HTTP/1.1 503 Service Unavailable < Connection: keep-alive Connection: keep-alive < Date: Sun, 05-Sep-2021 07:45:24 GMT Date: Sun, 05-Sep-2021 07:45:24 GMT < Content-Length: 0 Content-Length: 0 < * Connectio<a href="/community/develop/issue/0" target="_blank"> #0 </a>to host www.wechat.com left intact 这个地址应该不对外的吧。。。
按官方示例的云函数为啥一直超时呢?云开发新手,按官方示例试了一下,一直报错“error message Invoking task timed out after 3 seconds; at cloud.callFunction api;” // 云函数入口文件 const cloud = require('wx-server-sdk') const got = require('got') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { // console.log(event) let response = await got('https://wechat.com') return response.body } [图片] 有一个情况不知道是不是有影响,就是我们小程序现在授权给了另外一个第三方的平台,就是类似有赞的那种商城平台,配置了对方域名。但是对方有的功能不支持所以现在想着说自己开发,但是线上产品还不能停,那这种情况下是不是影响我们自己开发用小程序呢?
2021-09-0516130916** 这个是你故意打的星号还是说你请求时候就是星号?
获取验签密钥API报商户号无效请确认请求参数是否正确merchant invalid mch_id?调用API:https://api.mch.weixin.qq.com/sandboxnew/pay/getsignkey 参数信息: 1、商户号为微信支付分配真实商户号 2、sign根据API密钥生成正确 3、 <xml> <mch_id>16130916**</mch_id> <nonce_str>1630740568747</nonce_str> <sign>129C2CDC27E9837B873483896858D0**</sign> </xml> <xml> <return_code><![CDATA[FAIL]]></return_code> <retmsg><![CDATA[请确认请求参数是否正确merchant invalid mch_id(16130916**)]]></retmsg> <retcode><![CDATA[1]]></retcode> </xml> 报错有些什么原因,困扰一天了。
2021-09-05<?php private function getEncrypt($str){ //$str是待加密字符串 $public_key_path = '平台证书路径'; $public_key = file_get_contents($public_key_path); $encrypted = ''; openssl_public_encrypt($str,$encrypted,$public_key); //base64编码 $sign = base64_encode($encrypted); return $sign; } PHP官方函数文档: https://www.php.net/manual/zh/function.openssl-public-encrypt.php ,上述封装声明的padding模式即取的默认值:OPENSSL_PKCS1_PADDING ,等于文档上写的 RSAES-PKCS1-v1_5;如果一直报解密失败,可以尝试把这个padding换成APIv3的 OPENSSL_PKCS1_OAEP_PADDING 试试看,代码即: openssl_public_encrypt($str,$encrypted,$public_key, OPENSSL_PKCS1_OAEP_PADDING); 如果还不行,那就是 APIv2版的进件接口,是「半废」状态了;建议看APIv3版进件 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter11_1_1.shtml
小微商户进件(非电商收付通)遇到:解密敏感信息失败,请检查后再试我参考的API文档链接为: https://pay.weixin.qq.com/wiki/doc/api/xiaowei.php?chapter=19_12 https://pay.weixin.qq.com/wiki/doc/api/xiaowei.php?chapter=19_2 [图片] [图片] 代码严格按上述要求走的。 [图片] 熬到半夜都没有查出来问题。不知道怎么办了。有人能指点一下吗? 自查:用一对密钥加密解密是合格的。 1,平台证书+平台序列号,没有问题。2,字段齐全。3,图片有返回。 不知道是什么什么原因。。。 总是报:解密敏感信息失败,请检查后再试 一夜睡不着了。。。 能不能来个微信支付的官方技术人员指导一下?
2021-09-05谢邀,content-type写错了;另外,可尝试下 wechatpay-axios-plugin 内置的 Multipart 类,完整实现了MDN的FormData协议。 https://developers.weixin.qq.com/community/develop/article/doc/0002ec32938cc0727e3cb035f56813
HTTP API MethodNotAllowedhttps://developers.weixin.qq.com/minigame/dev/wxcloud/reference-http-api/storage/uploadFile.html 上传的最后一步提示 MethodNotAllowed,使用方式为Post,框架为umi设置了代理。Postman上传正常 <?xml version='1.0' encoding='utf-8' ?> <Error> <Code>MethodNotAllowed</Code> <Message>The specified method is not allowed against this resource.</Message> <Resource>cos.ap-shanghai.myqcloud.com/636c-cloud1-9gefcf135bd114f3-1305682193/als-care/image/doraemon_1630766733859.png</Resource> <RequestId>NjEzMzg2OGVfMzA0MzIyMDlfMjk5Nl81M2E4ZmU=</RequestId> <TraceId>OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OWE4OGMxZjNjY2JiNTBmMTVmMWY1MzAzYzkyZGQ2ZWM4OWM4Y2M5MzI5ZmUzN2FjZDk1OTRjYWI5Yjg5OTJlZDA=</TraceId> </Error> 细节代码调用如下: let proxyUrl = url; console.log('wxUploadFileInner origin url: ', url) if (url.includes(PROXY_WX_CLOUD_UPLOAD_TARGET)) { proxyUrl = url.replace(PROXY_WX_CLOUD_UPLOAD_TARGET, PROXY_WX_CLOUD_UPLOAD_KEY); console.log('wxUploadFileInner origin proxy url: ', proxyUrl) } const formData = new FormData(); formData.append('key', remotePath) formData.append('Signature', signature) formData.append('x-cos-security-token', token) formData.append('x-cos-meta-fileid', fileId) formData.append('file', file, file.name) await request<RESULT>(proxyUrl, { method: 'POST', headers: { 'Content-Type': 'multipart/form-data', }, params: {}, data: formData }).then((resp) => { console.log("wxUploadFileInner then ", JSON.stringify(resp)) callback(url); }).catch((err) => { console.log("wxUploadFileInner catch ", err) });
2021-09-05谢邀,`e.statusBarHeight`未获取到值,建议尝试 `wx.getSystemInfoSync`同步模式试试。
使用ColorUi,提示“Cannot set property 'StatusBar' of?使用ColorUi,提示“Cannot set property 'StatusBar' of undefined”,我是小白,希望高手能给指导一下!谢谢! 这个是在APP.JS中的。 [图片] [图片]
2021-09-04谢邀,你继续打 `font-` 看看提示呢?
wxss中代码自动提示为什么只显示一个?如图,之前在wxss中[图片]只要输入一两个字母,所有包含子母的提示单词都会显示出来,为什么现在每次只显示一个呢?哪里可以设置吗? [图片]
2021-09-04谢邀,登录 mp.weixin.qq.com 在 「版本管理」 里查询是否有「审核中」或「审核通过未发布的版」
小程序想升级,提示有审核未通过,怎么处理?当前小程序有在审核中或审核通过未发布的版本,暂时不支持升级。
2021-09-04谢邀,这个是特殊权限,要联系微信支付BD申请。
微信企业支付到零钱红包最小金额如何能降到0.3一下?急我们这边的项目主办方要求红包金额最小一定要降低到0.3,有什么办法可以设定这样的值,商户平台的最小限定就是0.3
2021-09-04