Skip to content

Commit e2e5527

Browse files
Update account holder and payment responses
1 parent c18a612 commit e2e5527

File tree

10 files changed

+108
-38
lines changed

10 files changed

+108
-38
lines changed
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,7 @@
11
namespace Checkout.Common
22
{
3-
public class AccountHolder
3+
public class AccountHolder : AccountHolderBase
44
{
5-
public AccountHolderType? Type { get; set; }
6-
7-
public string FullName { get; set; }
8-
9-
public string FirstName { get; set; }
10-
11-
public string MiddleName { get; set; }
12-
13-
public string LastName { get; set; }
14-
15-
public string Email { get; set; }
16-
17-
public string Gender { get; set; }
18-
19-
public string CompanyName { get; set; }
20-
21-
public string TaxId { get; set; }
22-
23-
public string DateOfBirth { get; set; }
24-
25-
public CountryCode? CountryOfBirth { get; set; }
26-
27-
public string ResidentialStatus { get; set; }
28-
29-
public Address BillingAddress { get; set; }
30-
31-
public Phone Phone { get; set; }
32-
33-
public AccountHolderIdentification Identification { get; set; }
34-
355
public bool AccountNameInquiry { get; set; }
36-
376
}
387
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace Checkout.Common
2+
{
3+
public class AccountHolderBase
4+
{
5+
public AccountHolderType? Type { get; set; }
6+
7+
public string FullName { get; set; }
8+
9+
public string FirstName { get; set; }
10+
11+
public string MiddleName { get; set; }
12+
13+
public string LastName { get; set; }
14+
15+
public string Email { get; set; }
16+
17+
public string Gender { get; set; }
18+
19+
public string CompanyName { get; set; }
20+
21+
public string TaxId { get; set; }
22+
23+
public string DateOfBirth { get; set; }
24+
25+
public CountryCode? CountryOfBirth { get; set; }
26+
27+
public string ResidentialStatus { get; set; }
28+
29+
public Address BillingAddress { get; set; }
30+
31+
public Phone Phone { get; set; }
32+
33+
public AccountHolderIdentification Identification { get; set; }
34+
35+
}
36+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Checkout.Common
2+
{
3+
public class AccountHolderResponse : AccountHolderBase
4+
{
5+
public AccountNameInquiryType? AccountNameInquiry { get; set; }
6+
}
7+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Runtime.Serialization;
2+
3+
namespace Checkout.Common
4+
{
5+
public enum AccountNameInquiryType
6+
{
7+
[EnumMember(Value = "full_match")] FullMatch,
8+
[EnumMember(Value = "partial_match")] PartialMatch,
9+
[EnumMember(Value = "no_match")] NoMatch,
10+
[EnumMember(Value = "not_performed")] NotPerformed,
11+
[EnumMember(Value = "not_supported")] NotSupported,
12+
}
13+
}

src/CheckoutSdk/Payments/Contexts/PaymentContextsItems.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ public class PaymentContextsItems
1212
public string Reference { get; set; }
1313

1414
public int? TotalAmount { get; set; }
15+
16+
public long? TaxRate { get; set; }
1517

1618
public int? TaxAmount { get; set; }
1719

1820
public int? DiscountAmount { get; set; }
21+
22+
public string WxpayGoodsId { get; set; }
1923

2024
public string Url { get; set; }
2125

2226
public string ImageUrl { get; set; }
27+
28+
public string ServiceEndsOn { get; set; }
2329
}
2430
}

src/CheckoutSdk/Payments/ProcessingSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public class ProcessingSettings
6868

6969
public IList<ShippingInfo> ShippingInfo { get; set; }
7070

71+
public PanProcessedType? PanPreference { get; set; }
72+
7173
[JsonProperty(PropertyName = "senderInformation")]
7274
public string SenderInformation { get; set; }
7375
}

src/CheckoutSdk/Payments/ProductType.cs

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,40 @@ namespace Checkout.Payments
44
{
55
public enum ProductType
66
{
7-
[EnumMember(Value = "QR Code")] QrCode,
8-
[EnumMember(Value = "In-App")] InApp,
9-
[EnumMember(Value = "Official Account")]OfficialAccount,
10-
[EnumMember(Value = "Mini Program")] MiniProgram
7+
[EnumMember(Value = "QR Code")]
8+
QrCode,
9+
10+
[EnumMember(Value = "In-App")]
11+
InApp,
12+
13+
[EnumMember(Value = "Official Account")]
14+
OfficialAccount,
15+
16+
[EnumMember(Value = "Mini Program")]
17+
MiniProgram,
18+
19+
[EnumMember(Value = "pay_in_full")]
20+
PayInFull,
21+
22+
[EnumMember(Value = "pay_by_instalment")]
23+
PayByInstalment,
24+
25+
[EnumMember(Value = "pay_by_instalment_2")]
26+
PayByInstalment2,
27+
28+
[EnumMember(Value = "pay_by_instalment_3")]
29+
PayByInstalment3,
30+
31+
[EnumMember(Value = "pay_by_instalment_4")]
32+
PayByInstalment4,
33+
34+
[EnumMember(Value = "pay_by_instalment_6")]
35+
PayByInstalment6,
36+
37+
[EnumMember(Value = "invoice")]
38+
Invoice,
39+
40+
[EnumMember(Value = "pay_later")]
41+
PayLater
1142
}
1243
}

src/CheckoutSdk/Payments/Request/PaymentRequest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public class PaymentRequest
1717

1818
public Currency? Currency { get; set; }
1919

20-
public PaymentType? PaymentType { get; set; }
20+
public PaymentType? PaymentType { get; set; } = Payments.PaymentType.Regular;
21+
22+
public PaymentPlan PaymentPlan { get; set; }
2123

2224
public bool? MerchantInitiated { get; set; }
2325

src/CheckoutSdk/Payments/Response/PaymentResponse.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ public class PaymentResponse : Resource
1010
{
1111
public string Id { get; set; }
1212

13+
public PaymentType? PaymentType { get; set; }
14+
15+
public PaymentPlan PaymentPlan { get; set; }
16+
1317
public string ActionId { get; set; }
1418

1519
public long? Amount { get; set; }

src/CheckoutSdk/Payments/Response/Source/CardResponseSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class CardResponseSource : AbstractResponseSource, IResponseSource
5050

5151
public AccountUpdateStatus? AccountUpdateStatus { get; set; }
5252

53-
public AccountHolder AccountHolder { get; set; }
53+
public AccountHolderResponse AccountHolder { get; set; }
5454

5555
public new PaymentSourceType? Type()
5656
{

0 commit comments

Comments
 (0)