105 lines
3.0 KiB
C#
105 lines
3.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using _0_Framework.Application;
|
|
using _0_Framework.Application.PaymentGateway;
|
|
|
|
namespace CompanyManagment.App.Contracts.PaymentTransaction;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public interface IPaymentTransactionApplication
|
|
{
|
|
/// <summary>
|
|
/// لیست تراکنش های پرداخت را بر اساس فیلتر مشخص شده برمی گرداند.
|
|
/// </summary>
|
|
/// <param name="searchModel"></param>
|
|
/// <returns></returns>
|
|
Task<List<GetPaymentTransactionListViewModel>> GetPaymentTransactionList(
|
|
GetPaymentTransactionListSearchModel searchModel);
|
|
/// <summary>
|
|
/// ایجاد تراکنش
|
|
/// </summary>
|
|
/// <param name="command"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResult> Create(CreatePaymentTransaction command);
|
|
|
|
Task<WalletAmountResponse> GetWalletAmount(CancellationToken cancellationToken);
|
|
/// <summary>
|
|
/// گرفتن جزئیات تراکنش
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<PaymentTransactionDetailsViewModel> GetDetails(long id);
|
|
|
|
/// <summary>
|
|
/// تغییر وضعیت تراکنش به ناموفق
|
|
/// </summary>
|
|
/// <param name="paymentTransactionId"></param>
|
|
/// <param name="status"></param>
|
|
/// <returns></returns>
|
|
OperationResult SetFailed(long paymentTransactionId);
|
|
|
|
/// <summary>
|
|
/// تغییر وضعیت تراکنش به موفق
|
|
/// </summary>
|
|
/// <param name="paymentTransactionId"></param>
|
|
/// <param name="cardNumber"></param>
|
|
/// <param name="bankName"></param>
|
|
/// <returns></returns>
|
|
OperationResult SetSuccess(long paymentTransactionId, string cardNumber, string bankName);
|
|
|
|
Task<OperationResult> SetTransactionId(long id, string transactionId);
|
|
}
|
|
|
|
public class PaymentTransactionDetailsViewModel
|
|
{
|
|
/// <summary>
|
|
/// آیدی
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// تاریخ و زمان انجام پرداخت
|
|
/// </summary>
|
|
public DateTime TransactionDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// شناسه طرف حساب
|
|
/// </summary>
|
|
public long ContractingPartyId { get; set; }
|
|
|
|
/// <summary>
|
|
/// نام طرف حساب
|
|
/// </summary>
|
|
public string ContractingPartyName { get; set; }
|
|
|
|
/// <summary>
|
|
/// نام بانک
|
|
/// </summary>
|
|
public string BankName { get; set; }
|
|
|
|
/// <summary>
|
|
/// شماره کارت
|
|
/// </summary>
|
|
public string CardNumber { get; set; }
|
|
|
|
/// <summary>
|
|
/// وضعیت تراکنش پرداخت
|
|
/// </summary>
|
|
public PaymentTransactionStatus Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// مبلغ تراکنش
|
|
/// </summary>
|
|
public double Amount { get; set; }
|
|
|
|
/// <summary>
|
|
/// شناسه یکتای تراکنش
|
|
/// </summary>
|
|
public string TransactionId { get; set; }
|
|
|
|
public string CallBackUrl { get; set; }
|
|
} |