package com.red.circle.order.app.service;

import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
import com.red.circle.common.business.dto.cmd.IdStringCmd;
import com.red.circle.order.app.dto.clientobject.PayMaxResponseCO;
import com.red.circle.order.app.dto.clientobject.PayerMaxResponseV2CO;
import com.red.circle.order.app.dto.clientobject.PurchaseReceiptCO;
import com.red.circle.order.app.dto.clientobject.pay.PayOrderStatusCO;
import com.red.circle.order.app.dto.clientobject.pay.PlaceAnOrderResponseCO;
import com.red.circle.order.app.dto.cmd.AbstractPurchaseCmd;
import com.red.circle.order.app.dto.cmd.PayOrderStatusCmd;
import com.red.circle.order.app.dto.cmd.PayPlaceAnOrderCmd;
import com.red.circle.order.app.dto.cmd.PayPlaceAnOrderReceiptCmd;
import java.util.Map;

/**
 * 内购产品服务.
 *
 * @author pengliang on 2020/11/23
 */
public interface InAppPurchaseProductService {

  PurchaseReceiptCO purchase(AbstractPurchaseCmd cmd);

  void googleServerNotice(SysOriginPlatformEnum sysOrigin, byte[] body);

  void appleServerNotice(SysOriginPlatformEnum sysOrigin, byte[] body);

  PayerMaxResponseV2CO payerMaxServerNoticeReceivePayment(byte[] body);

  PayMaxResponseCO payerMaxServerNoticeReceivePaymentOld(byte[] body);

  PayMaxResponseCO payerMaxServerNoticeRefundNotice(byte[] body);

  PlaceAnOrderResponseCO placeAnOrder(PayPlaceAnOrderCmd cmd);

  /**
   * 查询支付单状态.
   */
  PayOrderStatusCO orderStatus(PayOrderStatusCmd cmd);

  @Deprecated
  PlaceAnOrderResponseCO payReceipt(PayPlaceAnOrderReceiptCmd cmd);

  @Deprecated
  Object collectionReceipt(IdStringCmd cmd);

  void payPalNotice(byte[] body);

  void airwallexNotice(byte[] body);

  String paynicornNotice(byte[] body);

  void clipspayServerNotice(Map<String, String> body);

  /**
   * MiFaPay支付回调通知
   */
  String miFaPayServerNoticeReceivePayment(byte[] body);

}
