hps 1.0.1

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 (53) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/Gemfile +8 -0
  4. data/LICENSE.txt +32 -0
  5. data/PRIVACY.txt +66 -0
  6. data/README.md +41 -0
  7. data/Rakefile +15 -0
  8. data/hps.gemspec +26 -0
  9. data/lib/hps.rb +45 -0
  10. data/lib/hps/configuration.rb +17 -0
  11. data/lib/hps/entities/hps_account_verify.rb +9 -0
  12. data/lib/hps/entities/hps_address.rb +7 -0
  13. data/lib/hps/entities/hps_authorization.rb +13 -0
  14. data/lib/hps/entities/hps_batch.rb +7 -0
  15. data/lib/hps/entities/hps_cardholder.rb +7 -0
  16. data/lib/hps/entities/hps_charge.rb +9 -0
  17. data/lib/hps/entities/hps_charge_exceptions.rb +7 -0
  18. data/lib/hps/entities/hps_credit_card.rb +33 -0
  19. data/lib/hps/entities/hps_refund.rb +9 -0
  20. data/lib/hps/entities/hps_report_transaction_details.rb +11 -0
  21. data/lib/hps/entities/hps_report_transaction_summary.rb +7 -0
  22. data/lib/hps/entities/hps_reversal.rb +11 -0
  23. data/lib/hps/entities/hps_token_data.rb +11 -0
  24. data/lib/hps/entities/hps_transaction.rb +161 -0
  25. data/lib/hps/entities/hps_transaction_details.rb +7 -0
  26. data/lib/hps/entities/hps_transaction_header.rb +9 -0
  27. data/lib/hps/entities/hps_transaction_type.rb +17 -0
  28. data/lib/hps/entities/hps_void.rb +9 -0
  29. data/lib/hps/infrastructure/api_connection_exception.rb +11 -0
  30. data/lib/hps/infrastructure/authentication_exception.rb +11 -0
  31. data/lib/hps/infrastructure/card_exception.rb +15 -0
  32. data/lib/hps/infrastructure/exceptions.json +469 -0
  33. data/lib/hps/infrastructure/hps_exception.rb +25 -0
  34. data/lib/hps/infrastructure/hps_exception_mapper.rb +135 -0
  35. data/lib/hps/infrastructure/hps_sdk_codes.rb +49 -0
  36. data/lib/hps/infrastructure/invalid_request_exception.rb +15 -0
  37. data/lib/hps/services/hps_batch_service.rb +30 -0
  38. data/lib/hps/services/hps_charge_service.rb +635 -0
  39. data/lib/hps/services/hps_service.rb +128 -0
  40. data/lib/hps/version.rb +3 -0
  41. data/tests/amex_tests.rb +231 -0
  42. data/tests/cert_tests.rb +81 -0
  43. data/tests/discover_tests.rb +325 -0
  44. data/tests/exception_mapper_tests.rb +245 -0
  45. data/tests/general_tests.rb +58 -0
  46. data/tests/hps_token_service.rb +56 -0
  47. data/tests/mastercard_tests.rb +326 -0
  48. data/tests/secret_key.rb +12 -0
  49. data/tests/test_data.rb +128 -0
  50. data/tests/test_helper.rb +92 -0
  51. data/tests/token_tests.rb +513 -0
  52. data/tests/visa_tests.rb +378 -0
  53. metadata +165 -0
