Authored by tanling

入驻and充值 支付宝不允许是用信用卡类型

@@ -6,6 +6,7 @@ import com.google.common.base.Splitter; @@ -6,6 +6,7 @@ import com.google.common.base.Splitter;
6 import com.yoho.error.ServiceError; 6 import com.yoho.error.ServiceError;
7 import com.yoho.error.exception.ServiceException; 7 import com.yoho.error.exception.ServiceException;
8 import com.yohobuy.ufo.model.order.bo.OrderInfo; 8 import com.yohobuy.ufo.model.order.bo.OrderInfo;
  9 +import com.yohobuy.ufo.model.order.common.OrderCodeType;
9 import com.yohobuy.ufo.model.order.common.Payment; 10 import com.yohobuy.ufo.model.order.common.Payment;
10 import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO; 11 import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
11 import com.yohoufo.common.utils.*; 12 import com.yohoufo.common.utils.*;
@@ -19,6 +20,8 @@ import com.yohoufo.order.model.PayRefundBo; @@ -19,6 +20,8 @@ import com.yohoufo.order.model.PayRefundBo;
19 import com.yohoufo.order.model.PaymentData; 20 import com.yohoufo.order.model.PaymentData;
20 import com.yohoufo.order.model.TransferData; 21 import com.yohoufo.order.model.TransferData;
21 import com.yohoufo.order.service.pay.AbstractPayService; 22 import com.yohoufo.order.service.pay.AbstractPayService;
  23 +import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
  24 +import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
22 import com.yohoufo.order.service.transfer.TransferChannel; 25 import com.yohoufo.order.service.transfer.TransferChannel;
23 import com.yohoufo.order.service.transfer.TransferResult; 26 import com.yohoufo.order.service.transfer.TransferResult;
24 import com.yohoufo.order.utils.AlipayExceedMillionTransferErrors; 27 import com.yohoufo.order.utils.AlipayExceedMillionTransferErrors;
@@ -68,6 +71,10 @@ public abstract class AlipayServiceAbstract extends AbstractPayService { @@ -68,6 +71,10 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
68 71
69 72
70 @Autowired 73 @Autowired
  74 + OrderCodeGenerator orderCodeGenerator;
  75 +
  76 +
  77 + @Autowired
71 private OrdersPayHbfqMapper ordersPayHbfqDao; 78 private OrdersPayHbfqMapper ordersPayHbfqDao;
72 79
73 80
@@ -638,6 +645,11 @@ public abstract class AlipayServiceAbstract extends AbstractPayService { @@ -638,6 +645,11 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
638 tradeNo = outTradeNo; 645 tradeNo = outTradeNo;
639 } 646 }
640 647
  648 + // 入驻or充值 不允许用支付信用卡入口
  649 + CodeMeta codeMeta = orderCodeGenerator.expId(Long.parseLong(tradeNo));
  650 + if (codeMeta.getType() == OrderCodeType.SELLER_RECHARGE_EARNEST_TYPE.getType()){
  651 + params.put("disable_pay_channels", "credit_group"); // 禁用信用卡
  652 + }
641 653
642 JSONObject bizJson = new JSONObject(true); 654 JSONObject bizJson = new JSONObject(true);
643 bizJson.put("timeout_express", payExpireTime+"m"); //该订单允许的最晚付款时间 655 bizJson.put("timeout_express", payExpireTime+"m"); //该订单允许的最晚付款时间
@@ -15,9 +15,9 @@ public class CodeTest { @@ -15,9 +15,9 @@ public class CodeTest {
15 // System.out.print(result); 15 // System.out.print(result);
16 // System.out.println(" 反解结果: "+ orderCodeGenerator.expId(result)); 16 // System.out.println(" 反解结果: "+ orderCodeGenerator.expId(result));
17 // } 17 // }
18 - Long ordercode = 36378182115151L; 18 + Long ordercode = 18785142759232l;
19 CodeMeta meta = orderCodeGenerator.expId(ordercode); 19 CodeMeta meta = orderCodeGenerator.expId(ordercode);
20 - System.out.println(meta); 20 + System.out.println(meta.getType());
21 21
22 // System.out.println(1<<3); 22 // System.out.println(1<<3);
23 23