kount_complete 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kount.rb +0 -1
- data/lib/kount/Response.rb +8 -8
- data/lib/kount/request.rb +0 -2
- data/lib/kount/request/inquiry.rb +5 -7
- data/lib/kount/utils/khash.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10600c289b443555890abb28f2ff53e58ce14034fb095f3b23e675152f00ab61
|
4
|
+
data.tar.gz: 265c55111a4e6224d23173eaf569a30dcf2ad7c878c88f1d9d38e02c0d4dcebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db97cb94c2b116e60bc6de56c2901ca6d073b7aa653a1b0b6358c2cbbed8fe6c66554f602ad69c4328d06015bb7838d792c65370f7161c0a752ff660b82484c3
|
7
|
+
data.tar.gz: 3f6f26bd5e8a5c22a7a37ac75df9e99f54622fb7c1746b756530a4de89799074375198c1e9b69efa59546e1b7b9b72f8e3af9002d00d5855f01c60a518c537ec
|
data/lib/kount.rb
CHANGED
data/lib/kount/Response.rb
CHANGED
@@ -284,8 +284,8 @@ module Response
|
|
284
284
|
end
|
285
285
|
|
286
286
|
def get_numberrules_triggered
|
287
|
-
|
288
|
-
|
287
|
+
# changed due to rubocop styling rules for ruby
|
288
|
+
@paramlist['RULES_TRIGGERED'].to_s
|
289
289
|
end
|
290
290
|
|
291
291
|
def get_rules_triggered
|
@@ -299,8 +299,8 @@ module Response
|
|
299
299
|
end
|
300
300
|
|
301
301
|
def get_warning_count
|
302
|
-
|
303
|
-
|
302
|
+
# changed due to rubocop styling rules for ruby
|
303
|
+
@paramlist['WARNING_COUNT'].to_s
|
304
304
|
end
|
305
305
|
|
306
306
|
def get_warnings
|
@@ -313,8 +313,8 @@ module Response
|
|
313
313
|
end
|
314
314
|
|
315
315
|
def get_error_count
|
316
|
-
|
317
|
-
|
316
|
+
# changed due to rubocop styling rules for ruby
|
317
|
+
@paramlist['ERROR_COUNT'].to_s
|
318
318
|
end
|
319
319
|
|
320
320
|
def geterrors
|
@@ -327,8 +327,8 @@ module Response
|
|
327
327
|
end
|
328
328
|
|
329
329
|
def get_numbercounters_triggered
|
330
|
-
|
331
|
-
|
330
|
+
# changed due to rubocop styling rules for ruby
|
331
|
+
@paramlist['COUNTERS_TRIGGERED'].to_s
|
332
332
|
end
|
333
333
|
|
334
334
|
def get_counters_triggered
|
data/lib/kount/request.rb
CHANGED
@@ -24,13 +24,11 @@ module Kount
|
|
24
24
|
# @param ksalt [String] Kount supplied secret salt for KHASH
|
25
25
|
def prepare_params(version, merchant_id, response_format, ksalt)
|
26
26
|
super(version, merchant_id, response_format, ksalt)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
fixup_payment_params(ksalt, merchant_id)
|
33
|
-
end
|
27
|
+
params.merge! collect_cart_items
|
28
|
+
# The Kount::Request has no knowledge of the KSALT or merchant_id, both
|
29
|
+
# of which are needed for KHASH. Request form params have everything we
|
30
|
+
# need at this point to do the KHASH if needed.
|
31
|
+
fixup_payment_params(ksalt, merchant_id)
|
34
32
|
params
|
35
33
|
end
|
36
34
|
|
data/lib/kount/utils/khash.rb
CHANGED
@@ -4,9 +4,12 @@ module Kount
|
|
4
4
|
# @param ptyp [String] Payment type code: CARD, GIFT, or OTHER
|
5
5
|
# @return [String] KHASH version of string
|
6
6
|
def self.hash_token(plain_text, ptyp, ksalt, merchant_id = '')
|
7
|
-
if
|
7
|
+
# changed if-else to case-when to follow ruby coding standard
|
8
|
+
|
9
|
+
case ptyp
|
10
|
+
when 'CARD'
|
8
11
|
HashPaymentToken(plain_text, ksalt)
|
9
|
-
|
12
|
+
when 'CHEK'
|
10
13
|
HashCheckPayment(plain_text, ksalt)
|
11
14
|
else
|
12
15
|
HashGiftCard(plain_text, ksalt, merchant_id)
|
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.
|
4
|
+
version: 2.0.4
|
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: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|