pedicel-pay 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pedicel-pay/token.rb +6 -6
- data/lib/pedicel-pay/token_header.rb +4 -4
- data/lib/pedicel-pay/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 367c31ed8b6dde587ae072ebbd40206db194e249c946cf4a84e1f939c9352891
|
4
|
+
data.tar.gz: 6b147be0f6dd592f1a4597624f5de9108eaac99cebfe472b7ff919f6ded07c8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2a84e2d4bf091153bdae40d1d8109b21e9cff88358ba5f51d53c38adf4dbbf239d0121e59723276f8898ba95e2c5ac9ef6a17b614c75e6b8d13dfa79f6a1b2b
|
7
|
+
data.tar.gz: 6ce9deb968f28e6153bcfa99a815b61c2003dd5855d0ba9d491ca695086079aa9f690876aad2a062db1ebc6e95d954589bfab7d38a1251449a7ebacf10069f46
|
data/lib/pedicel-pay/token.rb
CHANGED
@@ -14,9 +14,9 @@ module PedicelPay
|
|
14
14
|
:version
|
15
15
|
|
16
16
|
def initialize(unencrypted_data: nil, encrypted_data: nil, header: nil, signature: nil, version: 'EC_v1')
|
17
|
-
@unencrypted_data = unencrypted_data
|
17
|
+
@unencrypted_data = unencrypted_data || TokenData.new
|
18
18
|
@encrypted_data = encrypted_data
|
19
|
-
@header = header
|
19
|
+
@header = header || TokenHeader.new
|
20
20
|
@signature = signature
|
21
21
|
@version = version
|
22
22
|
end
|
@@ -35,10 +35,10 @@ module PedicelPay
|
|
35
35
|
raise Error, 'no encrypted data' unless encrypted_data
|
36
36
|
|
37
37
|
{
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
data: Base64.strict_encode64(encrypted_data),
|
39
|
+
header: header.to_hash,
|
40
|
+
signature: signature,
|
41
|
+
version: version,
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
@@ -17,11 +17,11 @@ module PedicelPay
|
|
17
17
|
raise Error, 'missing ephemeral_pubkey' unless ephemeral_pubkey
|
18
18
|
|
19
19
|
result = {
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
ephemeralPublicKey: Base64.strict_encode64(Helper.ec_key_to_pkey_public_key(ephemeral_pubkey).to_der),
|
21
|
+
publicKeyHash: pubkey_hash,
|
22
|
+
transactionId: Helper.bytestring_to_hex(transaction_id),
|
23
23
|
}
|
24
|
-
result.merge!(
|
24
|
+
result.merge!(applicationData: data_hash) if data_hash
|
25
25
|
|
26
26
|
result
|
27
27
|
end
|
data/lib/pedicel-pay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pedicel-pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clearhaus A/S
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,20 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '12.3'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: pedicel
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0
|
47
|
+
version: '0.0'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0
|
54
|
+
version: '0.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: thor
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|