记得上下班打卡 | git大法好,push需谨慎

Commit 887cb296 authored by zhengfuxin's avatar zhengfuxin

修改微信和支付宝 扫码问题

parent 199cc589
......@@ -40,6 +40,8 @@ public class DragonPayBaseRespDto implements Serializable {
private String productId;
private String msg;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
......
......@@ -56,6 +56,10 @@ public class AlipayStrategyMicropayImpl extends AbstractAlipayStrategy {
@Override
DragonPayBaseRespDto buildResponseDto(DragonPayBaseRespDto payBaseRespDto, Map<String, Object> respResult) {
// payBaseRespDto.getPayData().setRedirectUrl(alipayGatewayUrl + "?" + respResult.get("body"));
//判断是否成功
if(respResult.get("code")!=null&&!respResult.get("code").equals("10000")){
payBaseRespDto.setMsg(respResult.get("subMsg")==null?"":respResult.get("subMsg").toString());
}
return payBaseRespDto;
}
}
......@@ -58,6 +58,10 @@ public class WepayPayRespDto {
private String attach;
@XStreamAlias("time_end")
private String time_end;
@XStreamAlias("err_code")
private String err_code;
@XStreamAlias("err_code_des")
private String err_code_des;
public static void xmlToBean(){
String xmlStr = "<xml><return_code><![CDATA[SUCCESS]]></return_code>\n" +
......
......@@ -101,12 +101,14 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_PARAM_ERROR.getCode(),DragonErrorCodeEnum.TRADE_PARAM_ERROR.getMessage());
}
if(WepayConstant.WeixinTradeStateEnum.SUCCESS.getCode().equalsIgnoreCase(respWepayDto.getReturnCode())){
if(WepayConstant.WeixinTradeStateEnum.SUCCESS.getCode().equalsIgnoreCase(respWepayDto.getResultCode())){
if(WepayConstant.WeixinTradeStateEnum.SUCCESS.getCode().equalsIgnoreCase(respWepayDto.getResultCode())||dragonPayBaseReqDto.getDeviceFrom().equals(DragonConstant.DeviceFromEnum.MICROPAY.getCode())){
//构造公共返回参数
DragonPayBaseRespDto respPayDto = this.buildCommonRespDto(dragonPayBaseReqDto,respWepayDto);
//构造自定义返回参数
this.buildResponseDto(respPayDto,respWepayDto);
if(!WepayConstant.WeixinTradeStateEnum.SUCCESS.getCode().equalsIgnoreCase(respWepayDto.getResultCode())&&dragonPayBaseReqDto.getDeviceFrom().equals(DragonConstant.DeviceFromEnum.MICROPAY.getCode())) {
respPayDto.setMsg(respWepayDto.getErr_code_des());
}
//支付订单持久化
dragonServiceCommonBiz.buildPayOrders(dragonPayBaseReqDto,respPayDto);
log.info("wepay-->dragonPay--> 耗时:{}",(System.currentTimeMillis() - startTimeTotal)+"毫秒");
......
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