hps 1.0.2 → 2.1.2

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