connect-sdk-ruby 2.24.0 → 2.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/connect-sdk-ruby.gemspec +1 -1
- data/lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_account_authentication.rb +7 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/lib/ingenico/connect/sdk/request_header.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d3544e10cd38ce540eed9db96f91d7528f199344048fdf30a1c0e2fbfac7d88
|
4
|
+
data.tar.gz: 98805c926124ced5fe4237ad63d2ed40dc0e76fb16ca6ea12d510f50f809ea08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6d44127b3971794d6dc04d1156da56b45bc778af36e55d90eca4695b6369f660b44de56f53336ee95e15db3de85035b45b3d0e7e5ed5f77c0b1895f9856479
|
7
|
+
data.tar.gz: 13727982fff96b31b113738cbbc3242703b84236ebb0bfd040e180e25311762ecdadf6f112b725384cfbf2b3b451f841103ff7a3ca92a2911ac10bb5156e096d
|
data/connect-sdk-ruby.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'connect-sdk-ruby'
|
3
|
-
spec.version = '2.
|
3
|
+
spec.version = '2.25.0'
|
4
4
|
spec.authors = ['Ingenico ePayments']
|
5
5
|
spec.email = ['github@epay.ingenico.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
|
@@ -19,6 +19,7 @@ module Ingenico::Connect::SDK
|
|
19
19
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureData] prior_three_d_secure_data
|
20
20
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::SdkDataInput] sdk_data
|
21
21
|
# @attr [true/false] skip_authentication
|
22
|
+
# @attr [String] transaction_risk_level
|
22
23
|
class AbstractThreeDSecure < Ingenico::Connect::SDK::DataObject
|
23
24
|
|
24
25
|
attr_accessor :authentication_amount
|
@@ -37,6 +38,8 @@ module Ingenico::Connect::SDK
|
|
37
38
|
|
38
39
|
attr_accessor :skip_authentication
|
39
40
|
|
41
|
+
attr_accessor :transaction_risk_level
|
42
|
+
|
40
43
|
# @return (Hash)
|
41
44
|
def to_h
|
42
45
|
hash = super
|
@@ -48,6 +51,7 @@ module Ingenico::Connect::SDK
|
|
48
51
|
hash['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h unless @prior_three_d_secure_data.nil?
|
49
52
|
hash['sdkData'] = @sdk_data.to_h unless @sdk_data.nil?
|
50
53
|
hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
|
54
|
+
hash['transactionRiskLevel'] = @transaction_risk_level unless @transaction_risk_level.nil?
|
51
55
|
hash
|
52
56
|
end
|
53
57
|
|
@@ -80,6 +84,9 @@ module Ingenico::Connect::SDK
|
|
80
84
|
if hash.has_key? 'skipAuthentication'
|
81
85
|
@skip_authentication = hash['skipAuthentication']
|
82
86
|
end
|
87
|
+
if hash.has_key? 'transactionRiskLevel'
|
88
|
+
@transaction_risk_level = hash['transactionRiskLevel']
|
89
|
+
end
|
83
90
|
end
|
84
91
|
end
|
85
92
|
end
|
@@ -8,10 +8,13 @@ module Ingenico::Connect::SDK
|
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
+
# @attr [String] data
|
11
12
|
# @attr [String] method
|
12
13
|
# @attr [String] utc_timestamp
|
13
14
|
class CustomerAccountAuthentication < Ingenico::Connect::SDK::DataObject
|
14
15
|
|
16
|
+
attr_accessor :data
|
17
|
+
|
15
18
|
attr_accessor :method
|
16
19
|
|
17
20
|
attr_accessor :utc_timestamp
|
@@ -19,6 +22,7 @@ module Ingenico::Connect::SDK
|
|
19
22
|
# @return (Hash)
|
20
23
|
def to_h
|
21
24
|
hash = super
|
25
|
+
hash['data'] = @data unless @data.nil?
|
22
26
|
hash['method'] = @method unless @method.nil?
|
23
27
|
hash['utcTimestamp'] = @utc_timestamp unless @utc_timestamp.nil?
|
24
28
|
hash
|
@@ -26,6 +30,9 @@ module Ingenico::Connect::SDK
|
|
26
30
|
|
27
31
|
def from_hash(hash)
|
28
32
|
super
|
33
|
+
if hash.has_key? 'data'
|
34
|
+
@data = hash['data']
|
35
|
+
end
|
29
36
|
if hash.has_key? 'method'
|
30
37
|
@method = hash['method']
|
31
38
|
end
|
@@ -7,7 +7,7 @@ module Ingenico::Connect::SDK
|
|
7
7
|
#
|
8
8
|
# @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
|
9
9
|
class MetaDataProvider
|
10
|
-
@@SDK_VERSION = '2.
|
10
|
+
@@SDK_VERSION = '2.25.0'
|
11
11
|
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
|
12
12
|
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
|
13
13
|
'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
@@ -47,11 +47,10 @@ module Ingenico::Connect::SDK
|
|
47
47
|
if value.nil? || value.empty?
|
48
48
|
return value
|
49
49
|
end
|
50
|
-
# Replace all sequences of
|
51
|
-
# This
|
52
|
-
#
|
53
|
-
|
54
|
-
value.gsub(/[\s&&[^\r\n]]*(\r?\n)[\s&&[^\r\n]]*/, '\1 ')
|
50
|
+
# Replace all sequences of linebreak-whitespace* with a single linebreak-space
|
51
|
+
# This matches the normalization done by DefaultAuthenticator, and ensures that multiline headers
|
52
|
+
# will not cause authentication failures
|
53
|
+
value.gsub(/\r?\n[\s&&[^\r\n]]*/, ' ')
|
55
54
|
end
|
56
55
|
end
|
57
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connect-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingenico ePayments
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|