package com.ai.da.service;

import com.ai.da.common.response.PageBaseResponse;
import com.ai.da.mapper.primary.entity.PaymentInfo;
import com.ai.da.model.dto.AlipayHKCallbackDTO;
import com.ai.da.model.dto.QueryPageByTimeDTO;
import com.ai.da.model.vo.OrderListVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.paypal.orders.Order;
import com.stripe.model.Charge;
import com.stripe.model.Invoice;

import java.util.List;
import java.util.Map;

public interface PaymentInfoService extends IService<PaymentInfo> {

    void createPaymentInfo(String plainText);

    void createPaymentInfoForAliPay(Map<String, String> params, String type);

    void createPaymentInfoForPayPal(Order order, String type);

    void createPaymentInfoForAliPayHK(AlipayHKCallbackDTO alipayHKCallbackDTO, String type);

    PaymentInfo createOrUpdatePaymentInfoForStripe(Invoice invoice);

    PaymentInfo createOrUpdatePaymentInfoForStripe(Charge charge);

    List<PaymentInfo> getPaymentInfoByOrderNo(String orderId, String order);

    void updatePaymentStatusById(Long id, String status, String content);

    PageBaseResponse<OrderListVO> getPaymentInfo(QueryPageByTimeDTO queryPageByTimeDTO);

    List<PaymentInfo> getPaymentInfoByPromCode(Long accountId, String promCode);

    PaymentInfo updatePaymentRefundStatus(Charge charge);
}
