package com.sqx.modules.pay.service;

import com.sqx.common.utils.Result;
import com.sqx.modules.pay.dto.PayOrderDTO;
import com.sqx.modules.pay.entity.PayDetails;

import java.math.BigDecimal;


/**
 * @author fang
 * @date 2020/2/26
 */
public interface WxService {

    Result payMoney(Long userId, BigDecimal money, Integer type) throws Exception;

    /**
     * 订单支付
     * @param userId 用户id
     * @param payOrderDTO 支付订单dto
     * @throws Exception
     */
    Result payOrder(Long userId, PayOrderDTO payOrderDTO) throws Exception;

    String payBack(String resXml,Integer type);;

    String payBackShop(String resXml, Integer type);

    boolean wxRefund(PayDetails payDetails);

    /**
     * 余额支付订单
     * @param userId 用户id
     * @param payOrderDTO 支付订单dto
     * @return
     */
    Result balanceOrder(Long userId, PayOrderDTO payOrderDTO);

    Result shopCashDeposit(Long userId, Double money, String openId,Integer type) throws Exception;

    void notfiy(PayDetails payDetails);

    Result balanceBuyVip(Long userId);

    Result wxPayJsApiBuyVip(Long userId, Integer type) throws Exception;

    void notifyRider(PayDetails payDetails);

    /**
     * 获取token（临时方法）
     * @param type 1用户端、2商家端、3骑手端
     * @return token
     */
    String getAccessToken(String type);
}