-
Notifications
You must be signed in to change notification settings - Fork 0
/
PayooPayment.cs
85 lines (76 loc) · 3.1 KB
/
PayooPayment.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Runtime.Serialization;
using Mediachase.Commerce.Orders;
using Mediachase.MetaDataPlus.Configurator;
namespace Foundation.Commerce.Payment.Payoo
{
/// <summary>
/// Represents Payment class for Payoo.
/// </summary>
[Serializable]
public class PayooPayment : Mediachase.Commerce.Orders.Payment
{
private static MetaClass _metaClass;
public PayooPayment()
: base(PayooPaymentMetaClass)
{
PaymentType = PaymentType.Other;
ImplementationClass = GetType().AssemblyQualifiedName; // need to have assembly name in order to retrieve the correct type in ClassInfo
}
///// <summary>
///// Initializes a new instance of the <see cref="PayooPayment"/> class.
///// </summary>
///// <param name="info">The info.</param>
///// <param name="context">The context.</param>
//public PayooPayment(SerializationInfo info, StreamingContext context) : base(info, context)
//{
// PaymentType = PaymentType.Other;
// ImplementationClass = GetType().AssemblyQualifiedName; // need to have assembly name in order to retrieve the correct type in ClassInfo
//}
/// <summary>
/// Gets the payoo payment meta class.
/// </summary>
/// <value>The credit card payment meta class.</value>
public static MetaClass PayooPaymentMetaClass => _metaClass ?? (_metaClass = MetaClass.Load(OrderContext.MetaDataContext, "PayooPayment"));
/// <summary>
/// Payoo will response the OrderId to Merchant
/// </summary>
public string PayooOrderId
{
get { return GetString(Constant.PayooOrderIdPropertyName); }
set { this[Constant.PayooOrderIdPropertyName] = value; }
}
/// <summary>
/// Order number. It should be unique from your system and use for Data exchange processing
/// </summary>
public string PayooOrderNumber
{
get { return GetString(Constant.PayooOrderNumberPropertyName); }
set { this[Constant.PayooOrderNumberPropertyName] = value; }
}
/// <summary>
/// Total amount. It must be in Vietnam Dong.
/// </summary>
public string PayooAmount
{
get { return GetString(Constant.PayooAmountPropertyName); }
set { this[Constant.PayooAmountPropertyName] = value; }
}
/// <summary>
/// Payoo will response the OrderId to Merchant
/// </summary>
public string PayooExpiryDate
{
get { return GetString(Constant.PayooExpiryDatePropertyName); }
set { this[Constant.PayooExpiryDatePropertyName] = value; }
}
/// <summary>
/// If Merchant has use method of store payment, Payoo will response payment code to Merchant.
/// </summary>
public string PayooPaymentCode
{
get { return GetString(Constant.PayooPaymentCodePropertyName); }
set { this[Constant.PayooPaymentCodePropertyName] = value; }
}
}
}