Skip to content

Commit f7734f5

Browse files
Update Hosted Payment Page Payment Contexts and tests: (#453)
- Update Hosted Payment Page with latest changes - Update Customer Requests implementations - Enhance Accounts for Account holder implementations - Update tests
1 parent 7cf92f1 commit f7734f5

37 files changed

+416
-109
lines changed

src/CheckoutSdk/Accounts/AccountsAccountHolder.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ public abstract class AccountsAccountHolder
2323
public AccountHolderIdentification Identification { get; set; }
2424

2525
public string Email { get; set; }
26+
27+
protected AccountsAccountHolder(AccountHolderType type)
28+
{
29+
Type = type;
30+
}
2631
}
2732
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
using Checkout.Common;
2+
13
namespace Checkout.Accounts
24
{
35
public class AccountsCorporateAccountHolder : AccountsAccountHolder
46
{
7+
public AccountsCorporateAccountHolder() : base(AccountHolderType.Corporate) { }
8+
59
public string CompanyName { get; set; }
610
}
711
}

src/CheckoutSdk/Accounts/AccountsIndividualAccountHolder.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
using Checkout.Common;
2+
13
namespace Checkout.Accounts
24
{
35
public class AccountsIndividualAccountHolder : AccountsAccountHolder
46
{
7+
public AccountsIndividualAccountHolder() : base(AccountHolderType.Individual) { }
58
public string FirstName { get; set; }
69

710
public string LastName { get; set; }

src/CheckoutSdk/Common/CustomerRequest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
{
33
public class CustomerRequest
44
{
5-
public string Id { get; set; }
6-
75
public string Email { get; set; }
86

97
public string Name { get; set; }

src/CheckoutSdk/Common/PaymentSourceType.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public enum PaymentSourceType
5757
[EnumMember(Value = "cvconnect")] Cvconnect,
5858
[EnumMember(Value = "sepa")] Sepa,
5959
[EnumMember(Value = "sequra")] Sequra,
60-
[EnumMember(Value = "tabby")] Tabby
60+
[EnumMember(Value = "tabby")] Tabby,
61+
[EnumMember(Value = "applepay")] Applepay,
62+
[EnumMember(Value = "googlepay")] Googlepay
6163
}
6264
}

src/CheckoutSdk/Common/Product.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ public class Product
77
public long? Quantity { get; set; }
88

99
public long? Price { get; set; }
10+
11+
public string Reference { get; set; }
1012
}
1113
}

src/CheckoutSdk/Instruments/Previous/InstrumentCustomerRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Checkout.Instruments.Previous
44
{
55
public class InstrumentCustomerRequest : CustomerRequest
66
{
7+
public string Id { get; set; }
78
public bool Default { get; set; }
89
}
910
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Checkout.Common;
2+
using Checkout.Payments.Sessions;
3+
4+
namespace Checkout.Payments
5+
{
6+
public class Applepay
7+
{
8+
public AccountHolder AccountHolder { get; set; }
9+
10+
public StorePaymentDetailsType? StorePaymentDetails { get; set; }
11+
}
12+
}

src/CheckoutSdk/Payments/BillingDescriptor.cs

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

77
public string City { get; set; }
88

9-
//Not available on Previous
10-
119
public string Reference { get; set; }
1210
}
1311
}

src/CheckoutSdk/Payments/Card.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Checkout.Common;
2+
using Checkout.Payments.Sessions;
3+
4+
namespace Checkout.Payments
5+
{
6+
public class Card
7+
{
8+
public AccountHolder AccountHolder { get; set; }
9+
10+
public StorePaymentDetailsType? StorePaymentDetails { get; set; }
11+
}
12+
}

0 commit comments

Comments
 (0)