84 lines
2.9 KiB
C#

namespace Marco.Pms.Model.ViewModels.PaymentGetway
{
public class PaymentDetailsVM
{
public Guid Id { get; set; }
public RazorpayPaymentDetails? RazorpayPaymentDetails { get; set; }
public RazorpayOrderDetails? RazorpayOrderDetails { get; set; }
}
public class RazorpayPaymentDetails
{
public string? PaymentId { get; set; }
public string? OrderId { get; set; }
public decimal Amount { get; set; }
public string? Currency { get; set; }
public string? Status { get; set; } // created, authorized, captured, refunded, failed
public string? Method { get; set; } // card, netbanking, wallet, upi
public string? Email { get; set; }
public string? Contact { get; set; }
public string? Description { get; set; }
public string? CustomerName { get; set; }
public DateTime CreatedAt { get; set; }
// Payment method specific details
public CardDetails? CardDetails { get; set; }
public BankDetails? BankDetails { get; set; }
public UpiDetails? UpiDetails { get; set; }
public WalletDetails? WalletDetails { get; set; }
// Fee and tax
public decimal Fee { get; set; }
public decimal Tax { get; set; }
// Error details (if payment failed)
public string? ErrorCode { get; set; }
public string? ErrorDescription { get; set; }
// Additional flags
public bool InternationalPayment { get; set; }
public bool Captured { get; set; }
}
public class CardDetails
{
public string? CardId { get; set; }
public string? Last4Digits { get; set; }
public string? Network { get; set; } // Visa, MasterCard, Amex, RuPay
public string? CardType { get; set; } // credit, debit, prepaid
public string? Issuer { get; set; } // Bank name
public bool International { get; set; }
public bool Emi { get; set; }
public string? SubType { get; set; } // consumer, business
}
public class BankDetails
{
public string? Bank { get; set; }
public string? BankCode { get; set; }
}
public class UpiDetails
{
public string? Vpa { get; set; } // UPI ID
public string? Provider { get; set; }
}
public class WalletDetails
{
public string? WalletName { get; set; } // paytm, phonepe, amazonpay, freecharge, jiomoney, olamoney
}
public class RazorpayOrderDetails
{
public string? OrderId { get; set; }
public decimal Amount { get; set; }
public string? Currency { get; set; }
public string? Status { get; set; }
public string? Receipt { get; set; }
public DateTime CreatedAt { get; set; }
public decimal AmountPaid { get; set; }
public decimal AmountDue { get; set; }
public int Attempts { get; set; }
}
}