修正退款或者回调payserice
This commit is contained in:
@ -121,6 +121,8 @@ public class WechatController {
|
|||||||
public String renotify(@RequestBody String xmlData) {
|
public String renotify(@RequestBody String xmlData) {
|
||||||
try {
|
try {
|
||||||
WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT);
|
WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT);
|
||||||
|
if(wxPayService == null) wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WXAPP);
|
||||||
|
if(wxPayService == null) wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.APP);
|
||||||
WxPayOrderNotifyResult notifyResult = wxPayService.parseOrderNotifyResult(xmlData);
|
WxPayOrderNotifyResult notifyResult = wxPayService.parseOrderNotifyResult(xmlData);
|
||||||
String orderId = notifyResult.getOutTradeNo();
|
String orderId = notifyResult.getOutTradeNo();
|
||||||
String attach = notifyResult.getAttach();
|
String attach = notifyResult.getAttach();
|
||||||
@ -158,6 +160,8 @@ public class WechatController {
|
|||||||
public String parseRefundNotifyResult(@RequestBody String xmlData) {
|
public String parseRefundNotifyResult(@RequestBody String xmlData) {
|
||||||
try {
|
try {
|
||||||
WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT);
|
WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT);
|
||||||
|
if(wxPayService == null) wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WXAPP);
|
||||||
|
if(wxPayService == null) wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.APP);
|
||||||
WxPayRefundNotifyResult result = wxPayService.parseRefundNotifyResult(xmlData);
|
WxPayRefundNotifyResult result = wxPayService.parseRefundNotifyResult(xmlData);
|
||||||
String orderId = result.getReqInfo().getOutTradeNo();
|
String orderId = result.getReqInfo().getOutTradeNo();
|
||||||
BigDecimal refundFee = BigNum.div(result.getReqInfo().getRefundFee(), 100);
|
BigDecimal refundFee = BigNum.div(result.getReqInfo().getRefundFee(), 100);
|
||||||
|
Reference in New Issue
Block a user