package com.sonic.lion.service;

/**
 * @author: code
 * @date: 2025/06/24
 * @Description:
 * @version: 1.0.0
 */
public interface IapV2Service {

    /**
     * 处理订阅的 回调通知
     * @param
     * @return
     */
    boolean handSubscribeWebhook(Long receiptId, String payload);

    /**
     * 处理状态变更的回调
     * @param receiptId
     * @param payload
     */
    void doWhenStatusChange(Long receiptId, String payload);

    /**
     * 处理 CANCEL 的通知类型
     * @param receiptId
     * @param payload
     */
    void doWhenCancel(Long receiptId, String payload);

    /**
     * 处理付款续订的通知类型
     * @param receiptId
     * @param payload
     */
    void doWhenPay(Long receiptId, String payload);

    /**
     * 处理付款续订失败的通知类型
     * @param receiptId
     * @param payload
     */
    void doWhenPayFail(Long receiptId, String payload);

    /**
     * 处理发起争议的通知类型
     * @param receiptId
     * @param payload
     */
    void doWhenConsumptionRequest(Long receiptId, String payload);
}
