aliquot-pay 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aliquot-pay.rb +10 -1
- 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: df10b773da7321ea564c012fd5d487c07c0779ced77d1535e3b3a10691157b39
|
4
|
+
data.tar.gz: c6231c0006e33298f414ced2e286ac45ef4df5f16a2efa633a8025e1373fca15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32790400342af932a01adeaaf8cb0ed943ffe2343954972deb4d20f7e5e34482ff71ab924f395221db3affd0128cfeb8b6ae95cc19d1c19dbcedde0d2ca963a6
|
7
|
+
data.tar.gz: 23aa8bec6cb97d8ec513e1fb6323f35b60f7ad1baca8627d4091e2898b1d1a03f38882b1949f34f56064bde33ba330978b84b0a69c0f321c35639bba26539d02
|
data/lib/aliquot-pay.rb
CHANGED
@@ -18,7 +18,7 @@ class AliquotPay
|
|
18
18
|
attr_accessor :signed_key, :signatures
|
19
19
|
attr_accessor :key_expiration, :key_value
|
20
20
|
attr_accessor :encrypted_message, :cleartext_message, :ephemeral_public_key, :tag
|
21
|
-
attr_accessor :message_expiration, :message_id, :payment_method, :payment_method_details
|
21
|
+
attr_accessor :message_expiration, :message_id, :payment_method, :payment_method_details, :gateway_merchant_id
|
22
22
|
attr_accessor :pan, :expiration_month, :expiration_year, :auth_method
|
23
23
|
attr_accessor :cryptogram, :eci_indicator
|
24
24
|
|
@@ -116,6 +116,7 @@ class AliquotPay
|
|
116
116
|
|
117
117
|
def build_cleartext_message
|
118
118
|
return @cleartext_message if @cleartext_message
|
119
|
+
|
119
120
|
default_message_id = Base64.strict_encode64(OpenSSL::Random.random_bytes(24))
|
120
121
|
default_message_expiration = ((Time.now.to_f + 60 * 5) * 1000).round.to_s
|
121
122
|
|
@@ -125,6 +126,14 @@ class AliquotPay
|
|
125
126
|
'paymentMethod' => @payment_method || 'CARD',
|
126
127
|
'paymentMethodDetails' => build_payment_method_details
|
127
128
|
}
|
129
|
+
|
130
|
+
if @protocol_version == :ECv2
|
131
|
+
@cleartext_message.merge!(
|
132
|
+
'gatewayMerchantId' => @gateway_merchant_id || 'SOME GATEWAY MERCHANT ID'
|
133
|
+
)
|
134
|
+
end
|
135
|
+
|
136
|
+
@cleartext_message
|
128
137
|
end
|
129
138
|
|
130
139
|
def build_signed_message
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aliquot-pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clearhaus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hkdf
|