- 服务端发送消息提示thing为空,但是我的thing是有值的。这是为什么?
原数据: {"thing6":{"value":"男子 UA Performance..."},"character_string5":{"value":"黑色"},"thing4":{"value":"您关注的商品已到货!快来抢购吧!"}} 微信错误提示: argument invalid! data.thing6.value is empty rid: 6554418c-24771385-02b9dafe
2023-11-15 - 微信小程序支付v3接口生成二次签名paysign,一直提示支付验证失败?
public static String getTokenTwo (String appId, String packag) throws IOException, SignatureException, NoSuchAlgorithmException, InvalidKeyException { String nonceStr = getRandomString(32); long timestamp = System.currentTimeMillis() / 1000; String message = buildMessageTwo( appId,timestamp,nonceStr,packag); String signature = sign(message.getBytes("utf-8")); return signature; } private static String buildMessageTwo(String appId, long timestamp, String nonceStr, String packag) { return appId + "\n" + timestamp + "\n" + nonceStr + "\n" + packag + "\n"; } private static String sign(byte[] message) throws NoSuchAlgorithmException, SignatureException, IOException, InvalidKeyException { Signature sign = Signature.getInstance("SHA256withRSA"); //SHA256withRSA PrivateKey privateKey = getPrivateKey("密钥文件地址"); sign.initSign(privateKey); sign.update(message); return Base64.getEncoder().encodeToString(sign.sign()); }
2020-12-28 - 调用微信支付v3小程序统一下单接口报PARAM_ERROR?
{ "code": "PARAM_ERROR", "detail": { "location": "body", "value": "" }, "message": "输入源“/body/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项" } 如何解决呢
2020-12-11