xhxu 3 лет назад
Родитель
Сommit
ae1f05e8f9
3 измененных файлов: 11 добавлений и 9 удалений
  1. +9
    -8
      mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayController.java
  2. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/pay/service/pay/wx/v3/miniApp/appPay/WxMiniAppPayV3AdapterService.java

+ 9
- 8
mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayController.java Просмотреть файл

@@ -192,11 +192,12 @@ public class WxPayController extends BaseController {
logger.info("[" +getIpAddr() + "]微信退款回调");
Map<String, String> paramMap = null;
String response = "";
String xml = "";
String json = "";
try {
xml = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8"));
logger.info(xml);
paramMap = WxPayment.xmlToMap(xml);
json = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8"));
logger.info(json);
paramMap = JSON.parseObject(json,Map.class);
// paramMap = WxPayment.xmlToMap(xml);
paramMap.put("tenantId", tenantId);
String jsonMsg = JSON.toJSONString(paramMap);

@@ -210,22 +211,22 @@ public class WxPayController extends BaseController {
// response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP);
mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());

logger.info("refund wxpay, notify success, req : " + xml + ", resp: " + response.toString());
logger.info("refund wxpay, notify success, req : " + json + ", resp: " + response.toString());
return response;
} catch (BizMessageException e) {
logger.error("refund wxpay, notify error, req: " + xml + ", e:" + e.getLocalizedMessage());
logger.error("refund wxpay, notify error, req: " + json + ", e:" + e.getLocalizedMessage());
SortedMap resultMap = new TreeMap();
resultMap.put("code", "FAIL");
resultMap.put("message", e.getMessage());
return JSON.toJSONString(resultMap);
} catch (MallinkException e) {
logger.error("refund wxpay, notify error, req: " + xml + ", e:" +e.getLocalizedMessage());
logger.error("refund wxpay, notify error, req: " + json + ", e:" +e.getLocalizedMessage());
SortedMap resultMap = new TreeMap();
resultMap.put("code", "FAIL");
resultMap.put("message", e.getMessage());
return JSON.toJSONString(resultMap);
} catch (Exception e) {
logger.error("refund wxpay, order create error, req: " + xml + ", e: " + e.getMessage());
logger.error("refund wxpay, order create error, req: " + json + ", e: " + e.getMessage());
SortedMap resultMap = new TreeMap();
resultMap.put("code", "FAIL");
resultMap.put("message", e.getMessage());


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java Просмотреть файл

@@ -156,6 +156,7 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR
@Override
@Transactional(rollbackFor = {Exception.class})
public ResultData handApplymentStates(WxProfitSharingReceiverApply receiverApply) {

if(receiverApply == null || !EnumSharingReceiverApplymentState.getNeedSyncList().contains(receiverApply.getApplymentState())){
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该状态无需同步");
return new ResultData(receiverApply);


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/pay/service/pay/wx/v3/miniApp/appPay/WxMiniAppPayV3AdapterService.java Просмотреть файл

@@ -202,7 +202,7 @@ public class WxMiniAppPayV3AdapterService extends BaseWxPayV3AdapterService impl
throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"子订单为空");
}
/*
* 普通支付/小程序支付
* 普通支付/小程序支付
* https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_2_3.shtml
*/
if (childOrders.size() == 1) {


Загрузка…
Отмена
Сохранить