Commit f93d018b by ping.wu

预支付接口失败判断修改

parent f2cf1c54
......@@ -512,13 +512,19 @@ public class PayServiceImpl {
} catch (Exception e) {
AppLogUtil.errorLog("获取预支付信息异常", JSONObject.toJSONString(requestDto), null,e);
}
if (response == null || !ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(response.getCode())) {
//预支付接口失败
if (null == response || !Objects.equals(ResponseCodeConstant.RESPONSE_SUCCESS_STR, response.getCode())
|| !Objects.equals(ResponseCodeConstant.RESPONSE_SUCCESS, response.getData().getResultCode()) ) {
String errorMessage = "unified fail";
if(null != response){
errorMessage = StringUtils.isNotEmpty(response.getMessage()) ? response.getMessage() : response.getData().getResultMsg();
}
//打印业务异常
if(response != null && printUnifiedPayResponseError){
AppLogUtil.errorLog("获取预支付信息失败", JSONObject.toJSONString(requestDto), JSONObject.toJSONString(response), null);
}
//预支付失败需要把原因进行记录
orderPayResponse.setMsg(response == null ? "unified fail" : response.getMessage());
orderPayResponse.setMsg(errorMessage);
return orderPayResponse;
}
putDelMq(request.getPartnerId(), request.getStoreId(), response.getData().getFmId(), orderBean.getOid(), null);
......
......@@ -42,7 +42,7 @@ public interface PaymentNewClient {
/**
* 创建预支付订单,唤起支付
*/
@LogIgnoreFeign(logMessage="unifiedOrder",statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE)
@LogIgnoreFeign(logMessage="unifiedOrder",statusCodeFieldName= ResponseCodeKeyConstant.CODE)
@PostMapping("paymentcenter/unifiedOrder")
com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> unifiedOrder(@RequestBody UnifiedOrderRequestDto requestDto);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment