package com.crm.pay.service;

import com.crm.pay.entity.callback.korapay.checkout.KoraCheckoutCallbackEntity;
import com.crm.rely.backend.model.entity.finance.deposit.FinanceDepositAddEntity;

/**
 * @program: cwg-my-base
 * @description:
 * @author: houn
 * @create: 2023-05-12 10:44
 */
public interface KorapayCheckoutService {

    /**
     * 支付
     *
     * @param balanceSaveEntity
     * @return
     * @throws ServiceException
     */
    String pay(FinanceDepositAddEntity balanceSaveEntity) throws Exception;

    boolean validate(String wehbookData, String signature) throws Exception;

    /**
     * 回调
     *
     * @param callbackEntity
     * @throws ServiceException
     */
    void callback(KoraCheckoutCallbackEntity callbackEntity) throws Exception;

    void callbackSerial(String transactionReference) throws Exception;

}
