add: implement payment callback handling and enhance financial invoice structure

This commit is contained in:
2025-12-31 15:49:44 +03:30
parent 14ff0a2e59
commit 66a6c411d6
9 changed files with 346 additions and 378 deletions

View File

@@ -10,7 +10,8 @@ public class EditFinancialInvoice
public double Amount { get; set; }
public FinancialInvoiceStatus Status { get; set; }
public List<EditFinancialInvoiceItem>? Items { get; set; }
public List<EditFinancialInvoiceItem> Items { get; set; }
public long ContractingPartyId { get; set; }
}
public class EditFinancialInvoiceItem

View File

@@ -0,0 +1,21 @@
using _0_Framework.Application;
using System.Threading;
using System.Threading.Tasks;
namespace CompanyManagment.App.Contracts.PaymentCallback;
/// <summary>
/// رابط برای مدیریت Callback درگاه‌های پرداخت
/// </summary>
public interface IPaymentCallbackHandler
{
/// <summary>
/// تأیید و پردازش callback درگاه پرداخت سپهر
/// </summary>
/// <param name="command">داده‌های callback درگاه</param>
/// <param name="cancellationToken">توکن لغو عملیات</param>
/// <returns>نتیجه عملیات</returns>
Task<OperationResult> VerifySepehrPaymentCallback(VerifyPaymentCallbackCommand command,
CancellationToken cancellationToken = default);
}

View File

@@ -0,0 +1,53 @@
namespace CompanyManagment.App.Contracts.PaymentCallback;
/// <summary>
/// دستور تأیید callback درگاه پرداخت
/// </summary>
public class VerifyPaymentCallbackCommand
{
/// <summary>
/// کد پاسخ درگاه (0 = موفق)
/// </summary>
public int ResponseCode { get; set; }
/// <summary>
/// شناسه فاکتور/تراکنش
/// </summary>
public long InvoiceId { get; set; }
/// <summary>
/// داده‌های اضافی JSON
/// </summary>
public string Payload { get; set; }
/// <summary>
/// مبلغ تراکنش
/// </summary>
public long Amount { get; set; }
/// <summary>
/// شماره پیگیری درگاه
/// </summary>
public long TraceNumber { get; set; }
/// <summary>
/// شماره سند بانکی (RRN)
/// </summary>
public long Rrn { get; set; }
/// <summary>
/// رسید دیجیتال
/// </summary>
public string DigitalReceipt { get; set; }
/// <summary>
/// بانک صادر کننده کارت
/// </summary>
public string IssuerBank { get; set; }
/// <summary>
/// شماره کارت
/// </summary>
public string CardNumber { get; set; }
}