namespace WalletService.Domain.AggregatesModel.PaymentAggregate;

/// <summary>
/// EN: Value object representing a payment request to a payment gateway.
/// VI: Value object dai dien cho yeu cau thanh toan den cong thanh toan.
/// </summary>
/// <param name="OrderId">EN: The order identifier / VI: Ma don hang</param>
/// <param name="Amount">EN: Payment amount / VI: So tien thanh toan</param>
/// <param name="Currency">EN: Currency code (e.g., VND) / VI: Ma tien te (vd: VND)</param>
/// <param name="Description">EN: Payment description / VI: Mo ta thanh toan</param>
/// <param name="ReturnUrl">EN: URL to redirect after payment / VI: URL chuyen huong sau thanh toan</param>
/// <param name="IpAddress">EN: Customer IP address / VI: Dia chi IP khach hang</param>
public record PaymentRequest(
    Guid OrderId,
    decimal Amount,
    string Currency,
    string Description,
    string ReturnUrl,
    string IpAddress
);

/// <summary>
/// EN: Value object representing a payment gateway response.
/// VI: Value object dai dien cho ket qua tra ve tu cong thanh toan.
/// </summary>
/// <param name="Success">EN: Whether the operation succeeded / VI: Thao tac co thanh cong khong</param>
/// <param name="TransactionId">EN: Gateway transaction identifier / VI: Ma giao dich cong thanh toan</param>
/// <param name="PaymentUrl">EN: URL to redirect customer for payment / VI: URL chuyen huong khach hang de thanh toan</param>
/// <param name="ErrorCode">EN: Error code if failed / VI: Ma loi neu that bai</param>
/// <param name="ErrorMessage">EN: Error message if failed / VI: Thong bao loi neu that bai</param>
/// <param name="GatewayResponse">EN: Raw gateway response data / VI: Du lieu phan hoi tho tu cong thanh toan</param>
public record PaymentResult(
    bool Success,
    string? TransactionId = null,
    string? PaymentUrl = null,
    string? ErrorCode = null,
    string? ErrorMessage = null,
    IDictionary<string, string>? GatewayResponse = null
);
