mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-19 06:36:28 +08:00
🎨 微信支付分支付回调接口优化以及补充测试代码
This commit is contained in:
@@ -125,6 +125,19 @@ public interface PayScoreService {
|
||||
* @return the wx pay score result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
WxPayScoreResult parseNotifyData(PayScoreNotifyData data) throws WxPayException;
|
||||
PayScoreNotifyData parseNotifyData(String data);
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 支付分回调NotifyData解密resource
|
||||
* 文档详见: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/payscore/chapter5_2.shtml
|
||||
* </pre>
|
||||
*
|
||||
* @param data the data
|
||||
* @return the wx pay score result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
WxPayScoreResult decryptNotifyDataResource(PayScoreNotifyData data) throws WxPayException;
|
||||
|
||||
}
|
||||
|
||||
@@ -139,7 +139,13 @@ public class PayScoreServiceImpl implements PayScoreService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxPayScoreResult parseNotifyData(PayScoreNotifyData data) throws WxPayException {
|
||||
public PayScoreNotifyData parseNotifyData(String data){
|
||||
return GSON.fromJson(data, PayScoreNotifyData.class);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxPayScoreResult decryptNotifyDataResource(PayScoreNotifyData data) throws WxPayException {
|
||||
PayScoreNotifyData.Resource resource = data.getResource();
|
||||
String cipherText = resource.getCipherText();
|
||||
String associatedData = resource.getAssociatedData();
|
||||
|
||||
Reference in New Issue
Block a user