checkout_sdk 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/checkout_sdk/sessions/category.rb +1 -1
- data/lib/checkout_sdk/sessions/channel/browser_session.rb +8 -1
- data/lib/checkout_sdk/sessions/channel/three_ds_method_completion.rb +3 -3
- data/lib/checkout_sdk/sessions/experience.rb +18 -0
- data/lib/checkout_sdk/sessions/google_spa.rb +15 -0
- data/lib/checkout_sdk/sessions/session_challenge_indicator.rb +31 -0
- data/lib/checkout_sdk/sessions/session_request.rb +12 -7
- data/lib/checkout_sdk/sessions/sessions.rb +3 -0
- data/lib/checkout_sdk/sessions/shipping_indicator.rb +13 -1
- data/lib/checkout_sdk/sessions/source/card_source.rb +1 -4
- data/lib/checkout_sdk/sessions/source/session_scheme.rb +2 -0
- data/lib/checkout_sdk/sessions/transaction_type.rb +1 -1
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45ebb2b2eaa19b09ab21a461f8a5dd756a97e29d1bd06740e9de75b851100662
|
|
4
|
+
data.tar.gz: 5d28f0b1d1187bfb0ef21230eb51397f6b9ec8af9953763957f8fdd50a41753a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6b22a9a4f136e7f9615a3ea24addfd683af30d416728e51fac8c145fe4c37c049d2bd97a2933161a4facf45cf1777e0b6da304c2b1ee035ccb2d467b05c6e26
|
|
7
|
+
data.tar.gz: '08954406dad8050207e56060670a2e2ea44c39339d95684abc4ed0ec7f71fc860ccacf8430c2854fe7b3037adbac0bea61ffd96344c4df2a9bb07bdd09540fa8'
|
|
@@ -26,6 +26,11 @@ module CheckoutSdk
|
|
|
26
26
|
# @return [String]
|
|
27
27
|
# @!attribute ip_address
|
|
28
28
|
# @return [String]
|
|
29
|
+
# @!attribute iframe_payment_allowed
|
|
30
|
+
# @return [TrueClass, FalseClass] Whether the Payment API is enabled for all parent frames.
|
|
31
|
+
# Required for Google SPA support in hosted sessions.
|
|
32
|
+
# @!attribute user_agent_client_hint
|
|
33
|
+
# @return [String] The raw Sec-CH-UA header value. This can improve Google SPA support.
|
|
29
34
|
class BrowserSession < ChannelData
|
|
30
35
|
attr_accessor :three_ds_method_completion,
|
|
31
36
|
:accept_header,
|
|
@@ -37,7 +42,9 @@ module CheckoutSdk
|
|
|
37
42
|
:screen_width,
|
|
38
43
|
:timezone,
|
|
39
44
|
:user_agent,
|
|
40
|
-
:ip_address
|
|
45
|
+
:ip_address,
|
|
46
|
+
:iframe_payment_allowed,
|
|
47
|
+
:user_agent_client_hint
|
|
41
48
|
|
|
42
49
|
def initialize(three_ds_method_completion: CheckoutSdk::Sessions::ThreeDsMethodCompletion::U)
|
|
43
50
|
super(ChannelDataType::BROWSER)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# The authentication experience chosen for a session.
|
|
6
|
+
#
|
|
7
|
+
# Used by {SessionRequest#preferred_experiences}, which takes an array of these values.
|
|
8
|
+
#
|
|
9
|
+
# [Optional]
|
|
10
|
+
module Experience
|
|
11
|
+
# 3D Secure authentication. The constant is named THREE_DS because a Ruby constant cannot
|
|
12
|
+
# begin with a digit; the wire value is '3ds'.
|
|
13
|
+
THREE_DS = '3ds'
|
|
14
|
+
# Google Secure Payment Authentication.
|
|
15
|
+
GOOGLE_SPA = 'google_spa'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# This object contains the Google SPA properties (non-hosted only).
|
|
6
|
+
#
|
|
7
|
+
# @!attribute continue_url
|
|
8
|
+
# @return [String] Fully qualified URL for redirecting the user's browser session after
|
|
9
|
+
# authentication. For example, this field may be the merchant's website for purchase
|
|
10
|
+
# confirmation once payment is complete. Required if in full redirect (not iframe) mode.
|
|
11
|
+
class GoogleSpa
|
|
12
|
+
attr_accessor :continue_url
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# Indicates whether a challenge is requested for this session.
|
|
6
|
+
#
|
|
7
|
+
# Used by {SessionRequest#challenge_indicator} for POST /sessions. This is the only field in the
|
|
8
|
+
# API that accepts the exemption values below; the 3ds.challenge_indicator field on payments,
|
|
9
|
+
# hosted payments, payment links and payment sessions accepts only the first four values and is
|
|
10
|
+
# modelled by {CheckoutSdk::Common::ChallengeIndicator}.
|
|
11
|
+
#
|
|
12
|
+
# The following are requests for exemption: {LOW_VALUE}, {TRUSTED_LISTING},
|
|
13
|
+
# {TRUSTED_LISTING_PROMPT} and {TRANSACTION_RISK_ASSESSMENT}. If an exemption cannot be applied,
|
|
14
|
+
# then the value {NO_CHALLENGE_REQUESTED} will be used instead.
|
|
15
|
+
#
|
|
16
|
+
# [Optional]
|
|
17
|
+
# Default: {NO_PREFERENCE}
|
|
18
|
+
# max 50 characters
|
|
19
|
+
module SessionChallengeIndicator
|
|
20
|
+
NO_PREFERENCE = 'no_preference'
|
|
21
|
+
NO_CHALLENGE_REQUESTED = 'no_challenge_requested'
|
|
22
|
+
CHALLENGE_REQUESTED = 'challenge_requested'
|
|
23
|
+
CHALLENGE_REQUESTED_MANDATE = 'challenge_requested_mandate'
|
|
24
|
+
LOW_VALUE = 'low_value'
|
|
25
|
+
TRUSTED_LISTING = 'trusted_listing'
|
|
26
|
+
TRUSTED_LISTING_PROMPT = 'trusted_listing_prompt'
|
|
27
|
+
TRANSACTION_RISK_ASSESSMENT = 'transaction_risk_assessment'
|
|
28
|
+
DATA_SHARE = 'data_share'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require 'checkout_sdk/sessions/authentication_type'
|
|
4
4
|
require 'checkout_sdk/sessions/category'
|
|
5
5
|
require 'checkout_sdk/sessions/transaction_type'
|
|
6
|
-
require 'checkout_sdk/
|
|
6
|
+
require 'checkout_sdk/sessions/session_challenge_indicator'
|
|
7
7
|
|
|
8
8
|
module CheckoutSdk
|
|
9
9
|
module Sessions
|
|
@@ -24,15 +24,13 @@ module CheckoutSdk
|
|
|
24
24
|
# @!attribute account_info
|
|
25
25
|
# @return [CardHolderAccountInfo]
|
|
26
26
|
# @!attribute challenge_indicator
|
|
27
|
-
# @return [String] {
|
|
27
|
+
# @return [String] {SessionChallengeIndicator}
|
|
28
28
|
# @!attribute billing_descriptor
|
|
29
29
|
# @return [SessionsBillingDescriptor]
|
|
30
30
|
# @!attribute reference
|
|
31
31
|
# @return [String]
|
|
32
32
|
# @!attribute merchant_risk_info
|
|
33
33
|
# @return [MerchantRiskInfo]
|
|
34
|
-
# @!attribute prior_transaction_reference
|
|
35
|
-
# @return [String]
|
|
36
34
|
# @!attribute transaction_type
|
|
37
35
|
# @return [String] {TransactionType}
|
|
38
36
|
# @!attribute shipping_address
|
|
@@ -51,6 +49,12 @@ module CheckoutSdk
|
|
|
51
49
|
# @return [Optimization]
|
|
52
50
|
# @!attribute initial_transaction
|
|
53
51
|
# @return [InitialTransaction]
|
|
52
|
+
# @!attribute device_information
|
|
53
|
+
# @return [DeviceInformation]
|
|
54
|
+
# @!attribute google_spa
|
|
55
|
+
# @return [GoogleSpa] Google SPA properties (non-hosted only).
|
|
56
|
+
# @!attribute preferred_experiences
|
|
57
|
+
# @return [Array<String>] The chosen experience(s) for this session. {Experience}
|
|
54
58
|
class SessionRequest
|
|
55
59
|
attr_accessor :source,
|
|
56
60
|
:amount,
|
|
@@ -64,7 +68,6 @@ module CheckoutSdk
|
|
|
64
68
|
:billing_descriptor,
|
|
65
69
|
:reference,
|
|
66
70
|
:merchant_risk_info,
|
|
67
|
-
:prior_transaction_reference,
|
|
68
71
|
:transaction_type,
|
|
69
72
|
:shipping_address,
|
|
70
73
|
:shipping_address_matches_billing,
|
|
@@ -74,12 +77,14 @@ module CheckoutSdk
|
|
|
74
77
|
:installment,
|
|
75
78
|
:optimization,
|
|
76
79
|
:initial_transaction,
|
|
77
|
-
:device_information
|
|
80
|
+
:device_information,
|
|
81
|
+
:google_spa,
|
|
82
|
+
:preferred_experiences
|
|
78
83
|
|
|
79
84
|
def initialize(source: CardSource.new,
|
|
80
85
|
authentication_type: CheckoutSdk::Sessions::AuthenticationType::REGULAR,
|
|
81
86
|
authentication_category: CheckoutSdk::Sessions::Category::PAYMENT,
|
|
82
|
-
challenge_indicator: CheckoutSdk::
|
|
87
|
+
challenge_indicator: CheckoutSdk::Sessions::SessionChallengeIndicator::NO_PREFERENCE,
|
|
83
88
|
transaction_type: CheckoutSdk::Sessions::TransactionType::GOODS_SERVICE)
|
|
84
89
|
@source = source
|
|
85
90
|
@authentication_type = authentication_type
|
|
@@ -6,10 +6,13 @@ require 'checkout_sdk/sessions/card_holder_account_info'
|
|
|
6
6
|
require 'checkout_sdk/sessions/category'
|
|
7
7
|
require 'checkout_sdk/sessions/delivery_timeframe'
|
|
8
8
|
require 'checkout_sdk/sessions/device_information'
|
|
9
|
+
require 'checkout_sdk/sessions/experience'
|
|
10
|
+
require 'checkout_sdk/sessions/google_spa'
|
|
9
11
|
require 'checkout_sdk/sessions/installment'
|
|
10
12
|
require 'checkout_sdk/sessions/merchant_risk_info'
|
|
11
13
|
require 'checkout_sdk/sessions/recurring'
|
|
12
14
|
require 'checkout_sdk/sessions/session_address'
|
|
15
|
+
require 'checkout_sdk/sessions/session_challenge_indicator'
|
|
13
16
|
require 'checkout_sdk/sessions/session_marketplace_data'
|
|
14
17
|
require 'checkout_sdk/sessions/session_request'
|
|
15
18
|
require 'checkout_sdk/sessions/session_source_type'
|
|
@@ -2,8 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Sessions
|
|
5
|
+
# Indicates the shipping method chosen for the transaction.
|
|
6
|
+
#
|
|
7
|
+
# Used by {MerchantRiskInfo#shipping_indicator}. Choose the option that accurately describes the
|
|
8
|
+
# cardholder's specific transaction.
|
|
9
|
+
#
|
|
10
|
+
# [Optional]
|
|
5
11
|
module ShippingIndicator
|
|
6
|
-
|
|
12
|
+
BILLING_ADDRESS = 'billing_address'
|
|
13
|
+
ANOTHER_ADDRESS_ON_FILE = 'another_address_on_file'
|
|
14
|
+
NOT_ON_FILE = 'not_on_file'
|
|
15
|
+
STORE_PICK_UP = 'store_pick_up'
|
|
16
|
+
DIGITAL_GOODS = 'digital_goods'
|
|
17
|
+
TRAVEL_AND_EVENT_NO_SHIPPING = 'travel_and_event_no_shipping'
|
|
18
|
+
OTHER = 'other'
|
|
7
19
|
end
|
|
8
20
|
end
|
|
9
21
|
end
|
|
@@ -12,15 +12,12 @@ module CheckoutSdk
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
# @!attribute stored
|
|
14
14
|
# @return [TrueClass, FalseClass]
|
|
15
|
-
# @!attribute store_for_future_use
|
|
16
|
-
# @return [TrueClass, FalseClass]
|
|
17
15
|
class CardSource < SessionSource
|
|
18
16
|
attr_accessor :number,
|
|
19
17
|
:expiry_month,
|
|
20
18
|
:expiry_year,
|
|
21
19
|
:name,
|
|
22
|
-
:stored
|
|
23
|
-
:store_for_future_use
|
|
20
|
+
:stored
|
|
24
21
|
|
|
25
22
|
def initialize(stored: false)
|
|
26
23
|
super(SessionSourceType::CARD)
|
|
@@ -7,7 +7,7 @@ module CheckoutSdk
|
|
|
7
7
|
CHECK_ACCEPTANCE = 'check_acceptance'
|
|
8
8
|
GOODS_SERVICE = 'goods_service'
|
|
9
9
|
PREPAID_ACTIVATION_AND_LOAD = 'prepaid_activation_and_load'
|
|
10
|
-
|
|
10
|
+
QUASI_CARD_TRANSACTION = 'quasi_card_transaction'
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
data/lib/checkout_sdk/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: checkout_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Checkout
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -635,6 +635,8 @@ files:
|
|
|
635
635
|
- lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb
|
|
636
636
|
- lib/checkout_sdk/sessions/delivery_timeframe.rb
|
|
637
637
|
- lib/checkout_sdk/sessions/device_information.rb
|
|
638
|
+
- lib/checkout_sdk/sessions/experience.rb
|
|
639
|
+
- lib/checkout_sdk/sessions/google_spa.rb
|
|
638
640
|
- lib/checkout_sdk/sessions/initial_transaction.rb
|
|
639
641
|
- lib/checkout_sdk/sessions/installment.rb
|
|
640
642
|
- lib/checkout_sdk/sessions/merchant_risk_info.rb
|
|
@@ -644,6 +646,7 @@ files:
|
|
|
644
646
|
- lib/checkout_sdk/sessions/recurring.rb
|
|
645
647
|
- lib/checkout_sdk/sessions/reorder_items_indicator_type.rb
|
|
646
648
|
- lib/checkout_sdk/sessions/session_address.rb
|
|
649
|
+
- lib/checkout_sdk/sessions/session_challenge_indicator.rb
|
|
647
650
|
- lib/checkout_sdk/sessions/session_marketplace_data.rb
|
|
648
651
|
- lib/checkout_sdk/sessions/session_request.rb
|
|
649
652
|
- lib/checkout_sdk/sessions/session_secret_credentials.rb
|