hps 2.3.2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -4
  3. data/Gemfile.lock +59 -0
  4. data/LICENSE.md +264 -264
  5. data/PRIVACY.txt +65 -65
  6. data/README.md +213 -213
  7. data/Rakefile +15 -15
  8. data/examples/sinatra-verify-only/Gemfile +4 -4
  9. data/examples/sinatra-verify-only/app.rb +32 -32
  10. data/examples/sinatra-verify-only/views/index.erb +478 -478
  11. data/examples/sinatra-verify-only/views/result.erb +39 -39
  12. data/hps.gemspec +28 -27
  13. data/lib/hps/configuration.rb +17 -17
  14. data/lib/hps/entities/hps_account_verify.rb +8 -8
  15. data/lib/hps/entities/hps_address.rb +6 -6
  16. data/lib/hps/entities/hps_authorization.rb +12 -12
  17. data/lib/hps/entities/hps_batch.rb +6 -6
  18. data/lib/hps/entities/hps_cardholder.rb +6 -6
  19. data/lib/hps/entities/hps_charge.rb +8 -8
  20. data/lib/hps/entities/hps_charge_exceptions.rb +6 -6
  21. data/lib/hps/entities/hps_check.rb +18 -18
  22. data/lib/hps/entities/hps_check_holder.rb +10 -10
  23. data/lib/hps/entities/hps_check_response.rb +45 -45
  24. data/lib/hps/entities/hps_check_response_details.rb +9 -9
  25. data/lib/hps/entities/hps_credit_card.rb +34 -34
  26. data/lib/hps/entities/hps_direct_market_data.rb +5 -5
  27. data/lib/hps/entities/hps_encryption_data.rb +6 -6
  28. data/lib/hps/entities/hps_gift_card.rb +133 -133
  29. data/lib/hps/entities/hps_manage_tokens.rb +8 -8
  30. data/lib/hps/entities/hps_refund.rb +8 -8
  31. data/lib/hps/entities/hps_report_transaction_details.rb +10 -10
  32. data/lib/hps/entities/hps_report_transaction_summary.rb +6 -6
  33. data/lib/hps/entities/hps_reversal.rb +10 -10
  34. data/lib/hps/entities/hps_token_data.rb +10 -10
  35. data/lib/hps/entities/hps_track_data.rb +5 -5
  36. data/lib/hps/entities/hps_transaction.rb +161 -161
  37. data/lib/hps/entities/hps_transaction_details.rb +6 -6
  38. data/lib/hps/entities/hps_transaction_header.rb +8 -8
  39. data/lib/hps/entities/hps_transaction_type.rb +16 -16
  40. data/lib/hps/entities/hps_void.rb +8 -8
  41. data/lib/hps/infrastructure/api_connection_exception.rb +11 -11
  42. data/lib/hps/infrastructure/authentication_exception.rb +11 -11
  43. data/lib/hps/infrastructure/card_exception.rb +15 -15
  44. data/lib/hps/infrastructure/exceptions.json +547 -547
  45. data/lib/hps/infrastructure/hps_account_type.rb +11 -11
  46. data/lib/hps/infrastructure/hps_check_exception.rb +13 -13
  47. data/lib/hps/infrastructure/hps_check_type.rb +11 -11
  48. data/lib/hps/infrastructure/hps_data_entry_mode.rb +11 -11
  49. data/lib/hps/infrastructure/hps_exception.rb +25 -25
  50. data/lib/hps/infrastructure/hps_exception_mapper.rb +145 -145
  51. data/lib/hps/infrastructure/hps_gateway_response_validation.rb +20 -20
  52. data/lib/hps/infrastructure/hps_input_validation.rb +13 -13
  53. data/lib/hps/infrastructure/hps_sdk_codes.rb +48 -48
  54. data/lib/hps/infrastructure/hps_sec_code.rb +27 -27
  55. data/lib/hps/infrastructure/hps_track_data_method.rb +6 -6
  56. data/lib/hps/infrastructure/invalid_request_exception.rb +15 -15
  57. data/lib/hps/services/hps_batch_service.rb +29 -29
  58. data/lib/hps/services/hps_charge_service.rb +773 -773
  59. data/lib/hps/services/hps_check_service.rb +110 -110
  60. data/lib/hps/services/hps_gift_card_service.rb +301 -301
  61. data/lib/hps/services/hps_service.rb +141 -136
  62. data/lib/hps/version.rb +3 -3
  63. data/lib/hps.rb +63 -63
  64. data/tests/amex_tests.rb +292 -292
  65. data/tests/cert_tests.rb +80 -80
  66. data/tests/certification/card_present_spec.rb +320 -320
  67. data/tests/certification/gift_card_certification_test.rb +106 -106
  68. data/tests/certification/gift_card_certification_tests.rb +107 -107
  69. data/tests/check_tests.rb +50 -50
  70. data/tests/discover_tests.rb +386 -386
  71. data/tests/exception_mapper_tests.rb +311 -311
  72. data/tests/general_tests.rb +140 -140
  73. data/tests/giftcard_tests.rb +212 -212
  74. data/tests/hps_token_service.rb +56 -56
  75. data/tests/mastercard_tests.rb +387 -387
  76. data/tests/secret_key.rb +11 -11
  77. data/tests/test_check.rb +77 -77
  78. data/tests/test_data.rb +138 -138
  79. data/tests/test_helper.rb +179 -179
  80. data/tests/token_tests.rb +512 -512
  81. data/tests/visa_tests.rb +445 -445
  82. metadata +31 -11
