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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aliquot-pay.rb +8 -3
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35dfff1ebd40162ee529331539e3e84c3cd9d4584aa8c5cbcd512ad4f1bddbcd
4
- data.tar.gz: 06405dd759121d55be37e9488f0a21b50bf710613b5d00cc9d91cbdd6bc1a6a7
3
+ metadata.gz: eca8987a342cb9d4c72a68b9c45ec9431f7aa383b5688e20dd85ef8a2ba267c0
4
+ data.tar.gz: 4cf2a6489569dbe2edd79330aa74ac349ef1a765f954c6b1753cecda206bc006
5
5
  SHA512:
6
- metadata.gz: eab0cb24c340f738da984ec910f134836cd04deee6baca6ee2946e9fdcedc0253f8aba93c71e3c9f98b36f086ae7b003fb1a3eeb5964f9a67a1b189cede7132c
7
- data.tar.gz: 8ec410a4184ba33fd932694d77ac37978e2da7af1851c5a97ff6640aad82a8690a14114e48607cd3df1dfdbb5a71ea0525a588895574cbfe1b6dbfcf34611999
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?; private_key?; end
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 || 2023,
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.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: 2023-09-05 00:00:00.000000000 Z
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.1.6
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: []