diff --git a/src/CheckoutSdk/Forward/Requests/DestinationRequest.cs b/src/CheckoutSdk/Forward/Requests/DestinationRequest.cs index dc3b55ca..69cb5a2a 100644 --- a/src/CheckoutSdk/Forward/Requests/DestinationRequest.cs +++ b/src/CheckoutSdk/Forward/Requests/DestinationRequest.cs @@ -2,8 +2,7 @@ namespace Checkout.Forward.Requests { public class DestinationRequest { - /// - /// The URL to forward the request to (Required, max 1024 characters) + /// The URL to forward the request to (Required, max 1024 characters) public string Url { get; set; } /// The HTTP method to use for the forward request (Required) @@ -15,7 +14,8 @@ public class DestinationRequest /// /// The HTTP message body to include in the forward request. If you provide source.id or source.token, you can specify /// placeholder values in the body. The request will be enriched with the respective payment details from the token or - /// payment instrument you specified. For example, {{card_number}} (Required, max 16384 characters) + /// payment instrument you specified. For example, {{card_number}} (Required, max 16384 characters) + /// public string Body { get; set; } } } \ No newline at end of file diff --git a/src/CheckoutSdk/Forward/Requests/ForwardRequest.cs b/src/CheckoutSdk/Forward/Requests/ForwardRequest.cs index 7410fc9f..9c520f95 100644 --- a/src/CheckoutSdk/Forward/Requests/ForwardRequest.cs +++ b/src/CheckoutSdk/Forward/Requests/ForwardRequest.cs @@ -14,8 +14,7 @@ public class ForwardRequest /// The parameters of the forward request (Required) public DestinationRequest DestinationRequest { get; set; } - /// - /// The unique reference for the forward request (Optional, max 80 characters) + /// The unique reference for the forward request (Optional, max 80 characters) public string Reference { get; set; } /// diff --git a/src/CheckoutSdk/Forward/Requests/Headers.cs b/src/CheckoutSdk/Forward/Requests/Headers.cs index 71368f98..4caf5b6c 100644 --- a/src/CheckoutSdk/Forward/Requests/Headers.cs +++ b/src/CheckoutSdk/Forward/Requests/Headers.cs @@ -4,13 +4,13 @@ namespace Checkout.Forward.Requests { public class Headers { - /// - /// The raw headers to include in the forward request (Required, max 16 characters) + /// The raw headers to include in the forward request (Required, max 16 characters) public IDictionary Raw { get; set; } = new Dictionary(); /// - /// The encrypted headers to include in the forward request, as a JSON object with string values encrypted with JSON - /// Web Encryption (JWE) (Optional, max 8192 characters) + /// The encrypted headers to include in the forward request, as a JSON object with string values encrypted + /// with JSON Web Encryption (JWE) (Optional, max 8192 characters) + /// public string Encrypted { get; set; } } } \ No newline at end of file diff --git a/src/CheckoutSdk/Forward/Requests/Sources/IdSource.cs b/src/CheckoutSdk/Forward/Requests/Sources/IdSource.cs index f3f70a14..13a36d9e 100644 --- a/src/CheckoutSdk/Forward/Requests/Sources/IdSource.cs +++ b/src/CheckoutSdk/Forward/Requests/Sources/IdSource.cs @@ -2,7 +2,7 @@ namespace Checkout.Forward.Requests.Sources { public class IdSource : AbstractSource { - /// Initializes a new instance of the IdSource class. + /// Initializes a new instance of the IdSource class. public IdSource() : base(SourceType.Id) { } /// The unique identifier of the payment instrument (Required, pattern ^(src)_(\w{26})$) diff --git a/src/CheckoutSdk/Forward/Requests/Sources/TokenSource.cs b/src/CheckoutSdk/Forward/Requests/Sources/TokenSource.cs index f60981b3..d24ac8e4 100644 --- a/src/CheckoutSdk/Forward/Requests/Sources/TokenSource.cs +++ b/src/CheckoutSdk/Forward/Requests/Sources/TokenSource.cs @@ -2,7 +2,7 @@ namespace Checkout.Forward.Requests.Sources { public class TokenSource : AbstractSource { - /// Initializes a new instance of the TokenSource class. + /// Initializes a new instance of the TokenSource class. public TokenSource() : base(SourceType.Token) { } /// The unique Checkout.com token (Required, pattern ^(tok)_(\w{26})$) diff --git a/src/CheckoutSdk/Forward/Responses/GetForwardResponse.cs b/src/CheckoutSdk/Forward/Responses/GetForwardResponse.cs index f0292042..b5c9a25d 100644 --- a/src/CheckoutSdk/Forward/Responses/GetForwardResponse.cs +++ b/src/CheckoutSdk/Forward/Responses/GetForwardResponse.cs @@ -13,9 +13,7 @@ public class GetForwardResponse : HttpMetadata /// The parameters of the HTTP request forwarded to the destination (Required) public DestinationRequest DestinationRequest { get; set; } - /// - /// The date and time the forward request was created, in UTC (Required) - /// + /// The date and time the forward request was created, in UTC (Required) public DateTime? CreatedOn { get; set; } /// The unique reference for the forward request (Optional) diff --git a/src/CheckoutSdk/Payments/Contexts/PaymentContextsProcessing.cs b/src/CheckoutSdk/Payments/Contexts/PaymentContextsProcessing.cs index 9a6300f4..73d34bf6 100644 --- a/src/CheckoutSdk/Payments/Contexts/PaymentContextsProcessing.cs +++ b/src/CheckoutSdk/Payments/Contexts/PaymentContextsProcessing.cs @@ -22,7 +22,7 @@ public class PaymentContextsProcessing public UserAction? UserAction { get; set; } - public PartnerCustomerRiskData PartnerCustomerRiskData { get; set; } + public IList PartnerCustomerRiskData { get; set; } public IList CustomPaymentMethodIds { get; set; } diff --git a/src/CheckoutSdk/Payments/Request/Device.cs b/src/CheckoutSdk/Payments/Request/Device.cs new file mode 100644 index 00000000..8aeb8b94 --- /dev/null +++ b/src/CheckoutSdk/Payments/Request/Device.cs @@ -0,0 +1,60 @@ +namespace Checkout.Payments.Request +{ + public class Device + { + /// The contents of the HTTP User-Agent request header. This field is required to process the device + /// with the risk engine (Optional, max 2048 characters) + public string UserAgent { get; set; } + + /// Details of the device network. Either ipv4 or ipv6 is required field (Optional) + public Network Network { get; set; } + + /// Details of the device ID provider (Optional) + public Provider Provider { get; set; } + + /// The UTC date and time the payment was performed as reported by the device. Format – ISO 8601 code + /// This field is required to process the device with the risk engine (Optional) + public string Timestamp { get; set; } + + /// The time difference between UTC time and the local time reported by the browser, in minutes. This + /// field is required to process the device with the risk engine (Optional, [ 1 .. 5 ] characters + public string Timezone { get; set; } + + /// Specifies if the device is running in a virtual machine (Optional) + public bool? VirtualMachine { get; set; } + + /// Specifies if the browser is in incognito mode (Optional) + public bool? Incognito { get; set; } + + /// Specifies if the device is jailbroken (Optional) + public bool? Jailbroken { get; set; } + + /// Specifies if the device is rooted (Optional) + public bool? Rooted { get; set; } + + /// Specifies if the browser has the ability to execute Java, as reported by the browser's + /// navigator.javaEnabled property (Optional) + public bool? JavaEnabled { get; set; } + + /// Specifies if the browser has the ability to execute Javascript, as reported by the browser's + /// navigator.javascriptEnabled property. Only required for 3D Secure authentications processed with 3DS 2.2. If + /// the payment is processed with an older 3DS version, this field is ignored (Optional) + public bool? JavascriptEnabled { get; set; } + + /// The browser language, as reported by the browser's navigator.language property. Format – IETF + /// BCP47 language tag (Optional, [ 1 .. 12 ] characters) + public string Language { get; set; } + + /// The bit depth of the color palette for displaying images in bits per pixel, as reported by the + /// browser's screen.colorDepth property (Optional, [ 2 .. 1 ] characters) + public string ColorDepth { get; set; } + + /// The total height of the device screen in pixels, as reported by the browser's screen.height + /// property (Optional, [ 1 .. 6 ] characters, [ 1 .. 6 ]) + public string ScreenHeight { get; set; } + + /// The total width of the device screen in pixels, as reported by the browser's screen.width property + /// (Optional, [ 1 .. 6 ] characters) + public string ScreenWidth { get; set; } + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Payments/Request/Network.cs b/src/CheckoutSdk/Payments/Request/Network.cs new file mode 100644 index 00000000..0c695aff --- /dev/null +++ b/src/CheckoutSdk/Payments/Request/Network.cs @@ -0,0 +1,21 @@ +namespace Checkout.Payments.Request +{ + public class Network + { + /// The device's IPV4 address. Not required if you provide the ipv6 field (Optional) + public string Ipv4 { get; set; } + + /// The device's IPV6 address. Not required if you provide the ipv4 field (Optional) + public string Ipv6 { get; set; } + + /// Specifies if the Tor network was used in the browser session (Optional) + public bool? Tor { get; set; } + + /// Specifies if a virtual private network (VPN) was used in the browser session (Optional) + public bool? Vpn { get; set; } + + /// Specifies if a proxy was used in the browser session (Optional) + public bool? Proxy { get; set; } + + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Payments/Request/Provider.cs b/src/CheckoutSdk/Payments/Request/Provider.cs new file mode 100644 index 00000000..9ce3490b --- /dev/null +++ b/src/CheckoutSdk/Payments/Request/Provider.cs @@ -0,0 +1,12 @@ +namespace Checkout.Payments.Request +{ + public class Provider + { + /// The unique identifier for the device (Optional) + public string Id { get; set; } + + /// The name of the provider that generated the device identifier (Optional) + public string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Payments/RiskRequest.cs b/src/CheckoutSdk/Payments/RiskRequest.cs index ee2fa1f0..6d6488e9 100644 --- a/src/CheckoutSdk/Payments/RiskRequest.cs +++ b/src/CheckoutSdk/Payments/RiskRequest.cs @@ -1,9 +1,17 @@ +using Checkout.Payments.Request; + namespace Checkout.Payments { public class RiskRequest { - public bool? Enabled { get; set; } + /// Whether a risk assessment should be performed (Optional) + public bool? Enabled { get; set; } = true; + /// Device session ID collected from our standalone Risk.js package. If you integrate using our Frames + /// solution, this ID is not required (Optional, pattern ^(dsid)_(\w{26})$) public string DeviceSessionId { get; set; } + + /// Details of the device from which the payment originated (Optional) + public Device Device { get; set; } } } \ No newline at end of file