issuer_response_codes 0.1.3 → 0.2.3

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: f30e5afe484a09019488f8e4de8d67f26cdde55a35ee0fc129227f726f7b78b6
4
- data.tar.gz: 05d1504748e11ac63423f3107281f746455ff04dc282707d2797c04f1943ac11
3
+ metadata.gz: 48a86fdf7a496cf0d8c922c64ede30d1e01721e6838eb4b010624bf0d0730327
4
+ data.tar.gz: 96460d711e7886f3e70a4cd9aae0c6abf208c8f3cc50487e3ac536fa0dd640d2
5
5
  SHA512:
6
- metadata.gz: b91d8309622bdd9f4efea3b50372719b3ccca9cb5b610f3c8dc5da4c0de1175ad72793779d395c74dd6f2b127e1ce88ac1804c537c792a30d2357af4248b88da
7
- data.tar.gz: 13ab508736d7f06877966cfa1a9f84a35e35be8f940678f93b10624e3bfe0e4cc03c1b7bdc65d74817b66ccc89890db6d520518ddbfae54d43a6d3792db9ef43
6
+ metadata.gz: 1b07bb422b09284e992ffa9342e8057ccb1cf46ea7ac84e29b593023a538f80722a7a55ae9dd2c780eb2c4a1b024e0f60d4ab968d38b4f181e0dec110319a9c8
7
+ data.tar.gz: 4de04dd09115486f6a29b943d346dff426549277acf4f776a053311033d157e772cdd665cad2fe816335d3bedf350d6b135bda10d012f8efbc2ab94e03d188d3
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ issuer_response_codes
data/Gemfile.lock CHANGED
@@ -1,27 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- issuer_response_codes (0.1.3)
4
+ issuer_response_codes (0.2.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
- backport (1.1.2)
10
+ backport (1.2.0)
11
11
  benchmark (0.1.1)
12
12
  bundler-audit (0.8.0)
13
13
  bundler (>= 1.2.0, < 3)
14
14
  thor (~> 1.0)
15
15
  byebug (11.1.3)
16
+ diff-lcs (1.4.4)
16
17
  e2mmap (0.1.0)
17
18
  jaro_winkler (1.5.4)
18
19
  kramdown (2.3.1)
19
20
  rexml
20
21
  kramdown-parser-gfm (1.1.0)
21
22
  kramdown (~> 2.0)
22
- mini_portile2 (2.5.1)
23
+ mini_portile2 (2.5.3)
23
24
  minitest (5.14.4)
24
- nokogiri (1.11.3)
25
+ nokogiri (1.11.7)
25
26
  mini_portile2 (~> 2.5.0)
26
27
  racc (~> 1.4)
27
28
  parallel (1.20.1)
@@ -34,22 +35,23 @@ GEM
34
35
  reverse_markdown (2.0.0)
35
36
  nokogiri
36
37
  rexml (3.2.5)
37
- rubocop (1.14.0)
38
+ rubocop (1.18.2)
38
39
  parallel (~> 1.10)
39
40
  parser (>= 3.0.0.0)
40
41
  rainbow (>= 2.2.2, < 4.0)
41
42
  regexp_parser (>= 1.8, < 3.0)
42
43
  rexml
43
- rubocop-ast (>= 1.5.0, < 2.0)
44
+ rubocop-ast (>= 1.7.0, < 2.0)
44
45
  ruby-progressbar (~> 1.7)
45
46
  unicode-display_width (>= 1.4.0, < 3.0)
46
- rubocop-ast (1.5.0)
47
+ rubocop-ast (1.7.0)
47
48
  parser (>= 3.0.1.1)
48
49
  ruby-progressbar (1.11.0)
49
- solargraph (0.40.4)
50
- backport (~> 1.1)
50
+ solargraph (0.42.3)
51
+ backport (~> 1.2)
51
52
  benchmark
52
53
  bundler (>= 1.17.2)
54
+ diff-lcs (~> 1.4)
53
55
  e2mmap
54
56
  jaro_winkler (~> 1.5)
55
57
  kramdown (~> 2.3)
data/README.md CHANGED
@@ -1,13 +1,15 @@
1
1
  # IssuerResponseCodes
2
2
 
3
- This gem provides a quite comprehensive library of Issuer Response Code descriptions (for both cardholders and merchants) with suggested actions in 7 languages:
3
+ This gem provides a quite comprehensive library of Issuer Response Code and 3D-Secure Status Code descriptions (for both cardholders and merchants) with suggested actions in 9 languages:
4
4
  - Complete locales:
5
- - en
6
- - pl
5
+ - en
6
+ - pl
7
7
 
8
8
  - Incomplete locales:
9
9
  - da
10
+ - de
10
11
  - ee
12
+ - it
11
13
  - lt
12
14
  - lv
13
15
  - sv
@@ -59,11 +61,22 @@ def response_code_description
59
61
  ::ISSUER_RESPONSE_CODES.code(id: '43', locale: :pl).description
60
62
  #=> "Karta oznaczona jako skradziona. Skontaktuj się z Twoim bankiem w celu wyjaśnienia przyczyny problemu."
61
63
  end
64
+
65
+ def tds_code_description
66
+ ::ISSUER_RESPONSE_CODES.tds_code(id: '09').description
67
+ #=> "Security failure"
68
+
69
+ ::ISSUER_RESPONSE_CODES.tds_code(id: '09', target: :cardholder).description
70
+ #=> "Card authentication failed"
71
+
72
+ ::ISSUER_RESPONSE_CODES.tds_code(id: '09', locale: :pl).description
73
+ #=> "Niepowodzenie autoryzacji karty"
74
+ end
62
75
  ```
63
76
 
64
77
  ## Usage
65
78
 
66
- This gem provides an easy way of handling Issuer Response Codes. Whether you need detailed descriptions, short reasons or suggestions of what to do when a certain Code appeared, we've got you covered. Certain more explicit codes like `Stolen card' are masked behind more generic terms when you choose to target cardholders.
79
+ This gem provides an easy way of handling Issuer Response Codes and 3D-Secure Status Codes. Whether you need detailed descriptions, short reasons or suggestions of what to do when a certain Code appeared, we've got you covered. Certain more explicit codes like `Stolen card' are masked behind more generic terms when you choose to target cardholders.
67
80
 
68
81
  ### IssuerResponseCodes::Code
69
82
  #### Creation options
@@ -135,7 +148,7 @@ code.reason #=> "Karta utraciła ważność."
135
148
 
136
149
  #### Methods
137
150
 
138
- ##### Reason
151
+ ##### reason
139
152
 
140
153
  The `reason` method returns a relatively short description of the main reason why the Issuer Response Code appeared in the first place.
141
154
 
@@ -150,7 +163,7 @@ code = ::IssuerResponseCodes::Code.new(id: '59')
150
163
  code.reason #=> "Your bank has declined this transaction"
151
164
  ```
152
165
 
153
- ##### Behaviour
166
+ ##### behaviour
154
167
 
155
168
  The `behaviour` method returns a suggestion of what to do when the Issuer Response Code appeared. Mainly for cardholders.
156
169
 
@@ -165,9 +178,9 @@ code = ::IssuerResponseCodes::Code.new(id: '59')
165
178
  code.behaviour #=> "Please contact your card issuer to get more details and try again later."
166
179
  ```
167
180
 
168
- ##### Description
181
+ ##### description/humanize
169
182
 
170
- The `description` method is a combination of both the `reason` and `behaviour` of a Issuer Response Code
183
+ The `description` method (aliased as `humanize`) is a combination of both the `reason` and `behaviour` of a Issuer Response Code
171
184
 
172
185
  ```ruby
173
186
  code = ::IssuerResponseCodes::Code.new(id: '14')
@@ -180,6 +193,148 @@ code = ::IssuerResponseCodes::Code.new(id: '59')
180
193
  code.description #=> "Your bank has declined this transaction. Please contact your card issuer to get more details and try again later."
181
194
  ```
182
195
 
196
+ ##### fraudulent_code?
197
+
198
+ The `fraudulent_code?` method returns `true` when the Code indicates fraud.
199
+
200
+ ```ruby
201
+ code = ::IssuerResponseCodes::Code.new(id: '14')
202
+ code.fraudulent_code? #=> false
203
+
204
+ code = ::IssuerResponseCodes::Code.new(id: '04')
205
+ code.fraudulent_code? #=> true
206
+
207
+ code = ::IssuerResponseCodes::Code.new(id: '43')
208
+ code.fraudulent_code? #=> true
209
+ ```
210
+
211
+ ### IssuerResponseCodes::TdsCode
212
+ #### Creation options
213
+
214
+ ##### Targets
215
+
216
+ You can choose the main target of these descriptions (certain details are hidden for cardholders)
217
+
218
+ ```ruby
219
+ # Default values are as follows:
220
+ # target: :merchant, locale: :en
221
+
222
+ # fraud_notice is set to true by default when target = :merchant
223
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11')
224
+ code.reason #=> "Suspected fraud."
225
+
226
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11', target: :merchant)
227
+ code.reason #=> "Suspected fraud."
228
+
229
+ # fraud_notice is set to false by default when target = :cardholder
230
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11', target: :cardholder)
231
+ code.reason #=> "Card authentication failed."
232
+ ```
233
+
234
+ ##### Fraud notice
235
+
236
+ Certain 3D-Secure status codes may signify that the transaction may be viewed as a fraud attempt. As such, this gem provides appropriate warnings. You can manually decide whether these warnings/notices should be added to descriptions or behaviour suggestions generated by this gem.
237
+
238
+ By default descriptions targeted at merchants have these warnings, while those targeted at cardholders omit them.
239
+
240
+ ```ruby
241
+ code = ::IssuerResponseCodes::TdsCode.new(id: '09', target: :merchant)
242
+ code.behaviour #=> "Please use a different card or contact issuer. Transactions with this code may be considered fraudulent."
243
+
244
+ # fraud_notice is set to false by default when target = :cardholder
245
+ code = ::IssuerResponseCodes::TdsCode.new(id: '09', target: :cardholder)
246
+ code.behaviour #=> "Please use a different card or contact issuer."
247
+ ```
248
+
249
+ This however can be overridden by explicitly passing the `fraud_notice` keyword parameter
250
+
251
+ ```ruby
252
+ # default options can be overridden
253
+ code = ::IssuerResponseCodes::TdsCode.new(id: '09', target: :merchant, fraud_notice: false)
254
+ code.behaviour #=> "Please use a different card or contact issuer."
255
+
256
+ # fraud_notice is set to false by default when target = :cardholder
257
+ code = ::IssuerResponseCodes::TdsCode.new(id: '09', target: :cardholder, fraud_notice: true)
258
+ code.behaviour #=> "Please use a different card or contact issuer. Transactions with this code may be considered fraudulent."
259
+ ```
260
+
261
+ ##### Locale
262
+
263
+ The default locale is `:en`. There are 7 in total: `%i[en pl da ee lt lv sv]`. Only the first two are complete, the rest are partially in English.
264
+
265
+ ```ruby
266
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11', target: :cardholder)
267
+ code.reason #=> "Card authentication failed."
268
+
269
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11', locale: :en, target: :cardholder)
270
+ code.reason #=> "Card authentication failed."
271
+
272
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11', locale: :pl, target: :cardholder)
273
+ code.reason #=> "Negatywny wynik silnego uwierzytelnienia w systemie banku."
274
+ ```
275
+
276
+ #### Methods
277
+
278
+ ##### reason
279
+
280
+ The `reason` method returns a relatively short description of the main reason why the 3D-Secure status code appeared in the first place.
281
+
282
+ ```ruby
283
+ code = ::IssuerResponseCodes::TdsCode.new(id: '01')
284
+ code.reason #=> "Card authentication failed."
285
+
286
+ code = ::IssuerResponseCodes::TdsCode.new(id: '07')
287
+ code.reason #=> "Invalid transaction."
288
+
289
+ code = ::IssuerResponseCodes::TdsCode.new(id: '20')
290
+ code.reason #=> "Non-Payment transaction not supported."
291
+ ```
292
+
293
+ ##### behaviour
294
+
295
+ The `behaviour` method returns a suggestion of what to do when the 3D-Secure status code appeared. Mainly for cardholders.
296
+
297
+ ```ruby
298
+ code = ::IssuerResponseCodes::TdsCode.new(id: '01')
299
+ code.behaviour #=> "Check entered data and try again."
300
+
301
+ code = ::IssuerResponseCodes::TdsCode.new(id: '07')
302
+ code.behaviour #=> "Please check funds on your account and try again later."
303
+
304
+ code = ::IssuerResponseCodes::TdsCode.new(id: '20')
305
+ code.behaviour #=> "Please contact your card issuer to get more details and try again later."
306
+ ```
307
+
308
+ ##### description/humanize
309
+
310
+ The `description` method (aliased as `humanize`) is a combination of both the `reason` and `behaviour` of a Issuer Response Code
311
+
312
+ ```ruby
313
+ code = ::IssuerResponseCodes::TdsCode.new(id: '01')
314
+ code.description #=> "Invalid card number. Check entered data and try again."
315
+
316
+ code = ::IssuerResponseCodes::TdsCode.new(id: '07')
317
+ code.description #=> "Insufficient funds. Please check funds on your account and try again later."
318
+
319
+ code = ::IssuerResponseCodes::TdsCode.new(id: '20')
320
+ code.description #=> "Your bank has declined this transaction. Please contact your card issuer to get more details and try again later."
321
+ ```
322
+
323
+ ##### fraudulent_code?
324
+
325
+ The `fraudulent_code?` method returns `true` when the TdsCode indicates fraud.
326
+
327
+ ```ruby
328
+ code = ::IssuerResponseCodes::TdsCode.new(id: '11')
329
+ code.fraudulent_code? #=> true
330
+
331
+ code = ::IssuerResponseCodes::TdsCode.new(id: '22')
332
+ code.fraudulent_code? #=> false
333
+
334
+ code = ::IssuerResponseCodes::TdsCode.new(id: '26')
335
+ code.fraudulent_code? #=> false
336
+ ```
337
+
183
338
  ### Custom default configuration
184
339
 
185
340
  You can make use of the `Context` class to easily create your own default configurations. Contexts work as proxies which create codes for you.
@@ -198,6 +353,9 @@ code = ISSUER_RESPONSE_CODES.code(id: '43')
198
353
  code.reason #=> "Bank odrzucił autoryzację."
199
354
  code.behaviour #=> "Skontaktuj się z Twoim bankiem w celu wyjaśnienia przyczyny problemu. UWAGA: Nie należy powtarzać obciążeń dla tej karty! Może to zostać uznane za próbę oszustwa!"
200
355
 
356
+ tds_code = ISSUER_RESPONSE_CODES.tds_code(id: '11')
357
+ tds_code.reason #=> "Niepowodzenie autoryzacji karty"
358
+
201
359
  # these can always be overridden
202
360
  code = ISSUER_RESPONSE_CODES.code(id: '43', locale: :en, target: :merchant, fraud_notice: false)
203
361
  code.reason #=> "Stolen card."
@@ -33,8 +33,14 @@ module IssuerResponseCodes
33
33
  end
34
34
 
35
35
  def behaviour
36
- fraud_notice_str = fraud_notice ? LOCALE_LIBRARY.dig(path: 'issuer_response_codes.fraud_notice') : ''
37
- LOCALE_LIBRARY.dig(path: id, substitute: fraud_notice_str, scope: "issuer_response_codes.behaviour", locale: locale, default: :unknown)
36
+ behaviour_str = LOCALE_LIBRARY.dig(path: id, scope: "issuer_response_codes.behaviour", locale: locale, default: :unknown)
37
+ return behaviour_str unless fraud_notice && fraudulent_code?
38
+
39
+ "#{behaviour_str} #{LOCALE_LIBRARY.dig(path: 'issuer_response_codes.fraud_notice')}"
40
+ end
41
+
42
+ def fraudulent_code?
43
+ @fraudulent_code ||= LOCALE_LIBRARY.dig(path: id, scope: "issuer_response_codes.fraudulent_codes", locale: locale)
38
44
  end
39
45
  end
40
46
  end
@@ -24,5 +24,9 @@ module IssuerResponseCodes
24
24
  def code(id:, target: default_target, locale: default_locale, fraud_notice: fraud_notice_by_default)
25
25
  Code.new(id: id, target: target, locale: locale, fraud_notice: fraud_notice)
26
26
  end
27
+
28
+ def tds_code(id:, target: default_target, locale: default_locale, fraud_notice: fraud_notice_by_default)
29
+ TdsCode.new(id: id, target: target, locale: locale, fraud_notice: fraud_notice)
30
+ end
27
31
  end
28
32
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'yaml'
4
- require 'byebug'
5
4
 
6
5
  module IssuerResponseCodes
7
6
  class LocaleLibrary
@@ -18,10 +17,45 @@ module IssuerResponseCodes
18
17
  def dig(path:, locale: :en, scope: '', default: nil, substitute: '')
19
18
  result = __dig__(path: path, locale: locale, scope: scope, default: default)
20
19
  return result unless result
20
+ return result unless result.is_a? ::String
21
21
 
22
22
  result.gsub(/%{substitute}/, substitute)
23
23
  end
24
24
 
25
+ def issuer_response_codes(locale: :en)
26
+ behaviours = locale_hash.dig(locale, :issuer_response_codes, :behaviour)
27
+ cardholder_reasons = locale_hash.dig(locale, :issuer_response_codes, :targeted, :cardholder)
28
+ merchant_reasons = locale_hash.dig(locale, :issuer_response_codes, :targeted, :merchant)
29
+
30
+ merchant_reasons.map do |code, merchant_reason|
31
+ [
32
+ code,
33
+ {
34
+ merchant_reason: merchant_reason,
35
+ cardholder_reason: cardholder_reasons[code],
36
+ behaviour: behaviours[code]
37
+ }
38
+ ]
39
+ end.to_h
40
+ end
41
+
42
+ def tds_codes(locale: :en)
43
+ behaviours = locale_hash.dig(locale, :tds_status_codes, :behaviour)
44
+ cardholder_reasons = locale_hash.dig(locale, :tds_status_codes, :targeted, :cardholder)
45
+ merchant_reasons = locale_hash.dig(locale, :tds_status_codes, :targeted, :merchant)
46
+
47
+ merchant_reasons.map do |code, merchant_reason|
48
+ [
49
+ code,
50
+ {
51
+ merchant_reason: merchant_reason,
52
+ cardholder_reason: cardholder_reasons[code],
53
+ behaviour: behaviours[code]
54
+ }
55
+ ]
56
+ end.to_h
57
+ end
58
+
25
59
  def self.symbolize_keys(hash)
26
60
  h = hash.map do |k, v|
27
61
  v_sym = if v.instance_of? Hash
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module IssuerResponseCodes
4
+ class TdsCode < Code
5
+ def humanize
6
+ "#{reason} #{behaviour}"
7
+ end
8
+
9
+ alias description humanize
10
+
11
+ def reason
12
+ LOCALE_LIBRARY.dig(path: id, scope: "tds_status_codes.targeted.#{target}", locale: locale, default: :unknown)
13
+ end
14
+
15
+ def behaviour
16
+ behaviour_str = LOCALE_LIBRARY.dig(path: id, scope: "tds_status_codes.behaviour", locale: locale, default: :unknown)
17
+ return behaviour_str unless fraud_notice && fraudulent_code?
18
+
19
+ "#{behaviour_str} #{LOCALE_LIBRARY.dig(path: 'tds_status_codes.fraud_notice')}"
20
+ end
21
+
22
+ def fraudulent_code?
23
+ @fraudulent_code ||= LOCALE_LIBRARY.dig(path: id, scope: "tds_status_codes.fraudulent_codes", locale: locale)
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IssuerResponseCodes
4
- VERSION = '0.1.3'
4
+ VERSION = '0.2.3'
5
5
  end
@@ -4,13 +4,14 @@ require "issuer_response_codes/version"
4
4
  require "issuer_response_codes/locale_library"
5
5
  require "issuer_response_codes/context"
6
6
  require "issuer_response_codes/code"
7
+ require "issuer_response_codes/tds_code"
7
8
 
8
9
  module IssuerResponseCodes
9
10
  class IllegalTarget < StandardError; end
10
11
  class IllegalLocale < StandardError; end
11
12
 
12
13
  AVAILABLE_TARGETS = %i[merchant cardholder].freeze
13
- AVAILABLE_LOCALES = %i[en pl da ee lt lv sv].freeze
14
+ AVAILABLE_LOCALES = %i[en pl da de ee it lt lv sv].freeze
14
15
 
15
16
  LOCALE_LIBRARY = LocaleLibrary.new
16
17
  end
data/lib/locale/da.yml CHANGED
@@ -1,41 +1,118 @@
1
1
  da:
2
- issuer_response_code: &issuer_response_code
3
- '00': "En fejl opstod. Transaktionen blev afvist af Elavon på grund af ikke-understøttet korttype eller forkerte kortdata, intet svar fra udsteder / bank eller inaktiv Merchant-konto."
4
- '05': "Banken har afvist transaktionen på grund af sikkerhedskontrol (brugt kort understøtter ikke tilbagebetalinger eller betaling uden CVV-kode), midlerne er blevet frosset eller grænsen overskredet, eller kortet understøtter ikke MOTO / internet-transaktioner."
5
- '13': "MOTO / eCommerce betalinger på kort er inaktive eller beløbsgrænse overstiger."
6
- '14': "Ugyldigt kortnummer."
7
- 'N7': "Negative CVV / CVC resultater."
8
- '51': "Ikke nok penge."
9
- '54': "Udgået kort."
10
- '57': "Banken har afvist transaktionen, da dette kreditkort ikke kan bruges til denne type transaktion (e-handel, MOTO eller tilbagevendende)."
11
- '61': "Banken har afvist transaktionen."
12
- '82': "Negative CVV / CVC resultater."
13
- # incomplete translations
14
- unknown: "Unknown reason."
15
- '01': "Authorization Error."
16
- '02': "Authorization Error."
17
- '03': "Authorization Error."
18
- '12': "No privileges to execute this transaction for your card."
19
- '30': "Your bank has declined this transaction"
20
- '58': "Your bank has declined this transaction as this credit card cannot be used for this type of transaction (eccommerce, MOTO or recurring)."
21
- '59': "Your bank has declined this transaction"
22
- '62': "Your card can be not supported due to restrictions placed on the card or Seller country exclusion (imposition an embargo), or bank blocked a card eg. due to unacceptable debit balance."
23
- '65': "Activity count limit exceeded."
24
- '75': "Invalid activity count limit exceeded."
25
- '78': "Inactive card."
26
- '91': "Temporary issuer error."
27
- '92': "Temporary issuer error."
28
- '94': "Temporary issuer error."
29
- '96': "Temporary issuer error."
30
- '98': "Temporary issuer error."
31
- 'E3': "Transaction not executed due to a 3D-Secure error."
32
- 'E4': "Transaction not executed due to a negative 3D-Secure confirmation from your bank."
33
- 'E5': "Temporary 3D-Secure error."
34
- 'R0': "Refused by Issuer because Customer requested stop of specific recurring payments."
35
- 'R1': "Refused by Issuer because Customer requested stop of all recurring payments."
2
+ tds_status_codes:
3
+ fraudulent_codes:
4
+ '09': true
5
+ '10': true
6
+ '11': true
7
+ behaviour:
8
+ unknown: 'Please contact our support team.'
9
+ '01': Please try again.
10
+ '02': Please try again using a different device.
11
+ '03': Please try again using a different device.
12
+ '04': Please use a different card or contact your card issuer.
13
+ '05': Please use a different card.
14
+ '06': Please use a different card or check the card number.
15
+ '07': Please use a different card.
16
+ '08': Please use a different card.
17
+ '09': Please use a different card or contact issuer.
18
+ '10': Please use a different card or contact issuer.
19
+ '11': Please use a different card or contact issuer.
20
+ '12': Please use a different card or contact issuer.
21
+ '13': Please use a different card or contact issuer.
22
+ '14': Please try again or use a different card.
23
+ '15': Please use a different card or contact issuer.
24
+ '16': Please use a different card or contact issuer.
25
+ '17': Please use a different card or contact issuer.
26
+ '18': Please use a different card or contact issuer.
27
+ '19': Please use a different card or contact issuer.
28
+ '20': Please use a different card.
29
+ '21': Please use a different card.
30
+ '22': Please try again or use a different card.
31
+ '23': Please use a different card or contact issuer.
32
+ '24': Please try again or use a different card.
33
+ '25': Please try again or use a different card.
34
+ '26': Please try again or use a different card.
35
+ '80': Please use a different card.
36
+ '81': Please try again or use a different card.
37
+ '82': Please use a different card.
38
+ '83': Please use a different card.
39
+ '84': Please try again or use a different card.
40
+ '85': Please use a different card.
41
+ '86': Please use a different card.
42
+ '87': Please use a different card.
43
+ '88': Please use a different card.
44
+ universal: &universal_tds_status_codes
45
+ unknown: "Unknown reason."
46
+ '01': Card authentication failed.
47
+ '02': Unknown Device.
48
+ '03': Unsupported Device.
49
+ '04': Exceeds authentication frequency limit.
50
+ '05': Expired card.
51
+ '06': Invalid card number.
52
+ '07': Invalid transaction.
53
+ '08': No Card record.
54
+ '15': Low confidence.
55
+ '16': Medium confidence.
56
+ '17': High confidence.
57
+ '18': Very High confidence.
58
+ '19': Exceeds ACS maximum challenges.
59
+ '20': Non-Payment transaction not supported.
60
+ targeted:
61
+ merchant:
62
+ <<: *universal_tds_status_codes
63
+ '09': Security failure.
64
+ '10': Stolen card.
65
+ '11': Suspected fraud.
66
+ '12': Transaction not permitted to cardholder.
67
+ '13': Cardholder not enrolled in service.
68
+ '14': Transaction timed out at the ACS.
69
+ '21': 3RI transaction not supported.
70
+ '22': ACS technical issue.
71
+ '23': Decoupled Authentication required by ACS but not requested by 3DS Requestor.
72
+ '24': 3DS Requestor Decoupled Max Expiry Time exceeded.
73
+ '25': Decoupled Authentication was provided insufficient time to authenticate cardholder. ACS will not make attempt.
74
+ '26': Authentication attempted but not performed by the cardholder.
75
+ '80': Error Connecting to ACS.
76
+ '81': ACS Timed Out.
77
+ '82': Invalid Response from ACS.
78
+ '83': System Error Response from ACS.
79
+ '84': Internal Error While Generating CAVV.
80
+ '85': VMID not eligible for requested program.
81
+ '86': Protocol Version Not Supported by ACS.
82
+ '87': Transaction is excluded from Attempts Processing (includes non- reloadable pre-paid cards and Non- Payments (NPA)).
83
+ '88': Requested program not supported by the ACS.
84
+ cardholder:
85
+ <<: *universal_tds_status_codes
86
+ '09': Card authentication failed. # Security failure
87
+ '10': Card authentication failed. # Stolen card
88
+ '11': Card authentication failed. # Suspected fraud
89
+ '12': Transaction not permitted to cardholder.
90
+ '13': Cardholder not enrolled in service.
91
+ '14': Card authentication failed.
92
+ '21': Card authentication failed.
93
+ '22': Issuer technical issue.
94
+ '23': Card authentication failed
95
+ '24': Card authentication failed
96
+ '25': Card authentication failed.
97
+ '26': Card authentication failed.
98
+ '80': Card authentication failed.
99
+ '81': Card authentication failed.
100
+ '82': Card authentication failed.
101
+ '83': Card authentication failed.
102
+ '84': Card authentication failed.
103
+ '85': Card authentication failed.
104
+ '86': Card authentication failed.
105
+ '87': Card authentication failed.
106
+ '88': Card authentication failed.
107
+
36
108
  issuer_response_codes:
37
109
  suggestion: 'Suggestion'
38
110
  fraud_notice: 'IMPORTANT NOTICE: It is forbidden to retry transactions that ended with this code. It may be recognized as a fraud attempt!'
111
+ fraudulent_codes:
112
+ '04': true
113
+ '07': true
114
+ '41': true
115
+ '43': true
39
116
  behaviour:
40
117
  '00': "Prøv igen senere, kontakt med sælger eller med Espago Support Team."
41
118
  '05': "Tjek venligst dine kortindstillinger for disse transaktionstyper eller brug et andet kort."
@@ -52,12 +129,12 @@ da:
52
129
  '01': "Please contact your card issuer."
53
130
  '02': "Please contact your card issuer."
54
131
  '03': "Please contact your card issuer and try again later."
55
- '04': "Please contact your card issuer and try again later. %{substitute}"
56
- '07': "Please contact your card issuer and try again later. %{substitute}"
132
+ '04': "Please contact your card issuer and try again later."
133
+ '07': "Please contact your card issuer and try again later."
57
134
  '12': "Please contact your card issuer to get more details and try again later."
58
135
  '30': "Please contact your card issuer to get more details and try again later."
59
- '41': "Please contact your card issuer to get more details and try again later. %{substitute}"
60
- '43': "Please contact your card issuer to get more details and try again later. %{substitute}"
136
+ '41': "Please contact your card issuer to get more details and try again later."
137
+ '43': "Please contact your card issuer to get more details and try again later."
61
138
  '58': "Please check your card settings for those transaction types or use another card."
62
139
  '59': "Please contact your card issuer to get more details and try again later."
63
140
  '62': "Please contact your bank."
@@ -74,6 +151,40 @@ da:
74
151
  'E5': "Please try again later or contact your card issuer to get more details"
75
152
  'R0': "Please contact your card issuer to get more details and try again later."
76
153
  'R1': "Please contact your card issuer to get more details and try again later."
154
+ universal: &issuer_response_code
155
+ '00': "En fejl opstod. Transaktionen blev afvist af Elavon på grund af ikke-understøttet korttype eller forkerte kortdata, intet svar fra udsteder / bank eller inaktiv Merchant-konto."
156
+ '05': "Banken har afvist transaktionen på grund af sikkerhedskontrol (brugt kort understøtter ikke tilbagebetalinger eller betaling uden CVV-kode), midlerne er blevet frosset eller grænsen overskredet, eller kortet understøtter ikke MOTO / internet-transaktioner."
157
+ '13': "MOTO / eCommerce betalinger på kort er inaktive eller beløbsgrænse overstiger."
158
+ '14': "Ugyldigt kortnummer."
159
+ 'N7': "Negative CVV / CVC resultater."
160
+ '51': "Ikke nok penge."
161
+ '54': "Udgået kort."
162
+ '57': "Banken har afvist transaktionen, da dette kreditkort ikke kan bruges til denne type transaktion (e-handel, MOTO eller tilbagevendende)."
163
+ '61': "Banken har afvist transaktionen."
164
+ '82': "Negative CVV / CVC resultater."
165
+ # incomplete translations
166
+ unknown: "Unknown reason."
167
+ '01': "Authorization Error."
168
+ '02': "Authorization Error."
169
+ '03': "Authorization Error."
170
+ '12': "No privileges to execute this transaction for your card."
171
+ '30': "Your bank has declined this transaction"
172
+ '58': "Your bank has declined this transaction as this credit card cannot be used for this type of transaction (eccommerce, MOTO or recurring)."
173
+ '59': "Your bank has declined this transaction"
174
+ '62': "Your card can be not supported due to restrictions placed on the card or Seller country exclusion (imposition an embargo), or bank blocked a card eg. due to unacceptable debit balance."
175
+ '65': "Activity count limit exceeded."
176
+ '75': "Invalid activity count limit exceeded."
177
+ '78': "Inactive card."
178
+ '91': "Temporary issuer error."
179
+ '92': "Temporary issuer error."
180
+ '94': "Temporary issuer error."
181
+ '96': "Temporary issuer error."
182
+ '98': "Temporary issuer error."
183
+ 'E3': "Transaction not executed due to a 3D-Secure error."
184
+ 'E4': "Transaction not executed due to a negative 3D-Secure confirmation from your bank."
185
+ 'E5': "Temporary 3D-Secure error."
186
+ 'R0': "Refused by Issuer because Customer requested stop of specific recurring payments."
187
+ 'R1': "Refused by Issuer because Customer requested stop of all recurring payments."
77
188
  targeted:
78
189
  merchant:
79
190
  <<: *issuer_response_code