首绑支付

接口描述

绑卡以及交易. 首绑支付需要使用短验接口.下单未选择同步下发短信,发起交易时需要调用"首绑支付短信"接口进行短信验证

绑卡申请

基本信息

测试请求地址 https://cbtrxtest.helipay.com/cbtrx/rest/pay/firstApply
请求地址 https://cbptrx.helipay.com/cbtrx/rest/pay/firstApply
提交方式 采用POST方法提交,requestbody传值 Content-Type=[application/json;charset=UTF-8]
签名算法 UTF-8字符编码 SHA256签名 AES加密

请求参数

名称 参数 类型 必填 示例值 说明
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
订单号 orderNo String(64) 是 p_20170302185347
产品编码 productCode String(20) 是 QUICKPAY 固定值
用户编号 memberNo String 是 ID9527
用户姓名 memberName String(10) 是 张三
证件类型 idCardType String(18) 是 IDCARD
证件号码 memberID String(18) 是 110101200001012999
用户手机号 memberMobile String(20) 是 13701234567
卡号 cardNo String(19) 是 622******9890707
交易金额 orderAmount String(40) 是 1.0
交易币种 currency(10) String 是 CNY
商品数量 goodsQuantity String(20) 是 1
商品名称 goodsName String(40) 是 Mac
用户注册账号 userAccount String(40) 是 18900000001
应用类型 appType String(20) 是 IOS IOS、AND(安卓客户端)、H5、WX、OTHER
应用名 appName String(20) 是 某宝
业务场景 dealSceneType String(20) 是 QUICKPAY
终端类型 terminalType String(10) 是 IMEI IMEI、 MAC、 UUID(针对 IOS 系统)、 OTHER
终端标识 terminalId String(50) 是 122121212121
服务器通知回调地址 serverCallbackUrl String(40) 是 www.baidu.com
下单IP orderIp String(40) 是 127.0.0.1
是否同步下发短信 sendValidateCode String(10) 是 是/否
信用卡有效期年份 expireYear String(10) 否 21
信用卡有效期月份 expireMonth String(10) 否 03
cvv2 cvv2 String(10) 否
交易定位地址 lbs String(40) 否
场景参数 dealSceneParams String(40) 否
有效期单位 periodUnit String(20) 否 MINUTE
有效期 period String(20) 否 30

响应参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 QUICKPAY
订单号 orderNo String(64) 是 p_20170302185347
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
返回码 errorCode String(10) 是 0000 0000 代表请求成功
返回信息 errorMessage String(200) 否 成功 响应信息 错误信息
响应日期 current String(50) 否

代码示例

    @RequestMapping(value = "/firstQuickPay", method = RequestMethod.POST)
    public ModelAndView quickPay(@ModelAttribute @Valid FirstQuickPayRequestForm firstQuickPayRequestForm, BindingResult bindingResult) throws UnsupportedEncodingException {
        ModelAndView modelAndView = new ModelAndView();
        if (bindingResult.hasErrors()) {
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], bindingResult.getFieldError().getDefaultMessage());
        }

        HeliRequest result = HandleDataUtils.encodeAndSign(firstQuickPayRequestForm,firstQuickPayRequestForm.getProductCode(),firstQuickPayRequestForm.getMerchantNo());
        HeliRequest heliRequest = remoteService.postRemoteInvoke(LoadPropertiesUtils.getProperty("firstQuickURL"), JSONObject.toJSONString(result), HeliRequest.class);
        FirstQuickPayOrderResponseForm responseForm = HandleDataUtils.decode(heliRequest, FirstQuickPayOrderResponseForm.class,firstQuickPayRequestForm.getProductCode(),firstQuickPayRequestForm.getMerchantNo());
        if (!CbDemoConstants.SUCCESS_CODE.equals(responseForm.getErrorCode())) {
            throw new CommonSystemException(responseForm.getErrorCode(),responseForm.getErrorMessage());
        }
        logger.info(responseForm.getOrderNo());
        modelAndView.addObject("responseForm", responseForm);
        modelAndView.setViewName("firstpay/firstQuickPayResult");
        return modelAndView;
    }

                                

                                

                                

首次支付短信

基本信息

测试请求地址 https://cbtrxtest.helipay.com/cbtrx/rest/pay/firstApplyConfirmSMS
请求地址 https://cbptrx.helipay.com/cbtrx/rest/pay/firstApplyConfirmSMS
提交方式 采用POST方法提交,requestbody传值 Content-Type=[application/json;charset=UTF-8]
签名算法 UTF-8字符编码 SHA256签名 AES加密

请求参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 QUICKPAY
原申请订单号 orderNo String(64) 是 p_20170302185347 原绑卡申请订单号
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号

响应参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 QUICKPAY
原申请订单号 orderNo String(64) 是 p_20170302185347 原绑卡申请订单号
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
返回码 errorCode String(10) 是 0000 0000 代表请求成功
返回信息 errorMessage String(200) 否 成功 响应信息 错误信息

代码示例

      @RequestMapping(value = "/firstQuickPayConfirmSms", method = RequestMethod.POST)
    public ModelAndView quickPayConfirmSMS(@ModelAttribute @Valid NewQuickPayConfirmSMSRequestForm requestForm, BindingResult bindingResult) throws UnsupportedEncodingException {

        ModelAndView modelAndView = new ModelAndView();
        if (bindingResult.hasErrors()) {
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], bindingResult.getFieldError().getDefaultMessage());
        }

        HeliRequest result = HandleDataUtils.encodeAndSign(requestForm,requestForm.getProductCode(),requestForm.getMerchantNo());
        HeliRequest heliRequest = remoteService.postRemoteInvoke(LoadPropertiesUtils.getProperty("firstQUickURLSMS"), JSONObject.toJSONString(result), HeliRequest.class);
        NewQuickPayConfirmSMSResponseForm responseForm = HandleDataUtils.decode(heliRequest, NewQuickPayConfirmSMSResponseForm.class,requestForm.getProductCode(),requestForm.getMerchantNo());

        if (!CbDemoConstants.SUCCESS_CODE.equals(responseForm.getErrorCode())) {
            throw new CommonSystemException(responseForm.getErrorCode(),responseForm.getErrorMessage());
        }
        logger.info(responseForm.getOrderNo());
        modelAndView.addObject("responseForm", responseForm);
        modelAndView.setViewName("firstpay/firstReSendMsgResult");
        return modelAndView;
    }

                                

                                

                                

首绑支付确认

基本信息

测试请求地址 https://cbtrxtest.helipay.com/cbtrx/rest/pay/firstApplyConfirm
请求地址 https://cbptrx.helipay.com/cbtrx/rest/pay/firstApplyConfirm
提交方式 采用POST方法提交,requestbody传值 Content-Type=[application/json;charset=UTF-8]
签名算法 UTF-8字符编码 SHA256签名 AES加密

请求参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 QUICKPAY
商户订单号 orderNo String(64) 是 p_20170302185347
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
短信验证码 smsCode String(10) 是 123456 短信验证码

响应参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 QUICKPAY
商户订单号 orderNo String(64) 是 p_20170302185347
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
响应码 retCode String(10) 否 0000 0000 代表请求成功
响应信息 retMsg String(200) 否 成功 响应信息 错误信息
绑卡ID bindId String(40) 否

代码示例

   @RequestMapping(value = "/firstQuickPayConfirm", method = RequestMethod.POST)
    public ModelAndView quickPayConfirm(@ModelAttribute @Valid FirstQuickPayConfirmRequestForm requestForm, BindingResult bindingResult) throws UnsupportedEncodingException {
        ModelAndView modelAndView = new ModelAndView();
        if (bindingResult.hasErrors()) {
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], bindingResult.getFieldError().getDefaultMessage());
        }

        HeliRequest result = HandleDataUtils.encodeAndSign(requestForm,requestForm.getProductCode(),requestForm.getMerchantNo());
        HeliRequest heliRequest = remoteService.postRemoteInvoke(LoadPropertiesUtils.getProperty("firstQuickConfirm"), JSONObject.toJSONString(result), HeliRequest.class);
        FirstQuickPayConfirmResponseForm responseForm = HandleDataUtils.decode(heliRequest, FirstQuickPayConfirmResponseForm.class,requestForm.getProductCode(),requestForm.getMerchantNo());

        if (!CbDemoConstants.SUCCESS_CODE.equals(responseForm.getErrorCode())){
            throw new CommonSystemException(responseForm.getErrorCode(),responseForm.getErrorMessage());
        }
        logger.info(responseForm.getOrderNo());

        modelAndView.addObject("responseForm", responseForm);
        modelAndView.setViewName("firstpay/firstQuickPayConfirmResult");
        return modelAndView;
    }

                                

                                

                                

错误码

错误码 错误码描述 解决方案