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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e167c870a61adbe09bdba84a062a208dc6fbbc28
4
- data.tar.gz: 5f56607da3704188e926bb60136542d0cdbad985
2
+ SHA256:
3
+ metadata.gz: b963bdc02a66ec3b820101bc421bd4b6e502f96d43f39dab880e362c7931d7df
4
+ data.tar.gz: f933cba709ab7e393e5f15b85a8f6fbc35ead29ddfe1530695273ea3a0e17259
5
5
  SHA512:
6
- metadata.gz: d4c52706b2d584bf7f5340077006b2ccab48021dd706a0a0e1ad139e851eda818c4a7199297694f3e6da94e1fe470f4fa5a2c765d5db4beceace8f12cec62654
7
- data.tar.gz: 802ccd7df576560e41bc3dbb8919c3461591cbda111ead9e39fca84b2767927d5f5b4b7bedf1ed415a2399949adb096c2c2545b5b39f7c2bdda4ba83fe69de76
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 = RestClient::Resource.new(
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.
@@ -4,6 +4,8 @@ module Kount
4
4
  class PaymentTypes
5
5
  # Credit card (VISA, MasterCard, Amercian Express, etc)
6
6
  CREDIT_CARD = 'CARD'
7
+ #Generic Token
8
+ TOKEN = 'TOKEN'
7
9
  # PayPal
8
10
  PAYPAL = 'PYPL'
9
11
  # Check
@@ -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] = 'NONE'
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
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
- - Brandon Thompson
7
+ - Kount
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-18 00:00:00.000000000 Z
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 and API calls
48
- email: bst@keynetics.com
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.4.5
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: