-
Notifications
You must be signed in to change notification settings - Fork 1
/
AlepayCheckoutParams.cs
69 lines (64 loc) · 2.29 KB
/
AlepayCheckoutParams.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
namespace Foundation.Commerce.Payment.Alepay
{
public enum CheckoutTypes
{
/// <summary>
/// Normal payment with Visa/master/jcb card and installment
/// </summary>
CreditCardAndInstallment,
/// <summary>
/// Normal payment only with Visa/jcb/ master card
/// </summary>
CreditCard,
/// <summary>
/// Installment payment only
/// </summary>
Installment,
/// <summary>
/// Normal payment with ATM, IB, QRCODE, Visa/master/jcb card and installment if allowDomestic = true
/// </summary>
CreditCardAndInstallmentAndDomesticCard,
/// <summary>
/// Normal payment only with ATM, IB, QRCODE, Visa/master/jcb card if allowDomestic = true
/// </summary>
CreditCardAndDomesticCard
}
public class AlepayCheckoutParams
{
public virtual int CheckoutType { get; set; }
public virtual bool Installment { get; set; }
public virtual bool AllowDomestic { get; set; }
public virtual int Month { get; set; }
public virtual string BankCode { get; set; }
public virtual string PaymentMethod { get; set; }
}
public class DefaultAlepayCheckoutParams : AlepayCheckoutParams
{
public override int CheckoutType => (int)CheckoutTypes.CreditCardAndInstallment;
public override bool Installment => false;
public override bool AllowDomestic => false;
}
public class CreditCardParams
{
public int CheckoutType => (int)CheckoutTypes.CreditCard;
public bool Installment => false;
public bool AllowDomestic => false;
}
public class InstallmentParams
{
public int CheckoutType => (int)CheckoutTypes.Installment;
public bool Installment => true;
public bool AllowDomestic => false;
public int Month { get; set; }
public string BankCode { get; set; }
public string PaymentMethod { get; set; }
}
public class DomesticCardParams
{
public int CheckoutType => (int)CheckoutTypes.CreditCardAndDomesticCard;
public bool Installment => false;
public bool AllowDomestic => true;
public string BankCode { get; set; }
public string PaymentMethod { get; set; }
}
}