@@ -0,0 +1,11 @@
1
+ module Hps
2
+ class HpsTokenData
3
+
4
+ attr_accessor :token_value, :response_code, :response_message
5
+
6
+ def initialize(response_message = nil)
7
+ @response_message = response_message
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,161 @@
1
+ module Hps
2
+
3
+ class HpsTransaction
4
+
5
+ attr_accessor :transaction_header, :transaction_id, :response_code, :response_text, :reference_number
6
+
7
+ def initialize(transaction_header=nil)
8
+ @transaction_header = transaction_header
9
+ end
10
+
11
+ end
12
+
13
+ def self.transaction_type_to_service_name(transaction_type)
14
+
15
+ case transaction_type
16
+
17
+ when Hps::HpsTransactionType::AUTHORIZE
18
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAuth
19
+
20
+ when Hps::HpsTransactionType::CAPTURE
21
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAddToBatch
22
+
23
+ when Hps::HpsTransactionType::CHARGE
24
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditSale
25
+
26
+ when Hps::HpsTransactionType::REFUND
27
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReturn
28
+
29
+ when Hps::HpsTransactionType::REVERSE
30
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReversal
31
+
32
+ when Hps::HpsTransactionType::VERIFY
33
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAccountVerify
34
+
35
+ when Hps::HpsTransactionType::LIST
36
+ Hps::ItemChoiceTypePosResponseVer10Transaction::ReportActivity
37
+
38
+ when Hps::HpsTransactionType::GET
39
+ Hps::ItemChoiceTypePosResponseVer10Transaction::ReportTxnDetail
40
+
41
+ when Hps::HpsTransactionType::VOID
42
+ Hps::ItemChoiceTypePosResponseVer10Transaction::CreditVoid
43
+
44
+ when Hps::HpsTransactionType::BATCH_CLOSE
45
+ Hps::ItemChoiceTypePosResponseVer10Transaction::BatchClose
46
+
47
+ when Hps::HpsTransactionType::SECURITY_ERROR
48
+ "SecurityError"
49
+ else
50
+ ""
51
+ end
52
+
53
+ end
54
+
55
+ def self.service_name_to_transaction_type(service_name)
56
+
57
+ if service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAuth
58
+ Hps::HpsTransactionType::AUTHORIZE
59
+
60
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAddToBatch
61
+ Hps::HpsTransactionType::CAPTURE
62
+
63
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditSale
64
+ Hps::HpsTransactionType::CHARGE
65
+
66
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReturn
67
+ Hps::HpsTransactionType::REFUND
68
+
69
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReversal
70
+ Hps::HpsTransactionType::REVERSE
71
+
72
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAccountVerify
73
+ Hps::HpsTransactionType::VERIFY
74
+
75
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::ReportActivity
76
+ Hps::HpsTransactionType::LIST
77
+
78
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::ReportTxnDetail
79
+ Hps::HpsTransactionType::GET
80
+
81
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditVoid
82
+ Hps::HpsTransactionType::Void
83
+
84
+ elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::BatchClose
85
+ Hps::HpsTransactionType::BATCH_CLOSE
86
+
87
+ elsif service_name == "SecurityError"
88
+ Hps::HpsTransactionType::SECURITY_ERROR
89
+ else
90
+ nil
91
+ end
92
+
93
+ end
94
+
95
+ module ItemChoiceTypePosResponseVer10Transaction
96
+
97
+ AddAttachment = "AddAttachment"
98
+ Authenticate = "Authenticate"
99
+ BatchClose = "BatchClose"
100
+ CancelImpersonation = "CancelImpersonation"
101
+ CheckSale = "CheckSale"
102
+ CheckVoid = "CheckVoid"
103
+ CreditAccountVerify = "CreditAccountVerify"
104
+ CreditAddToBatch = "CreditAddToBatch"
105
+ CreditAuth = "CreditAuth"
106
+ CreditCPCEdit = "CreditCPCEdit"
107
+ CreditIncrementalAuth = "CreditIncrementalAuth"
108
+ CreditOfflineAuth = "CreditOfflineAuth"
109
+ CreditOfflineSale = "CreditOfflineSale"
110
+ CreditReturn = "CreditReturn"
111
+ CreditReversal = "CreditReversal"
112
+ CreditSale = "CreditSale"
113
+ CreditTxnEdit = "CreditTxnEdit"
114
+ CreditVoid = "CreditVoid"
115
+ DebitAddValue = "DebitAddValue"
116
+ DebitReturn = "DebitReturn"
117
+ DebitReversal = "DebitReversal"
118
+ DebitSale = "DebitSale"
119
+ EBTBalanceInquiry = "EBTBalanceInquiry"
120
+ EBTCashBackPurchase = "EBTCashBackPurchase"
121
+ EBTCashBenefitWithdrawal = "EBTCashBenefitWithdrawal"
122
+ EBTFSPurchase = "EBTFSPurchase"
123
+ EBTFSReturn = "EBTFSReturn"
124
+ EBTVoucherPurchase = "EBTVoucherPurchase"
125
+ EndToEndTest = "EndToEndTest"
126
+ FindTransactions = "FindTransactions"
127
+ GetAttachments = "GetAttachments"
128
+ GetUserDeviceSettings = "GetUserDeviceSettings"
129
+ GetUserSettings = "GetUserSettings"
130
+ GiftCardActivate = "GiftCardActivate"
131
+ GiftCardAddValue = "GiftCardAddValue"
132
+ GiftCardBalance = "GiftCardBalance"
133
+ GiftCardCurrentDayTotals = "GiftCardCurrentDayTotals"
134
+ GiftCardDeactivate = "GiftCardDeactivate"
135
+ GiftCardPreviousDayTotals = "GiftCardPreviousDayTotals"
136
+ GiftCardReplace = "GiftCardReplace"
137
+ GiftCardReversal = "GiftCardReversal"
138
+ GiftCardSale = "GiftCardSale"
139
+ GiftCardVoid = "GiftCardVoid"
140
+ Impersonate = "Impersonate"
141
+ InvalidateAuthentication = "InvalidateAuthentication"
142
+ ManageSettings = "ManageSettings"
143
+ ManageUsers = "ManageUsers"
144
+ PrePaidAddValue = "PrePaidAddValue"
145
+ PrePaidBalanceInquiry = "PrePaidBalanceInquiry"
146
+ RecurringBilling = "RecurringBilling"
147
+ ReportActivity = "ReportActivity"
148
+ ReportBatchDetail = "ReportBatchDetail"
149
+ ReportBatchHistory = "ReportBatchHistory"
150
+ ReportBatchSummary = "ReportBatchSummary"
151
+ ReportOpenAuths = "ReportOpenAuths"
152
+ ReportSearch = "ReportSearch"
153
+ ReportTxnDetail = "ReportTxnDetail"
154
+ SendReceipt = "SendReceipt"
155
+ TestCredentials = "TestCredentials"
156
+
157
+ end
158
+
159
+
160
+ end
161
+
@@ -0,0 +1,7 @@
1
+ module Hps
2
+ class HpsTransactionDetails
3
+
4
+ attr_accessor :memo, :invoice_number, :customer_id
5
+
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ module Hps
2
+ class HpsTransactionHeader
3
+
4
+ attr_accessor :gateway_response_code, :gateway_response_message, :response_dt, :client_txn_id
5
+
6
+
7
+
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ module Hps
2
+ module HpsTransactionType
3
+
4
+ AUTHORIZE = 0
5
+ CAPTURE = 1
6
+ CHARGE = 2
7
+ REFUND = 3
8
+ REVERSE = 4
9
+ VERIFY = 5
10
+ LIST = 6
11
+ GET = 7
12
+ VOID = 8
13
+ SECURITY_ERROR = 9
14
+ BATCH_CLOSE = 10
15
+
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ module Hps
2
+ class HpsVoid < HpsTransaction
3
+
4
+ def initialize(header)
5
+ super(header)
6
+ end
7
+
8
+ end
9
+ end
@@ -0,0 +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
@@ -0,0 +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
@@ -0,0 +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
@@ -0,0 +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
+ ]
469
+ }