34 lines
2.5 KiB
C#
34 lines
2.5 KiB
C#
|
|
using FlatRender.IdentitySvc.Models.Requests;
|
||
|
|
using FlatRender.IdentitySvc.Models.Responses;
|
||
|
|
|
||
|
|
namespace FlatRender.IdentitySvc.Application.Services.Interfaces;
|
||
|
|
|
||
|
|
public interface IPaymentService
|
||
|
|
{
|
||
|
|
Task<PagedResponse<PaymentResponse>> GetUserPaymentsAsync(Guid userId, int page, int pageSize);
|
||
|
|
Task<PaymentResponse> GetByIdAsync(Guid paymentId, Guid userId);
|
||
|
|
|
||
|
|
// ── ZarinPal ────────────────────────────────────────────────────────────────
|
||
|
|
/// <summary>Calls ZarinPal request API and returns the zarinpal.com redirect URL.</summary>
|
||
|
|
Task<string> InitiateZarinPalAsync(Guid paymentId, Guid userId);
|
||
|
|
Task<string> HandleZarinPalCallbackAsync(string authority, string status);
|
||
|
|
|
||
|
|
// ── SnapPay ──────────────────────────────────────────────────────────────────
|
||
|
|
/// <summary>Calls SnapPay token API and returns the snappay.ir redirect URL.</summary>
|
||
|
|
Task<string> InitiateSnapPayAsync(Guid paymentId, Guid userId);
|
||
|
|
/// <summary>Handles SnapPay callback query params (paymentToken, shapSnapStatus).</summary>
|
||
|
|
Task<string> HandleSnapPayCallbackAsync(string paymentToken, string shapStatus);
|
||
|
|
|
||
|
|
// ── Tara ─────────────────────────────────────────────────────────────────────
|
||
|
|
/// <summary>Calls Tara request API and returns the tara.ir redirect URL.</summary>
|
||
|
|
Task<string> InitiateTaraAsync(Guid paymentId, Guid userId);
|
||
|
|
/// <summary>Handles Tara callback query params (token, status).</summary>
|
||
|
|
Task<string> HandleTaraCallbackAsync(string token, string status);
|
||
|
|
|
||
|
|
// ── Stripe ───────────────────────────────────────────────────────────────────
|
||
|
|
Task HandleStripeWebhookAsync(string payload, string signature);
|
||
|
|
|
||
|
|
// ── Refunds ───────────────────────────────────────────────────────────────────
|
||
|
|
Task<RefundResponse> IssueRefundAsync(Guid paymentId, long? amountMinor, string reason, string refundTo);
|
||
|
|
}
|