aliquot-pay 3.0.0 → 3.0.2
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 +8 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eca8987a342cb9d4c72a68b9c45ec9431f7aa383b5688e20dd85ef8a2ba267c0
|
4
|
+
data.tar.gz: 4cf2a6489569dbe2edd79330aa74ac349ef1a765f954c6b1753cecda206bc006
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63cafaccc975cfb2f6b9d0986209f95c5aee30074392380008d573c1bcfa1400b9ef545434f6f62d511f8fe8f3f96132af2780891789bcc080f6c1496e6bf40f
|
7
|
+
data.tar.gz: 145ce9d75ad93e496d98945af3f27964ddc46fb3723ef13951eda851bbf88a32ad0f27d353cc5ab5da2406055944aff8de93138cec7c9fb5674d94441d7dec28
|
data/lib/aliquot-pay.rb
CHANGED
@@ -25,8 +25,11 @@ class AliquotPay
|
|
25
25
|
attr_accessor :recipient, :info, :root_key, :intermediate_key
|
26
26
|
attr_writer :recipient_id, :shared_secret, :token, :signed_key_string
|
27
27
|
|
28
|
-
def initialize(protocol_version = :ECv2)
|
28
|
+
def initialize(protocol_version = :ECv2, root_key = nil)
|
29
29
|
@protocol_version = protocol_version
|
30
|
+
if root_key
|
31
|
+
@root_key = root_key
|
32
|
+
end
|
30
33
|
end
|
31
34
|
|
32
35
|
def token
|
@@ -45,7 +48,9 @@ class AliquotPay
|
|
45
48
|
|
46
49
|
def sign(key, message)
|
47
50
|
d = OpenSSL::Digest::SHA256.new
|
48
|
-
def key.private
|
51
|
+
def key.private?
|
52
|
+
private_key?
|
53
|
+
end
|
49
54
|
Base64.strict_encode64(key.sign(d, message))
|
50
55
|
end
|
51
56
|
|
@@ -86,7 +91,7 @@ class AliquotPay
|
|
86
91
|
return @payment_method_details if @payment_method_details
|
87
92
|
value = {
|
88
93
|
'pan' => @pan || '4111111111111111',
|
89
|
-
'expirationYear' => @expiration_year ||
|
94
|
+
'expirationYear' => @expiration_year || Time.now.year + 1,
|
90
95
|
'expirationMonth' => @expiration_month || 12,
|
91
96
|
'authMethod' => @auth_method || 'PAN_ONLY',
|
92
97
|
}
|
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: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clearhaus
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hkdf
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email: hello@clearhaus.com
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
@@ -64,7 +64,7 @@ homepage: https://github.com/clearhaus/aliquot-pay
|
|
64
64
|
licenses:
|
65
65
|
- MIT
|
66
66
|
metadata: {}
|
67
|
-
post_install_message:
|
67
|
+
post_install_message:
|
68
68
|
rdoc_options: []
|
69
69
|
require_paths:
|
70
70
|
- lib
|
@@ -79,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
83
|
-
signing_key:
|
82
|
+
rubygems_version: 3.3.5
|
83
|
+
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Generates Google Pay test dummy tokens
|
86
86
|
test_files: []
|