kount_complete 2.0.5 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 972d3a19f7992be20ed73b9d62e4324620975a03cf60001765ca8ee08e670863
4
- data.tar.gz: 5f55a94fc493a99fe926b04e0707dbffb4f2a5c15443a8f8f2a3d0243b6776a1
3
+ metadata.gz: e78ba40ade6af05b00f647e187aa66351ca6cd67472b5de0b84f39b2008326a9
4
+ data.tar.gz: 8a149dffc64cf06e1e00f96765ce004ab2df2c44465f51853e353882581bef7a
5
5
  SHA512:
6
- metadata.gz: 32fdea942a8a495ae938f834ac2a97584df93633fce7f1674fa64147aab1916f0e7d9eab999d6e6548ae63b2c9c1dd12c96f478ae06981a2893e41ca8f9b5bcf
7
- data.tar.gz: 651bfda6f850a72b3aa15fb5eda2359d4941d13c89f54c02034e6dc75993a4917b3e15828062cd7e245b497902e129433a095967c66c9c303cf4d2bc59c9bc81
6
+ metadata.gz: fb98d21ba72460bcc18c5b7581110566969755c1bc476e6b6e834c34928b626b16a92fca128a36ac99d2de82928877ee55275650b91d698607fb843ed84c1b56
7
+ data.tar.gz: f7e0937dda76d2919e20487a34d8c51a337b79745c7b72d5ec5527e1bfd1a76e5ffbeabdc8e590693c9e935266305015507c6f9b93c1481c17e54167ca711f50
@@ -239,7 +239,7 @@ module Response
239
239
  end
240
240
 
241
241
  def get_secure_merchant_response
242
- merchant_response = @paramlist['3D_SECURE_MERCHANT_RESPONSE'].to_s
242
+ merchant_response = @paramlist['THREE_DS_MERCHANT_RESPONSE'].to_s
243
243
  return merchant_response unless merchant_response.empty?
244
244
  end
245
245
 
data/lib/kount/client.rb CHANGED
@@ -18,7 +18,7 @@ module Kount
18
18
  RESPONSE_FORMAT = 'JSON'
19
19
 
20
20
  # RIS Version. Can be overridden my merchant if required.
21
- DEFAULT_VERSION = '0710'
21
+ DEFAULT_VERSION = '0720'
22
22
 
23
23
  # Default endpoint for production. Used by the DEFAULT_OPTIONS
24
24
  ENDPOINT_PROD = 'https://risk.kount.net'
@@ -0,0 +1,14 @@
1
+ module Kount
2
+ # This class contains version specifications
3
+ class Config
4
+
5
+ # Which SDK is this
6
+ SDK = 'RUBY'
7
+
8
+ # SDK release version
9
+ # Set the sdk release version which will be used for git tagging in github
10
+ # This will be set by the build process
11
+ SDK_VERSION = '2.2.0'
12
+
13
+ end
14
+ end
@@ -1,3 +1,5 @@
1
+ require_relative '../config'
2
+
1
3
  module Kount
2
4
  ##
3
5
  # This class extends the Request class.
@@ -16,6 +18,8 @@ module Kount
16
18
  # We want Request to default to MODE Q unless a different mode has
17
19
  # been passed.
18
20
  add_params(MODE: 'Q') unless initial_params.key?(:MODE)
21
+ sdkVersionStructure = "Sdk-Ris-Ruby-"
22
+ add_params(SDK: Kount::Config::SDK, SDK_VERSION: sdkVersionStructure + Kount::Config::SDK_VERSION)
19
23
  end
20
24
 
21
25
  # @param version [String] RIS version
data/lib/kount/request.rb CHANGED
@@ -35,5 +35,12 @@ module Kount
35
35
  # subclass prepare_params methods.
36
36
  params.merge!(VERS: version, MERC: merchant_id, FRMT: response_format)
37
37
  end
38
+
39
+ # Add LBIN to request
40
+ # Supports BIN lengths of 6 digits or greater
41
+ # @param lbin [String] Long Bank Identification Number
42
+ def add_lbin(lbin)
43
+ params.merge!(LBIN: lbin)
44
+ end
38
45
  end
39
46
  end
data/lib/kount.rb CHANGED
@@ -20,6 +20,7 @@ module Kount
20
20
  # }
21
21
  # @param options Hash
22
22
  def new(options = {})
23
+ raise ArgumentError, 'Config options required' if options.empty?
23
24
  Client.new(options)
24
25
  end
25
26
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kount_complete
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kount
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -54,6 +54,7 @@ files:
54
54
  - lib/kount/Response.rb
55
55
  - lib/kount/cart.rb
56
56
  - lib/kount/client.rb
57
+ - lib/kount/config.rb
57
58
  - lib/kount/payment_types.rb
58
59
  - lib/kount/request.rb
59
60
  - lib/kount/request/inquiry.rb
@@ -79,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
80
  - !ruby/object:Gem::Version
80
81
  version: 1.3.5
81
82
  requirements: []
82
- rubygems_version: 3.0.3
83
+ rubygems_version: 3.2.32
83
84
  signing_key:
84
85
  specification_version: 4
85
86
  summary: Kount Complete Services Wrapper