class AliJsapi extends XxpayPaymentService {

    @Override
    public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {

        AliJsapiOrderRQ bizRQ = (AliJsapiOrderRQ) rq;
        if(StringUtils.isEmpty(bizRQ.getBuyerUserId())){
            throw new BizException("[buyerUserId]不可为空");
        }

        return null;
    }

    @Override
    public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchAppConfigContext mchAppConfigContext) throws Exception{<FILL_FUNCTION_BODY>}

}

        AliJsapiOrderRQ bizRQ = (AliJsapiOrderRQ) rq;
        XxpayNormalMchParams params = (XxpayNormalMchParams)configContextQueryService.queryNormalMchParams(mchAppConfigContext.getMchNo(), mchAppConfigContext.getAppId(), getIfCode());
        // 构造支付请求参数
        Map<String,Object> paramMap = new TreeMap();
        paramMap.put("mchId", params.getMchId());
        paramMap.put("productId", "8008"); // 支付宝服务端支付
        paramMap.put("mchOrderNo", payOrder.getPayOrderId());
        paramMap.put("amount", payOrder.getAmount() + "");
        paramMap.put("currency", "cny");
        paramMap.put("clientIp", payOrder.getClientIp());
        paramMap.put("device", "web");
        paramMap.put("returnUrl", getReturnUrl());
        paramMap.put("notifyUrl", getNotifyUrl(payOrder.getPayOrderId()));
        paramMap.put("subject", payOrder.getSubject());
        paramMap.put("body", payOrder.getBody());
        paramMap.put("channelUserId", bizRQ.getBuyerUserId());
        // 构造函数响应数据
        AliJsapiOrderRS res = ApiResBuilder.buildSuccess(AliJsapiOrderRS.class);
        ChannelRetMsg channelRetMsg = new ChannelRetMsg();
        res.setChannelRetMsg(channelRetMsg);
        // 发起支付
        JSONObject resObj = doPay(payOrder, params, paramMap, channelRetMsg);
        if(resObj == null) {
            return res;
        }
        String alipayTradeNo = resObj.getJSONObject("payParams").getString("alipayTradeNo");
        res.setAlipayTradeNo(alipayTradeNo);
        return res;
    
<methods>public non-sealed void <init>() ,public java.lang.String getIfCode() ,public boolean isSupport(java.lang.String) ,public com.jeequan.jeepay.pay.rqrs.AbstractRS pay(com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ, com.jeequan.jeepay.core.entity.PayOrder, com.jeequan.jeepay.pay.model.MchAppConfigContext) throws java.lang.Exception,public java.lang.String preCheck(com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ, com.jeequan.jeepay.core.entity.PayOrder) <variables>