package com.bohuikeji.delivery.backstage.service;

import com.alibaba.fastjson.JSONObject;
import com.bohuikeji.delivery.backstage.entity.TOrder;
import com.bohuikeji.delivery.backstage.entity.TPay;
import com.bohuikeji.delivery.backstage.entity.rental.TRentalCarOrder;
import com.bohuikeji.delivery.backstage.entity.rental.TRentalPay;
import com.bohuikeji.frame.module.admin.base.ServiceBase;
import com.bohuikeji.frame.module.admin.entity.back.APIEntity;
import com.bohuikeji.frame.module.admin.entity.vo.AliReturnPayVo;

import javax.servlet.http.HttpServletRequest;

public interface ITRentalPayService extends ServiceBase<TRentalPay> {
    /**
     * 订单业务创建预支付单（微信，支付宝）
     * @return
     */
    TRentalPay createBeforePay(TRentalCarOrder carOrder, String payMethod, String payWay);

    /**
     * 各端调起支付预支付订单
     * @param tOrder
     * @param type
     * @param request
     * @return
     * @throws Exception
     */
    APIEntity getPayAPIEntity(TRentalCarOrder carOrder, HttpServletRequest request) throws Exception;

    TRentalPay aliCallbackPay(AliReturnPayVo req,TRentalPay rentalPay);

    TRentalPay wxCallbackPay(JSONObject jsonObject,TRentalPay rentalPay);
}
