minfraud 1.5.0 → 1.6.0
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 +4 -4
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/test.yml +0 -4
- data/.rubocop.yml +3 -5
- data/CHANGELOG.md +12 -0
- data/LICENSE.txt +1 -1
- data/README.md +11 -10
- data/lib/minfraud/components/credit_card.rb +20 -8
- data/lib/minfraud/components/payment.rb +7 -0
- data/lib/minfraud/model/disposition.rb +11 -4
- data/lib/minfraud/version.rb +1 -1
- data/minfraud.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6df345c5d62d26c7e778a55423ac6a542ec8b94c040c6a43d26ef0cdad484503
|
4
|
+
data.tar.gz: 9d7d427983c71db3e4aa8ac1f7ef1008388a4847b455db50179e579292ac8c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cb3b9e1e1d825c828cf1e73684b70784ee1ba5de18902a1d76cd08b5f625cb276bd3a276c64e74f8c3cf8a8269be9c7707a6cd5afa12700d59281985178d070
|
7
|
+
data.tar.gz: 55fd1da7ed9543c44a6efcd4b3638b03a1537c31de12773a0446789f129234ceed750e16e8b0c8c629bcf2956815ef0b0f00cfdfe482fe3e4ad736b0cef5b3ef
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
NewCops: enable
|
3
4
|
|
4
5
|
# Metrics.
|
5
6
|
|
@@ -103,6 +104,3 @@ Lint/MissingSuper:
|
|
103
104
|
|
104
105
|
Naming/VariableNumber:
|
105
106
|
Enabled: false # Doesn't always make sense.
|
106
|
-
|
107
|
-
AllCops:
|
108
|
-
NewCops: enable
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Minfraud Changelog
|
2
2
|
|
3
|
+
## v1.6.0 (2021-08-19)
|
4
|
+
|
5
|
+
* Adds new processor to `Minfraud::Components::Payment`: `:cardknox`,
|
6
|
+
`:creditguard`, `:credorax`, `:datacap`, `:dlocal`, `:onpay`, and
|
7
|
+
`:safecharge`.
|
8
|
+
* Adds `rule_label` to minFraud output `/disposition`.
|
9
|
+
* Adds support for the `/credit_card/was_3d_secure_successful` input. This is
|
10
|
+
available by setting the `was_3d_secure_successful` attribute on
|
11
|
+
`Minfraud::Components::CreditCard`.
|
12
|
+
* Ruby 2.5+ is now required. If you're using Ruby 2.1, 2.2, 2.3, or 2.4,
|
13
|
+
please use version 1.5.0 of this gem.
|
14
|
+
|
3
15
|
## v1.5.0 (2021-02-02)
|
4
16
|
|
5
17
|
* Add the `hash_address` attribute to `Minfraud::Components::Email`. If
|
data/LICENSE.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
3
|
Copyright (c) 2016-2020 kushnir.yb
|
4
|
-
Copyright (c) 2020 MaxMind, Inc.
|
4
|
+
Copyright (c) 2020-2021 MaxMind, Inc.
|
5
5
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -122,14 +122,15 @@ assessment = Minfraud::Assessments.new(
|
|
122
122
|
decline_code: 'invalid number',
|
123
123
|
},
|
124
124
|
credit_card: {
|
125
|
-
issuer_id_number:
|
126
|
-
last_4_digits:
|
127
|
-
bank_name:
|
128
|
-
bank_phone_country_code:
|
129
|
-
bank_phone_number:
|
130
|
-
token:
|
131
|
-
avs_result:
|
132
|
-
cvv_result:
|
125
|
+
issuer_id_number: '411111',
|
126
|
+
last_4_digits: '7643',
|
127
|
+
bank_name: 'Bank of No Hope',
|
128
|
+
bank_phone_country_code: '1',
|
129
|
+
bank_phone_number: '123-456-1234',
|
130
|
+
token: 'abcd',
|
131
|
+
avs_result: 'Y',
|
132
|
+
cvv_result: 'N',
|
133
|
+
was_3d_secure_successful: true,
|
133
134
|
},
|
134
135
|
order: {
|
135
136
|
amount: 323.21,
|
@@ -264,7 +265,7 @@ to the client API, please see
|
|
264
265
|
|
265
266
|
## Requirements
|
266
267
|
|
267
|
-
This gem works with Ruby 2.
|
268
|
+
This gem works with Ruby 2.5 and above.
|
268
269
|
|
269
270
|
## Contributing
|
270
271
|
|
@@ -282,7 +283,7 @@ This API uses [Semantic Versioning](https://semver.org/).
|
|
282
283
|
|
283
284
|
Copyright (c) 2016-2020 kushnir.yb.
|
284
285
|
|
285
|
-
Copyright (c) 2020 MaxMind, Inc.
|
286
|
+
Copyright (c) 2020-2021 MaxMind, Inc.
|
286
287
|
|
287
288
|
The gem is available as open source under the terms of the [MIT
|
288
289
|
License](https://opensource.org/licenses/MIT).
|
@@ -62,17 +62,28 @@ module Minfraud
|
|
62
62
|
# @return [String, nil]
|
63
63
|
attr_accessor :cvv_result
|
64
64
|
|
65
|
+
# Whether the outcome of 3-D Secure verification (e.g. Safekey,
|
66
|
+
# SecureCode, Verified by Visa) was successful. +true+ if customer
|
67
|
+
# verification was successful, or +false+ if the customer failed
|
68
|
+
# verification. If 3-D Secure verification was not used, was unavailable,
|
69
|
+
# or resulted in an outcome other than success or failure, do not
|
70
|
+
# include this field.
|
71
|
+
#
|
72
|
+
# @return [Boolean, nil]
|
73
|
+
attr_accessor :was_3d_secure_successful
|
74
|
+
|
65
75
|
# @param params [Hash] Hash of parameters. Each key/value should
|
66
76
|
# correspond to one of the available attributes.
|
67
77
|
def initialize(params = {})
|
68
|
-
@bank_phone_country_code
|
69
|
-
@issuer_id_number
|
70
|
-
@last_4_digits
|
71
|
-
@bank_name
|
72
|
-
@bank_phone_number
|
73
|
-
@avs_result
|
74
|
-
@cvv_result
|
75
|
-
@token
|
78
|
+
@bank_phone_country_code = params[:bank_phone_country_code]
|
79
|
+
@issuer_id_number = params[:issuer_id_number]
|
80
|
+
@last_4_digits = params[:last_4_digits]
|
81
|
+
@bank_name = params[:bank_name]
|
82
|
+
@bank_phone_number = params[:bank_phone_number]
|
83
|
+
@avs_result = params[:avs_result]
|
84
|
+
@cvv_result = params[:cvv_result]
|
85
|
+
@token = params[:token]
|
86
|
+
@was_3d_secure_successful = params[:was_3d_secure_successful]
|
76
87
|
|
77
88
|
validate
|
78
89
|
end
|
@@ -90,6 +101,7 @@ module Minfraud
|
|
90
101
|
validate_string('avs_result', 1, @avs_result)
|
91
102
|
validate_string('cvv_result', 1, @cvv_result)
|
92
103
|
validate_credit_card_token('token', @token)
|
104
|
+
validate_boolean('was_3d_secure_successful', @was_3d_secure_successful)
|
93
105
|
end
|
94
106
|
end
|
95
107
|
end
|
@@ -31,6 +31,7 @@ module Minfraud
|
|
31
31
|
:bluesnap,
|
32
32
|
:bpoint,
|
33
33
|
:braintree,
|
34
|
+
:cardknox,
|
34
35
|
:cardpay,
|
35
36
|
:cashfree,
|
36
37
|
:ccavenue,
|
@@ -44,15 +45,19 @@ module Minfraud
|
|
44
45
|
:compropago,
|
45
46
|
:concept_payments,
|
46
47
|
:conekta,
|
48
|
+
:creditguard,
|
49
|
+
:credorax,
|
47
50
|
:ct_payments,
|
48
51
|
:cuentadigital,
|
49
52
|
:curopayments,
|
50
53
|
:cybersource,
|
51
54
|
:dalenys,
|
52
55
|
:dalpay,
|
56
|
+
:datacap,
|
53
57
|
:datacash,
|
54
58
|
:dibs,
|
55
59
|
:digital_river,
|
60
|
+
:dlocal,
|
56
61
|
:dotpay,
|
57
62
|
:ebs,
|
58
63
|
:ecomm365,
|
@@ -89,6 +94,7 @@ module Minfraud
|
|
89
94
|
:nmi,
|
90
95
|
:oceanpayment,
|
91
96
|
:oney,
|
97
|
+
:onpay,
|
92
98
|
:openpaymx,
|
93
99
|
:optimal_payments,
|
94
100
|
:orangepay,
|
@@ -124,6 +130,7 @@ module Minfraud
|
|
124
130
|
:rede,
|
125
131
|
:redpagos,
|
126
132
|
:rewardspay,
|
133
|
+
:safecharge,
|
127
134
|
:sagepay,
|
128
135
|
:securetrading,
|
129
136
|
:simplify_commerce,
|
@@ -10,8 +10,8 @@ module Minfraud
|
|
10
10
|
# rules.
|
11
11
|
class Disposition < Abstract
|
12
12
|
# The action to take on the transaction as defined by your custom rules.
|
13
|
-
# The current set of values are "accept", "manual_review",
|
14
|
-
# If you do not have custom rules set up, this will be nil.
|
13
|
+
# The current set of values are "accept", "manual_review", "reject", and
|
14
|
+
# "test". If you do not have custom rules set up, this will be nil.
|
15
15
|
#
|
16
16
|
# @return [String, nil]
|
17
17
|
attr_reader :action
|
@@ -23,12 +23,19 @@ module Minfraud
|
|
23
23
|
# @return [String, nil]
|
24
24
|
attr_reader :reason
|
25
25
|
|
26
|
+
# The label of the custom rule that was triggered. If you do not have
|
27
|
+
# custom rules set up, the triggered custom rule does not have a label,
|
28
|
+
# or no custom rule was triggered, this will be nil.
|
29
|
+
# @return [String, nil]
|
30
|
+
attr_reader :rule_label
|
31
|
+
|
26
32
|
# @!visibility private
|
27
33
|
def initialize(record)
|
28
34
|
super(record)
|
29
35
|
|
30
|
-
@action
|
31
|
-
@reason
|
36
|
+
@action = get('action')
|
37
|
+
@reason = get('reason')
|
38
|
+
@rule_label = get('rule_label')
|
32
39
|
end
|
33
40
|
end
|
34
41
|
end
|
data/lib/minfraud/version.rb
CHANGED
data/minfraud.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = 'https://github.com/maxmind/minfraud-api-ruby'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
|
-
spec.required_ruby_version = '>= 2.
|
18
|
+
spec.required_ruby_version = '>= 2.5.0'
|
19
19
|
|
20
20
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
21
|
spec.bindir = 'exe'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minfraud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kushnir.yb
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -154,13 +154,14 @@ dependencies:
|
|
154
154
|
- - ">="
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
|
-
description:
|
157
|
+
description:
|
158
158
|
email:
|
159
159
|
- support@maxmind.com
|
160
160
|
executables: []
|
161
161
|
extensions: []
|
162
162
|
extra_rdoc_files: []
|
163
163
|
files:
|
164
|
+
- ".github/dependabot.yml"
|
164
165
|
- ".github/workflows/rubocop.yml"
|
165
166
|
- ".github/workflows/test.yml"
|
166
167
|
- ".gitignore"
|
@@ -241,7 +242,7 @@ homepage: https://github.com/maxmind/minfraud-api-ruby
|
|
241
242
|
licenses:
|
242
243
|
- MIT
|
243
244
|
metadata: {}
|
244
|
-
post_install_message:
|
245
|
+
post_install_message:
|
245
246
|
rdoc_options: []
|
246
247
|
require_paths:
|
247
248
|
- lib
|
@@ -249,16 +250,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
249
250
|
requirements:
|
250
251
|
- - ">="
|
251
252
|
- !ruby/object:Gem::Version
|
252
|
-
version:
|
253
|
+
version: 2.5.0
|
253
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
254
255
|
requirements:
|
255
256
|
- - ">="
|
256
257
|
- !ruby/object:Gem::Version
|
257
258
|
version: '0'
|
258
259
|
requirements: []
|
259
|
-
|
260
|
-
|
261
|
-
signing_key:
|
260
|
+
rubygems_version: 3.1.2
|
261
|
+
signing_key:
|
262
262
|
specification_version: 4
|
263
263
|
summary: Ruby API for the minFraud Score, Insights, Factors, and Report Transactions
|
264
264
|
services
|