Closed jsl1992 closed 1 year ago
private
private T getDecryptObject(RequestParam requestParam, Class decryptObjectClass) { Notification notification = gson.fromJson(requestParam.getBody(), Notification.class); validateNotification(notification); String algorithm = notification.getResource().getAlgorithm(); String associatedData = notification.getResource().getAssociatedData(); String nonce = notification.getResource().createNonce(); String ciphertext = notification.getResource().getCiphertext(); String plaintext = decryptData(algorithm, associatedData, nonce, ciphertext); return gson.fromJson(plaintext, decryptObjectClass); } 在这个方法里没有看到 "event_type": "TRANSACTION.SUCCESS",notification 对这个字段的校验。默认是只有成功才会通知吗。 看文档这个退款也会有,
回调解密的过程中没有说明需要使用这个字段的,看样子这个字段是交给开发者来使用的
event_type
是回调类型。如果你的服务使用同一个地址接收不同业务的回调,可以通过该参数判断回调类型。
错误描述
这边demo就是controller要如何接收参数 RequestParam requestParam = new RequestParam.Builder() .serialNumber(wechatPayCertificateSerialNumber) .nonce(nonce) .signature(signature) .timestamp(timestamp) .body(requestBody) .build();
还有这边退款通知有没相关demo。这个sdk能不能写详细点。功能都一起写的了。免得大家对接浪费一大推时间
重现bug的步骤
就是demo,示例。直接从controller怎么做,如何返回 。我们只是要调用下api。不要搞得大家都看不懂
预期行为
从controller层到返回你们要求的编码相关demo
导致错误的代码片段
No response
操作系统
window
Java 版本
8
wechatpay-java 版本
0.01
其他信息
No response