using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services;
using Yi.Framework.AiHub.Application.Contracts.Dtos.Pay;

namespace Yi.Framework.AiHub.Application.Contracts.IServices;

/// <summary>
/// 支付服务接口
/// </summary>
public interface IPayService : IApplicationService
{
    /// <summary>
    /// 创建订单并发起支付
    /// </summary>
    /// <param name="input">创建订单输入</param>
    /// <returns>订单创建结果</returns>
    Task<CreateOrderOutput> CreateOrderAsync(CreateOrderInput input);

    /// <summary>
    /// 支付宝异步通知处理
    /// </summary>
    /// <param name="form">表单数据</param>
    /// <returns></returns>
    Task<string> AlipayNotifyAsync([FromForm] IFormCollection form);

    /// <summary>
    /// 查询订单状态
    /// </summary>
    /// <param name="input">查询订单状态输入</param>
    /// <returns>订单状态信息</returns>
    Task<QueryOrderStatusOutput> QueryOrderStatusAsync([FromQuery] QueryOrderStatusInput input);

    /// <summary>
    /// 获取商品列表
    /// </summary>
    /// <param name="input">获取商品列表输入</param>
    /// <returns>商品列表</returns>
    Task<List<GoodsListOutput>> GetGoodsListAsync([FromQuery] GetGoodsListInput input);
}