青年IT男

个人从事金融行业,就职过易极付、思建科技等重庆一流技术团队,目前就职于某网约车平台负责整个支付系统建设。自身对金融行业有强烈的爱好。同时也实践大数据、数据存储、自动化集成和部署、分布式微服务、人工智能等领域。

test

test


fsf
public CardauthResult send(CardauthOrder order) {
        InstChannelApiParam instChannelApiParam = instChannelApiParamService.getEntityByChannelApi(GatewayChannelApiEnum.sanxiapayAppPay.code());
        if (instChannelApiParam == null) {
            throw new BusinessException(GatewayResultCode.NOT_CHANNEL_ERROR,"不支持渠道gatewayChannelApi[" + GatewayChannelApiEnum.sanxiapayAppPay.code() + "]");
        }
        ServiceName serviceName = ServiceName.CARDAUTH_SERVICE;
        SanxiapayCardauthRequest cardauthRequest = new SanxiapayCardauthRequest(order);
        SanxiapayCardauthResponse cardauthResponse = null;
        try {
            SanxiapayResponse<SanxiapayCardauthResponse> sanxiapayResponse = SanxiapayUtil.post(instChannelApiParam,serviceName, cardauthRequest, new JsonTypeToken<SanxiapayResponse<SanxiapayCardauthResponse>>(){});
            cardauthResponse = sanxiapayResponse.getData();
        } catch (Exception e) {
            log.error("调用接口失败", e);
            return new CardauthResult("9999", "调用接口失败");
        }
        log.info("返回状态码:{},鉴权状态:{}",cardauthResponse.getRetcode(), cardauthResponse.getAuth_state());

        if (!cardauthResponse.getRetcode().equals(SanxiapayRetcode.SUCCESSED)) {
            return new CardauthResult(cardauthResponse.getRetcode(), cardauthResponse.getRetmsg());
        }
        CardauthResult result = new CardauthResult(cardauthResponse.getRetcode(), cardauthResponse.getRetmsg());
        result.setCardAuthId(cardauthResponse.getCard_auth_id());
        result.setAuthState(cardauthResponse.getAuth_state());
        return result;
    }
0
1028826685@qq.com