kount_complete 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/kount/client.rb +5 -3
- data/lib/kount/payment_types.rb +2 -0
- data/lib/kount/request/inquiry.rb +2 -2
- metadata +12 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b963bdc02a66ec3b820101bc421bd4b6e502f96d43f39dab880e362c7931d7df
|
|
4
|
+
data.tar.gz: f933cba709ab7e393e5f15b85a8f6fbc35ead29ddfe1530695273ea3a0e17259
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5ed272c1e1f1937c6581feed22d8b24d5c71d52f1a746a16a25c3058a3d3d301026417d1964fa62e0f304c59c5558e217e6e890c8db522d2cab77ed3fef5fba
|
|
7
|
+
data.tar.gz: ed4770af05c1a91155b6e07e81a56f50aabf4d00ef3afe375e4eee9264f43ed93802bacdf550c5c3dd1041bd4ead790093ae6588d0d78895212ab5a495305e1b
|
data/lib/kount/client.rb
CHANGED
|
@@ -61,10 +61,12 @@ module Kount
|
|
|
61
61
|
# @return [Hash] RIS response formatted into a native hash
|
|
62
62
|
def get_response(request)
|
|
63
63
|
params = prepare_request_params(request)
|
|
64
|
-
response =
|
|
65
|
-
endpoint,
|
|
66
|
-
verify_ssl: verify_ssl_option).post params, x_kount_api_key: key
|
|
64
|
+
response = {}
|
|
67
65
|
begin
|
|
66
|
+
response = RestClient::Resource.new(
|
|
67
|
+
endpoint,
|
|
68
|
+
verify_ssl: verify_ssl_option, timeout: 1).post params, x_kount_api_key: key
|
|
69
|
+
|
|
68
70
|
JSON.parse(response)
|
|
69
71
|
rescue
|
|
70
72
|
# RIS errors do not come back as JSON, so just pass them along raw.
|
data/lib/kount/payment_types.rb
CHANGED
|
@@ -38,7 +38,7 @@ module Kount
|
|
|
38
38
|
def fixup_payment_params(ksalt, merchant_id)
|
|
39
39
|
ptok = params[:PTOK]
|
|
40
40
|
case params[:PTYP]
|
|
41
|
-
when 'CARD'
|
|
41
|
+
when 'CARD', 'TOKEN'
|
|
42
42
|
ptok = Kount::SecurityMash.hash_credit_card(ptok, ksalt)
|
|
43
43
|
params.merge!(PTOK: ptok, PENC: 'KHASH')
|
|
44
44
|
when 'GIFT', 'OTHER'
|
|
@@ -47,7 +47,7 @@ module Kount
|
|
|
47
47
|
when 'NONE'
|
|
48
48
|
params.merge!(PTOK: nil, PENC: nil)
|
|
49
49
|
else
|
|
50
|
-
params[:PENC]
|
|
50
|
+
params[:PENC] ||= 'NONE'
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
metadata
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kount_complete
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Kount
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.8'
|
|
20
17
|
- - ">="
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
19
|
version: 1.8.0
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 3.0.0
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
|
-
- - "~>"
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '1.8'
|
|
30
27
|
- - ">="
|
|
31
28
|
- !ruby/object:Gem::Version
|
|
32
29
|
version: 1.8.0
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 3.0.0
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: rspec
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -44,8 +44,8 @@ dependencies:
|
|
|
44
44
|
- - "~>"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: '0'
|
|
47
|
-
description: A wrapper to facilitate making Kount RIS
|
|
48
|
-
email:
|
|
47
|
+
description: A wrapper to facilitate making Kount RIS calls
|
|
48
|
+
email: Ruby@kount.com
|
|
49
49
|
executables: []
|
|
50
50
|
extensions: []
|
|
51
51
|
extra_rdoc_files: []
|
|
@@ -78,9 +78,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
78
78
|
version: 1.3.5
|
|
79
79
|
requirements: []
|
|
80
80
|
rubyforge_project:
|
|
81
|
-
rubygems_version: 2.
|
|
81
|
+
rubygems_version: 2.7.7
|
|
82
82
|
signing_key:
|
|
83
83
|
specification_version: 4
|
|
84
84
|
summary: Kount Complete Services Wrapper
|
|
85
85
|
test_files: []
|
|
86
|
-
has_rdoc:
|