@@ -1,548 +1,548 @@
1
- {
2
- "version": "1.0.1",
3
-
4
- "exception_mappings":[
5
- {
6
- "object":"exception_mapping",
7
- "category":"gift",
8
- "exception_codes":[
9
- "3",
10
- "8"
11
- ],
12
- "mapping_type":"CardException",
13
- "mapping_code":"invalid_card_data",
14
- "mapping_message":"Exception_Message_InvalidCardData"
15
- },
16
- {
17
- "object":"exception_mapping",
18
- "category":"gift",
19
- "exception_codes":[
20
- "4"
21
- ],
22
- "mapping_type":"CardException",
23
- "mapping_code":"expired_card",
24
- "mapping_message":"Exception_Message_CardExpired"
25
- },
26
- {
27
- "object":"exception_mapping",
28
- "category":"gift",
29
- "exception_codes":[
30
- "5",
31
- "12"
32
- ],
33
- "mapping_type":"CardException",
34
- "mapping_code":"card_declined",
35
- "mapping_message":"Exception_Message_CardDeclined"
36
- },
37
- {
38
- "object":"exception_mapping",
39
- "category":"gift",
40
- "exception_codes":[
41
- "6",
42
- "7",
43
- "10"
44
- ],
45
- "mapping_type":"CardException",
46
- "mapping_code":"processing_error",
47
- "mapping_message":"Exception_Message_ProcessingError"
48
- },
49
- {
50
- "object":"exception_mapping",
51
- "category":"gift",
52
- "exception_codes":[
53
- "9"
54
- ],
55
- "mapping_type":"CardException",
56
- "mapping_code":"invalid_amount",
57
- "mapping_message":"Exception_Message_ChargeAmount"
58
- },
59
- {
60
- "object":"exception_mapping",
61
- "category":"gift",
62
- "exception_codes":[
63
- "13"
64
- ],
65
- "mapping_type":"CardException",
66
- "mapping_code":"partial_approval",
67
- "mapping_message":"Exception_Message_PartialApproval"
68
- },
69
- {
70
- "object":"exception_mapping",
71
- "category":"gift",
72
- "exception_codes":[
73
- "14"
74
- ],
75
- "mapping_type":"CardException",
76
- "mapping_code":"invalid_pin",
77
- "mapping_message":"Exception_Message_InvalidPin"
78
- },
79
- {
80
- "object":"exception_mapping",
81
- "category":"issuer",
82
- "exception_codes":[
83
- "02",
84
- "03",
85
- "04",
86
- "05",
87
- "41",
88
- "43",
89
- "44",
90
- "51",
91
- "56",
92
- "61",
93
- "62",
94
- "63",
95
- "65",
96
- "78"
97
- ],
98
- "mapping_type":"CardException",
99
- "mapping_code":"card_declined",
100
- "mapping_message":"Exception_Message_CardDeclined"
101
- },
102
- {
103
- "object":"exception_mapping",
104
- "category":"issuer",
105
- "exception_codes":[
106
- "06",
107
- "07",
108
- "12",
109
- "15",
110
- "19",
111
- "12",
112
- "52",
113
- "53",
114
- "57",
115
- "58",
116
- "76",
117
- "77",
118
- "91",
119
- "96",
120
- "EC"
121
- ],
122
- "mapping_type":"CardException",
123
- "mapping_code":"processing_error",
124
- "mapping_message":"Exception_Message_ProcessingError"
125
- },
126
- {
127
- "object":"exception_mapping",
128
- "category":"issuer",
129
- "exception_codes":[
130
- "13"
131
- ],
132
- "mapping_type":"CardException",
133
- "mapping_code":"invalid_amount",
134
- "mapping_message":"Exception_Message_ChargeAmount"
135
- },
136
- {
137
- "object":"exception_mapping",
138
- "category":"issuer",
139
- "exception_codes":[
140
- "14"
141
- ],
142
- "mapping_type":"CardException",
143
- "mapping_code":"incorrect_number",
144
- "mapping_message":"Exception_Message_IncorrectNumber"
145
- },
146
- {
147
- "object":"exception_mapping",
148
- "category":"issuer",
149
- "exception_codes":[
150
- "54"
151
- ],
152
- "mapping_type":"CardException",
153
- "mapping_code":"expired_card",
154
- "mapping_message":"Exception_Message_CardExpired"
155
- },
156
- {
157
- "object":"exception_mapping",
158
- "category":"issuer",
159
- "exception_codes":[
160
- "55"
161
- ],
162
- "mapping_type":"CardException",
163
- "mapping_code":"invalid_pin",
164
- "mapping_message":"Exception_Message_InvalidPin"
165
- },
166
- {
167
- "object":"exception_mapping",
168
- "category":"issuer",
169
- "exception_codes":[
170
- "75"
171
- ],
172
- "mapping_type":"CardException",
173
- "mapping_code":"pin_retries_exceeded",
174
- "mapping_message":"Exception_Message_PinExceeded"
175
- },
176
- {
177
- "object":"exception_mapping",
178
- "category":"issuer",
179
- "exception_codes":[
180
- "80"
181
- ],
182
- "mapping_type":"CardException",
183
- "mapping_code":"invalid_expiry",
184
- "mapping_message":"Exception_Message_InvalidExpiry"
185
- },
186
- {
187
- "object":"exception_mapping",
188
- "category":"issuer",
189
- "exception_codes":[
190
- "80"
191
- ],
192
- "mapping_type":"CardException",
193
- "mapping_code":"invalid_expiry",
194
- "mapping_message":"Exception_Message_InvalidExpiry"
195
- },
196
- {
197
- "object":"exception_mapping",
198
- "category":"issuer",
199
- "exception_codes":[
200
- "86"
201
- ],
202
- "mapping_type":"CardException",
203
- "mapping_code":"pin_verification",
204
- "mapping_message":"Exception_Message_PinVerification"
205
- },
206
- {
207
- "object":"exception_mapping",
208
- "category":"issuer",
209
- "exception_codes":[
210
- "EB",
211
- "N7"
212
- ],
213
- "mapping_type":"CardException",
214
- "mapping_code":"incorrect_cvc",
215
- "mapping_message":"Exception_Message_IncorrectCvc"
216
- },
217
- {
218
- "object":"exception_mapping",
219
- "category":"gateway",
220
- "exception_codes":[
221
- "-2"
222
- ],
223
- "mapping_type":"AuthenticationException",
224
- "mapping_message":"Exception_Message_AuthenticationError"
225
- },
226
- {
227
- "object":"exception_mapping",
228
- "category":"gateway",
229
- "exception_codes":[
230
- "1"
231
- ],
232
- "mapping_type":"HpsException"
233
- },
234
- {
235
- "object":"exception_mapping",
236
- "category":"gateway",
237
- "exception_codes":[
238
- "3"
239
- ],
240
- "mapping_type":"HpsException",
241
- "mapping_code":"invalid_original_transaction"
242
- },
243
- {
244
- "object":"exception_mapping",
245
- "category":"gateway",
246
- "exception_codes":[
247
- "5"
248
- ],
249
- "mapping_type":"HpsException",
250
- "mapping_code":"no_open_batch"
251
- },
252
- {
253
- "object":"exception_mapping",
254
- "category":"gateway",
255
- "param":"card",
256
- "exception_codes":[
257
- "12"
258
- ],
259
- "mapping_type":"InvalidRequestException",
260
- "mapping_code":"invalid_cpc_data",
261
- "mapping_message":"Exception_Message_InvalidCpcData"
262
- },
263
- {
264
- "object":"exception_mapping",
265
- "category":"gateway",
266
- "param":"card",
267
- "exception_codes":[
268
- "13"
269
- ],
270
- "mapping_type":"InvalidRequestException",
271
- "mapping_code":"invalid_card_data",
272
- "mapping_message":"Exception_Message_InvalidCardData"
273
- },
274
- {
275
- "object":"exception_mapping",
276
- "category":"gateway",
277
- "exception_codes":[
278
- "14"
279
- ],
280
- "mapping_type":"CardException",
281
- "mapping_code":"invalid_number",
282
- "mapping_message":"Exception_Message_InvalidNumber"
283
- },
284
- {
285
- "object":"exception_mapping",
286
- "category":"gateway",
287
- "exception_codes":[
288
- "30"
289
- ],
290
- "mapping_type":"HpsException",
291
- "mapping_message":"Exception_Message_GatewayTimedOut"
292
- },
293
- {
294
- "object":"exception_mapping",
295
- "category":"sdk",
296
- "param":"gatewayTransactionId",
297
- "exception_codes":[
298
- "0"
299
- ],
300
- "mapping_type":"InvalidRequestException",
301
- "mapping_code":"invalid_transaction_id",
302
- "mapping_message":"Exception_Message_TransactionIdLessThanEqualZero"
303
- },
304
- {
305
- "object":"exception_mapping",
306
- "category":"sdk",
307
- "param":"HpsServiceUri",
308
- "exception_codes":[
309
- "1"
310
- ],
311
- "mapping_type":"InvalidRequestException",
312
- "mapping_code":"sdk_exception",
313
- "mapping_message":"Exception_Message_InvalidGatewayUrl"
314
- },
315
- {
316
- "object":"exception_mapping",
317
- "category":"sdk",
318
- "exception_codes":[
319
- "2"
320
- ],
321
- "mapping_type":"ApiConnectionException",
322
- "mapping_code":"sdk_exception",
323
- "mapping_message":"Exception_Message_UnableToProcessTransaction"
324
- },
325
- {
326
- "object":"exception_mapping",
327
- "category":"sdk",
328
- "param":"start",
329
- "exception_codes":[
330
- "3"
331
- ],
332
- "mapping_type":"InvalidRequestException",
333
- "mapping_code":"invalid_date",
334
- "mapping_message":"Exception_Message_FutureDate"
335
- },
336
- {
337
- "object":"exception_mapping",
338
- "category":"sdk",
339
- "param":"end",
340
- "exception_codes":[
341
- "4"
342
- ],
343
- "mapping_type":"InvalidRequestException",
344
- "mapping_code":"invalid_date",
345
- "mapping_message":"Exception_Message_FutureDate"
346
- },
347
- {
348
- "object":"exception_mapping",
349
- "category":"sdk",
350
- "param":"currency",
351
- "exception_codes":[
352
- "5"
353
- ],
354
- "mapping_type":"InvalidRequestException",
355
- "mapping_code":"missing_currency",
356
- "mapping_message":"Exception_Message_ArgumentNull"
357
- },
358
- {
359
- "object":"exception_mapping",
360
- "category":"sdk",
361
- "param":"currency",
362
- "exception_codes":[
363
- "6"
364
- ],
365
- "mapping_type":"InvalidRequestException",
366
- "mapping_code":"invalid_currency",
367
- "mapping_message":"Exception_Message_InvalidCurrency"
368
- },
369
- {
370
- "object":"exception_mapping",
371
- "category":"sdk",
372
- "param":"amount",
373
- "exception_codes":[
374
- "7"
375
- ],
376
- "mapping_type":"InvalidRequestException",
377
- "mapping_code":"invalid_amount",
378
- "mapping_message":"Exception_Message_ChargeAmount"
379
- },
380
- {
381
- "object":"exception_mapping",
382
- "category":"sdk",
383
- "exception_codes":[
384
- "8"
385
- ],
386
- "mapping_type":"HpsException",
387
- "mapping_code":"gateway_timeout",
388
- "mapping_message":"Exception_Message_UnableToReverseTransactionAfterGatewayTimeout"
389
- },
390
- {
391
- "object":"exception_mapping",
392
- "category":"sdk",
393
- "exception_codes":[
394
- "9"
395
- ],
396
- "mapping_type":"HpsException",
397
- "mapping_code":"issuer_timeout",
398
- "mapping_message":"Exception_Message_UnableToReverseTransactionAfterIssuerTimeout"
399
- },
400
- {
401
- "object":"exception_mapping",
402
- "category":"sdk",
403
- "exception_codes":[
404
- "10"
405
- ],
406
- "mapping_type":"CardException",
407
- "mapping_code":"processing_error",
408
- "mapping_message":"Exception_Message_ProcessingError"
409
- },
410
- {
411
- "object":"exception_message",
412
- "code":"Exception_Message_PartialApproval",
413
- "message":"The amount was partially approved."
414
- }
415
- ],
416
- "exception_messages":[
417
- {
418
- "object":"exception_message",
419
- "code":"Exception_Message_ArgumentNull",
420
- "message":"Argument can't be null."
421
- },
422
- {
423
- "object":"exception_message",
424
- "code":"Exception_Message_AuthenticationError",
425
- "message":"Authentication error. Please double check your service configuration."
426
- },
427
- {
428
- "object":"exception_message",
429
- "code":"Exception_Message_CardDeclined",
430
- "message":"The card was declined."
431
- },
432
- {
433
- "object":"exception_message",
434
- "code":"Exception_Message_CardExpired",
435
- "message":"The card has expired."
436
- },
437
- {
438
- "object":"exception_message",
439
- "code":"Exception_Message_ChargeAmount",
440
- "message":"Must be greater than or equal 0."
441
- },
442
- {
443
- "object":"exception_message",
444
- "code":"Exception_Message_FutureDate",
445
- "message":"Date can not be in the future."
446
- },
447
- {
448
- "object":"exception_message",
449
- "code":"Exception_Message_IncorrectCvc",
450
- "message":"The card's security code is incorrect."
451
- },
452
- {
453
- "object":"exception_message",
454
- "code":"Exception_Message_IncorrectNumber",
455
- "message":"The card number is incorrect."
456
- },
457
- {
458
- "object":"exception_message",
459
- "code":"Exception_Message_InvalidConfig",
460
- "message":"The HPS SDK has not been properly configured. Please make sure to initialize the config either in a service constructor or in your App.config or Web.config file."
461
- },
462
- {
463
- "object":"exception_message",
464
- "code":"Exception_Message_InvalidCurrency",
465
- "message":"The only supported currency is \"usd\""
466
- },
467
- {
468
- "object":"exception_message",
469
- "code":"Exception_Message_InvalidExpiry",
470
- "message":"Card expiration date is invalid."
471
- },
472
- {
473
- "object":"exception_message",
474
- "code":"Exception_Message_InvalidNumber",
475
- "message":"The card number is not a valid credit card number."
476
- },
477
- {
478
- "object":"exception_message",
479
- "code":"Exception_Message_InvalidPin",
480
- "message":"The 4-digit pin is invalid."
481
- },
482
- {
483
- "object":"exception_message",
484
- "code":"Exception_Message_PinExceeded",
485
- "message":"Maximum number of pin retries exceeded."
486
- },
487
- {
488
- "object":"exception_message",
489
- "code":"Exception_Message_PinVerification",
490
- "message":"Can't verify card pin number."
491
- },
492
- {
493
- "object":"exception_message",
494
- "code":"Exception_Message_ProcessingError",
495
- "message":"An error occurred while processing the card."
496
- },
497
- {
498
- "object":"exception_message",
499
- "code":"Exception_Message_TransactionIdLessThanEqualZero",
500
- "message":"Transaction ID must be greater than zero."
501
- },
502
- {
503
- "object":"exception_message",
504
- "code":"Exception_Message_UnexpectedResponseCode",
505
- "message":"Unsuccessful response code ({0}) received from HPS Gateway."
506
- },
507
- {
508
- "object":"exception_message",
509
- "code":"Exception_Message_UnexpectedResponseType",
510
- "message":"Received unexpected response from POS Gateway. (Request and response transaction types don't match)."
511
- },
512
- {
513
- "object":"exception_message",
514
- "code":"Exception_Message_InvalidCpcData",
515
- "message":"Invalid CPC data."
516
- },
517
- {
518
- "object":"exception_message",
519
- "code":"Exception_Message_InvalidCardData",
520
- "message":"Invalid card data."
521
- },
522
- {
523
- "object":"exception_message",
524
- "code":"Exception_Message_GatewayTimedOut",
525
- "message":"Gateway timed out."
526
- },
527
- {
528
- "object":"exception_message",
529
- "code":"Exception_Message_InvalidGatewayUrl",
530
- "message":"Invalid HpsServiceUri."
531
- },
532
- {
533
- "object":"exception_message",
534
- "code":"Exception_Message_UnableToProcessTransaction",
535
- "message":"Unable to process the payment transaction."
536
- },
537
- {
538
- "object":"exception_message",
539
- "code":"Exception_Message_UnableToReverseTransactionAfterGatewayTimeout",
540
- "message":"Error occurred while reversing a charge due to HPS gateway time-out."
541
- },
542
- {
543
- "object":"exception_message",
544
- "code":"Exception_Message_UnableToReverseTransactionAfterIssuerTimeout",
545
- "message":"Error occurred while reversing a charge due to issuer time-out."
546
- }
547
- ]
1
+ {
2
+ "version": "1.0.1",
3
+
4
+ "exception_mappings":[
5
+ {
6
+ "object":"exception_mapping",
7
+ "category":"gift",
8
+ "exception_codes":[
9
+ "3",
10
+ "8"
11
+ ],
12
+ "mapping_type":"CardException",
13
+ "mapping_code":"invalid_card_data",
14
+ "mapping_message":"Exception_Message_InvalidCardData"
15
+ },
16
+ {
17
+ "object":"exception_mapping",
18
+ "category":"gift",
19
+ "exception_codes":[
20
+ "4"
21
+ ],
22
+ "mapping_type":"CardException",
23
+ "mapping_code":"expired_card",
24
+ "mapping_message":"Exception_Message_CardExpired"
25
+ },
26
+ {
27
+ "object":"exception_mapping",
28
+ "category":"gift",
29
+ "exception_codes":[
30
+ "5",
31
+ "12"
32
+ ],
33
+ "mapping_type":"CardException",
34
+ "mapping_code":"card_declined",
35
+ "mapping_message":"Exception_Message_CardDeclined"
36
+ },
37
+ {
38
+ "object":"exception_mapping",
39
+ "category":"gift",
40
+ "exception_codes":[
41
+ "6",
42
+ "7",
43
+ "10"
44
+ ],
45
+ "mapping_type":"CardException",
46
+ "mapping_code":"processing_error",
47
+ "mapping_message":"Exception_Message_ProcessingError"
48
+ },
49
+ {
50
+ "object":"exception_mapping",
51
+ "category":"gift",
52
+ "exception_codes":[
53
+ "9"
54
+ ],
55
+ "mapping_type":"CardException",
56
+ "mapping_code":"invalid_amount",
57
+ "mapping_message":"Exception_Message_ChargeAmount"
58
+ },
59
+ {
60
+ "object":"exception_mapping",
61
+ "category":"gift",
62
+ "exception_codes":[
63
+ "13"
64
+ ],
65
+ "mapping_type":"CardException",
66
+ "mapping_code":"partial_approval",
67
+ "mapping_message":"Exception_Message_PartialApproval"
68
+ },
69
+ {
70
+ "object":"exception_mapping",
71
+ "category":"gift",
72
+ "exception_codes":[
73
+ "14"
74
+ ],
75
+ "mapping_type":"CardException",
76
+ "mapping_code":"invalid_pin",
77
+ "mapping_message":"Exception_Message_InvalidPin"
78
+ },
79
+ {
80
+ "object":"exception_mapping",
81
+ "category":"issuer",
82
+ "exception_codes":[
83
+ "02",
84
+ "03",
85
+ "04",
86
+ "05",
87
+ "41",
88
+ "43",
89
+ "44",
90
+ "51",
91
+ "56",
92
+ "61",
93
+ "62",
94
+ "63",
95
+ "65",
96
+ "78"
97
+ ],
98
+ "mapping_type":"CardException",
99
+ "mapping_code":"card_declined",
100
+ "mapping_message":"Exception_Message_CardDeclined"
101
+ },
102
+ {
103
+ "object":"exception_mapping",
104
+ "category":"issuer",
105
+ "exception_codes":[
106
+ "06",
107
+ "07",
108
+ "12",
109
+ "15",
110
+ "19",
111
+ "12",
112
+ "52",
113
+ "53",
114
+ "57",
115
+ "58",
116
+ "76",
117
+ "77",
118
+ "91",
119
+ "96",
120
+ "EC"
121
+ ],
122
+ "mapping_type":"CardException",
123
+ "mapping_code":"processing_error",
124
+ "mapping_message":"Exception_Message_ProcessingError"
125
+ },
126
+ {
127
+ "object":"exception_mapping",
128
+ "category":"issuer",
129
+ "exception_codes":[
130
+ "13"
131
+ ],
132
+ "mapping_type":"CardException",
133
+ "mapping_code":"invalid_amount",
134
+ "mapping_message":"Exception_Message_ChargeAmount"
135
+ },
136
+ {
137
+ "object":"exception_mapping",
138
+ "category":"issuer",
139
+ "exception_codes":[
140
+ "14"
141
+ ],
142
+ "mapping_type":"CardException",
143
+ "mapping_code":"incorrect_number",
144
+ "mapping_message":"Exception_Message_IncorrectNumber"
145
+ },
146
+ {
147
+ "object":"exception_mapping",
148
+ "category":"issuer",
149
+ "exception_codes":[
150
+ "54"
151
+ ],
152
+ "mapping_type":"CardException",
153
+ "mapping_code":"expired_card",
154
+ "mapping_message":"Exception_Message_CardExpired"
155
+ },
156
+ {
157
+ "object":"exception_mapping",
158
+ "category":"issuer",
159
+ "exception_codes":[
160
+ "55"
161
+ ],
162
+ "mapping_type":"CardException",
163
+ "mapping_code":"invalid_pin",
164
+ "mapping_message":"Exception_Message_InvalidPin"
165
+ },
166
+ {
167
+ "object":"exception_mapping",
168
+ "category":"issuer",
169
+ "exception_codes":[
170
+ "75"
171
+ ],
172
+ "mapping_type":"CardException",
173
+ "mapping_code":"pin_retries_exceeded",
174
+ "mapping_message":"Exception_Message_PinExceeded"
175
+ },
176
+ {
177
+ "object":"exception_mapping",
178
+ "category":"issuer",
179
+ "exception_codes":[
180
+ "80"
181
+ ],
182
+ "mapping_type":"CardException",
183
+ "mapping_code":"invalid_expiry",
184
+ "mapping_message":"Exception_Message_InvalidExpiry"
185
+ },
186
+ {
187
+ "object":"exception_mapping",
188
+ "category":"issuer",
189
+ "exception_codes":[
190
+ "80"
191
+ ],
192
+ "mapping_type":"CardException",
193
+ "mapping_code":"invalid_expiry",
194
+ "mapping_message":"Exception_Message_InvalidExpiry"
195
+ },
196
+ {
197
+ "object":"exception_mapping",
198
+ "category":"issuer",
199
+ "exception_codes":[
200
+ "86"
201
+ ],
202
+ "mapping_type":"CardException",
203
+ "mapping_code":"pin_verification",
204
+ "mapping_message":"Exception_Message_PinVerification"
205
+ },
206
+ {
207
+ "object":"exception_mapping",
208
+ "category":"issuer",
209
+ "exception_codes":[
210
+ "EB",
211
+ "N7"
212
+ ],
213
+ "mapping_type":"CardException",
214
+ "mapping_code":"incorrect_cvc",
215
+ "mapping_message":"Exception_Message_IncorrectCvc"
216
+ },
217
+ {
218
+ "object":"exception_mapping",
219
+ "category":"gateway",
220
+ "exception_codes":[
221
+ "-2"
222
+ ],
223
+ "mapping_type":"AuthenticationException",
224
+ "mapping_message":"Exception_Message_AuthenticationError"
225
+ },
226
+ {
227
+ "object":"exception_mapping",
228
+ "category":"gateway",
229
+ "exception_codes":[
230
+ "1"
231
+ ],
232
+ "mapping_type":"HpsException"
233
+ },
234
+ {
235
+ "object":"exception_mapping",
236
+ "category":"gateway",
237
+ "exception_codes":[
238
+ "3"
239
+ ],
240
+ "mapping_type":"HpsException",
241
+ "mapping_code":"invalid_original_transaction"
242
+ },
243
+ {
244
+ "object":"exception_mapping",
245
+ "category":"gateway",
246
+ "exception_codes":[
247
+ "5"
248
+ ],
249
+ "mapping_type":"HpsException",
250
+ "mapping_code":"no_open_batch"
251
+ },
252
+ {
253
+ "object":"exception_mapping",
254
+ "category":"gateway",
255
+ "param":"card",
256
+ "exception_codes":[
257
+ "12"
258
+ ],
259
+ "mapping_type":"InvalidRequestException",
260
+ "mapping_code":"invalid_cpc_data",
261
+ "mapping_message":"Exception_Message_InvalidCpcData"
262
+ },
263
+ {
264
+ "object":"exception_mapping",
265
+ "category":"gateway",
266
+ "param":"card",
267
+ "exception_codes":[
268
+ "13"
269
+ ],
270
+ "mapping_type":"InvalidRequestException",
271
+ "mapping_code":"invalid_card_data",
272
+ "mapping_message":"Exception_Message_InvalidCardData"
273
+ },
274
+ {
275
+ "object":"exception_mapping",
276
+ "category":"gateway",
277
+ "exception_codes":[
278
+ "14"
279
+ ],
280
+ "mapping_type":"CardException",
281
+ "mapping_code":"invalid_number",
282
+ "mapping_message":"Exception_Message_InvalidNumber"
283
+ },
284
+ {
285
+ "object":"exception_mapping",
286
+ "category":"gateway",
287
+ "exception_codes":[
288
+ "30"
289
+ ],
290
+ "mapping_type":"HpsException",
291
+ "mapping_message":"Exception_Message_GatewayTimedOut"
292
+ },
293
+ {
294
+ "object":"exception_mapping",
295
+ "category":"sdk",
296
+ "param":"gatewayTransactionId",
297
+ "exception_codes":[
298
+ "0"
299
+ ],
300
+ "mapping_type":"InvalidRequestException",
301
+ "mapping_code":"invalid_transaction_id",
302
+ "mapping_message":"Exception_Message_TransactionIdLessThanEqualZero"
303
+ },
304
+ {
305
+ "object":"exception_mapping",
306
+ "category":"sdk",
307
+ "param":"HpsServiceUri",
308
+ "exception_codes":[
309
+ "1"
310
+ ],
311
+ "mapping_type":"InvalidRequestException",
312
+ "mapping_code":"sdk_exception",
313
+ "mapping_message":"Exception_Message_InvalidGatewayUrl"
314
+ },
315
+ {
316
+ "object":"exception_mapping",
317
+ "category":"sdk",
318
+ "exception_codes":[
319
+ "2"
320
+ ],
321
+ "mapping_type":"ApiConnectionException",
322
+ "mapping_code":"sdk_exception",
323
+ "mapping_message":"Exception_Message_UnableToProcessTransaction"
324
+ },
325
+ {
326
+ "object":"exception_mapping",
327
+ "category":"sdk",
328
+ "param":"start",
329
+ "exception_codes":[
330
+ "3"
331
+ ],
332
+ "mapping_type":"InvalidRequestException",
333
+ "mapping_code":"invalid_date",
334
+ "mapping_message":"Exception_Message_FutureDate"
335
+ },
336
+ {
337
+ "object":"exception_mapping",
338
+ "category":"sdk",
339
+ "param":"end",
340
+ "exception_codes":[
341
+ "4"
342
+ ],
343
+ "mapping_type":"InvalidRequestException",
344
+ "mapping_code":"invalid_date",
345
+ "mapping_message":"Exception_Message_FutureDate"
346
+ },
347
+ {
348
+ "object":"exception_mapping",
349
+ "category":"sdk",
350
+ "param":"currency",
351
+ "exception_codes":[
352
+ "5"
353
+ ],
354
+ "mapping_type":"InvalidRequestException",
355
+ "mapping_code":"missing_currency",
356
+ "mapping_message":"Exception_Message_ArgumentNull"
357
+ },
358
+ {
359
+ "object":"exception_mapping",
360
+ "category":"sdk",
361
+ "param":"currency",
362
+ "exception_codes":[
363
+ "6"
364
+ ],
365
+ "mapping_type":"InvalidRequestException",
366
+ "mapping_code":"invalid_currency",
367
+ "mapping_message":"Exception_Message_InvalidCurrency"
368
+ },
369
+ {
370
+ "object":"exception_mapping",
371
+ "category":"sdk",
372
+ "param":"amount",
373
+ "exception_codes":[
374
+ "7"
375
+ ],
376
+ "mapping_type":"InvalidRequestException",
377
+ "mapping_code":"invalid_amount",
378
+ "mapping_message":"Exception_Message_ChargeAmount"
379
+ },
380
+ {
381
+ "object":"exception_mapping",
382
+ "category":"sdk",
383
+ "exception_codes":[
384
+ "8"
385
+ ],
386
+ "mapping_type":"HpsException",
387
+ "mapping_code":"gateway_timeout",
388
+ "mapping_message":"Exception_Message_UnableToReverseTransactionAfterGatewayTimeout"
389
+ },
390
+ {
391
+ "object":"exception_mapping",
392
+ "category":"sdk",
393
+ "exception_codes":[
394
+ "9"
395
+ ],
396
+ "mapping_type":"HpsException",
397
+ "mapping_code":"issuer_timeout",
398
+ "mapping_message":"Exception_Message_UnableToReverseTransactionAfterIssuerTimeout"
399
+ },
400
+ {
401
+ "object":"exception_mapping",
402
+ "category":"sdk",
403
+ "exception_codes":[
404
+ "10"
405
+ ],
406
+ "mapping_type":"CardException",
407
+ "mapping_code":"processing_error",
408
+ "mapping_message":"Exception_Message_ProcessingError"
409
+ },
410
+ {
411
+ "object":"exception_message",
412
+ "code":"Exception_Message_PartialApproval",
413
+ "message":"The amount was partially approved."
414
+ }
415
+ ],
416
+ "exception_messages":[
417
+ {
418
+ "object":"exception_message",
419
+ "code":"Exception_Message_ArgumentNull",
420
+ "message":"Argument can't be null."
421
+ },
422
+ {
423
+ "object":"exception_message",
424
+ "code":"Exception_Message_AuthenticationError",
425
+ "message":"Authentication error. Please double check your service configuration."
426
+ },
427
+ {
428
+ "object":"exception_message",
429
+ "code":"Exception_Message_CardDeclined",
430
+ "message":"The card was declined."
431
+ },
432
+ {
433
+ "object":"exception_message",
434
+ "code":"Exception_Message_CardExpired",
435
+ "message":"The card has expired."
436
+ },
437
+ {
438
+ "object":"exception_message",
439
+ "code":"Exception_Message_ChargeAmount",
440
+ "message":"Must be greater than or equal 0."
441
+ },
442
+ {
443
+ "object":"exception_message",
444
+ "code":"Exception_Message_FutureDate",
445
+ "message":"Date can not be in the future."
446
+ },
447
+ {
448
+ "object":"exception_message",
449
+ "code":"Exception_Message_IncorrectCvc",
450
+ "message":"The card's security code is incorrect."
451
+ },
452
+ {
453
+ "object":"exception_message",
454
+ "code":"Exception_Message_IncorrectNumber",
455
+ "message":"The card number is incorrect."
456
+ },
457
+ {
458
+ "object":"exception_message",
459
+ "code":"Exception_Message_InvalidConfig",
460
+ "message":"The HPS SDK has not been properly configured. Please make sure to initialize the config either in a service constructor or in your App.config or Web.config file."
461
+ },
462
+ {
463
+ "object":"exception_message",
464
+ "code":"Exception_Message_InvalidCurrency",
465
+ "message":"The only supported currency is \"usd\""
466
+ },
467
+ {
468
+ "object":"exception_message",
469
+ "code":"Exception_Message_InvalidExpiry",
470
+ "message":"Card expiration date is invalid."
471
+ },
472
+ {
473
+ "object":"exception_message",
474
+ "code":"Exception_Message_InvalidNumber",
475
+ "message":"The card number is not a valid credit card number."
476
+ },
477
+ {
478
+ "object":"exception_message",
479
+ "code":"Exception_Message_InvalidPin",
480
+ "message":"The 4-digit pin is invalid."
481
+ },
482
+ {
483
+ "object":"exception_message",
484
+ "code":"Exception_Message_PinExceeded",
485
+ "message":"Maximum number of pin retries exceeded."
486
+ },
487
+ {
488
+ "object":"exception_message",
489
+ "code":"Exception_Message_PinVerification",
490
+ "message":"Can't verify card pin number."
491
+ },
492
+ {
493
+ "object":"exception_message",
494
+ "code":"Exception_Message_ProcessingError",
495
+ "message":"An error occurred while processing the card."
496
+ },
497
+ {
498
+ "object":"exception_message",
499
+ "code":"Exception_Message_TransactionIdLessThanEqualZero",
500
+ "message":"Transaction ID must be greater than zero."
501
+ },
502
+ {
503
+ "object":"exception_message",
504
+ "code":"Exception_Message_UnexpectedResponseCode",
505
+ "message":"Unsuccessful response code ({0}) received from HPS Gateway."
506
+ },
507
+ {
508
+ "object":"exception_message",
509
+ "code":"Exception_Message_UnexpectedResponseType",
510
+ "message":"Received unexpected response from POS Gateway. (Request and response transaction types don't match)."
511
+ },
512
+ {
513
+ "object":"exception_message",
514
+ "code":"Exception_Message_InvalidCpcData",
515
+ "message":"Invalid CPC data."
516
+ },
517
+ {
518
+ "object":"exception_message",
519
+ "code":"Exception_Message_InvalidCardData",
520
+ "message":"Invalid card data."
521
+ },
522
+ {
523
+ "object":"exception_message",
524
+ "code":"Exception_Message_GatewayTimedOut",
525
+ "message":"Gateway timed out."
526
+ },
527
+ {
528
+ "object":"exception_message",
529
+ "code":"Exception_Message_InvalidGatewayUrl",
530
+ "message":"Invalid HpsServiceUri."
531
+ },
532
+ {
533
+ "object":"exception_message",
534
+ "code":"Exception_Message_UnableToProcessTransaction",
535
+ "message":"Unable to process the payment transaction."
536
+ },
537
+ {
538
+ "object":"exception_message",
539
+ "code":"Exception_Message_UnableToReverseTransactionAfterGatewayTimeout",
540
+ "message":"Error occurred while reversing a charge due to HPS gateway time-out."
541
+ },
542
+ {
543
+ "object":"exception_message",
544
+ "code":"Exception_Message_UnableToReverseTransactionAfterIssuerTimeout",
545
+ "message":"Error occurred while reversing a charge due to issuer time-out."
546
+ }
547
+ ]
548
548
  }