hps 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +8 -8
- data/LICENSE.txt +32 -32
- data/PRIVACY.txt +65 -65
- data/README.md +40 -40
- data/Rakefile +15 -15
- data/hps.gemspec +26 -26
- data/lib/hps/configuration.rb +16 -16
- data/lib/hps/entities/hps_account_verify.rb +8 -8
- data/lib/hps/entities/hps_address.rb +6 -6
- data/lib/hps/entities/hps_authorization.rb +12 -12
- data/lib/hps/entities/hps_batch.rb +6 -6
- data/lib/hps/entities/hps_cardholder.rb +10 -6
- data/lib/hps/entities/hps_charge.rb +8 -8
- data/lib/hps/entities/hps_charge_exceptions.rb +6 -6
- data/lib/hps/entities/hps_credit_card.rb +32 -32
- data/lib/hps/entities/hps_refund.rb +8 -8
- data/lib/hps/entities/hps_report_transaction_details.rb +10 -10
- data/lib/hps/entities/hps_report_transaction_summary.rb +6 -6
- data/lib/hps/entities/hps_reversal.rb +10 -10
- data/lib/hps/entities/hps_token_data.rb +10 -10
- data/lib/hps/entities/hps_transaction.rb +161 -161
- data/lib/hps/entities/hps_transaction_details.rb +6 -6
- data/lib/hps/entities/hps_transaction_header.rb +8 -8
- data/lib/hps/entities/hps_transaction_type.rb +16 -16
- data/lib/hps/entities/hps_void.rb +8 -8
- data/lib/hps/infrastructure/api_connection_exception.rb +11 -11
- data/lib/hps/infrastructure/authentication_exception.rb +11 -11
- data/lib/hps/infrastructure/card_exception.rb +15 -15
- data/lib/hps/infrastructure/exceptions.json +468 -468
- data/lib/hps/infrastructure/hps_exception.rb +25 -25
- data/lib/hps/infrastructure/hps_exception_mapper.rb +134 -134
- data/lib/hps/infrastructure/hps_sdk_codes.rb +48 -48
- data/lib/hps/infrastructure/invalid_request_exception.rb +15 -15
- data/lib/hps/services/hps_batch_service.rb +29 -29
- data/lib/hps/services/hps_charge_service.rb +634 -634
- data/lib/hps/services/hps_service.rb +128 -128
- data/lib/hps/version.rb +3 -3
- data/lib/hps.rb +45 -45
- data/tests/amex_tests.rb +230 -230
- data/tests/cert_tests.rb +80 -80
- data/tests/discover_tests.rb +324 -324
- data/tests/exception_mapper_tests.rb +244 -244
- data/tests/general_tests.rb +58 -58
- data/tests/hps_token_service.rb +56 -56
- data/tests/mastercard_tests.rb +325 -325
- data/tests/secret_key.rb +11 -11
- data/tests/test_data.rb +127 -127
- data/tests/test_helper.rb +108 -92
- data/tests/token_tests.rb +513 -513
- data/tests/visa_tests.rb +378 -378
- metadata +4 -6
- data/.DS_Store +0 -0
- data/.gitignore +0 -24
@@ -1,33 +1,33 @@
|
|
1
|
-
module Hps
|
2
|
-
class HpsCreditCard
|
3
|
-
|
4
|
-
attr_accessor :number, :cvv, :exp_month, :exp_year
|
5
|
-
|
6
|
-
def initialize
|
7
|
-
|
8
|
-
@regex_map = {
|
9
|
-
:Amex => /^3[47][0-9]{13}$/,
|
10
|
-
:MasterCard => /^5[1-5][0-9]{14}$/,
|
11
|
-
:Visa => /^4[0-9]{12}(?:[0-9]{3})?$/,
|
12
|
-
:DinersClub => /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
|
13
|
-
:EnRoute => /^(2014|2149)/,
|
14
|
-
:Discover => /^6(?:011|5[0-9]{2})[0-9]{12}$/,
|
15
|
-
:Jcb => /^(?:2131|1800|35\\d{3})\\d{11}$/
|
16
|
-
}
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
def card_type
|
21
|
-
|
22
|
-
@regex_map.each { |key, value|
|
23
|
-
unless value.match(number.to_s).nil?
|
24
|
-
return key
|
25
|
-
end
|
26
|
-
}
|
27
|
-
|
28
|
-
"Unknown"
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
1
|
+
module Hps
|
2
|
+
class HpsCreditCard
|
3
|
+
|
4
|
+
attr_accessor :number, :cvv, :exp_month, :exp_year
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
|
8
|
+
@regex_map = {
|
9
|
+
:Amex => /^3[47][0-9]{13}$/,
|
10
|
+
:MasterCard => /^5[1-5][0-9]{14}$/,
|
11
|
+
:Visa => /^4[0-9]{12}(?:[0-9]{3})?$/,
|
12
|
+
:DinersClub => /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
|
13
|
+
:EnRoute => /^(2014|2149)/,
|
14
|
+
:Discover => /^6(?:011|5[0-9]{2})[0-9]{12}$/,
|
15
|
+
:Jcb => /^(?:2131|1800|35\\d{3})\\d{11}$/
|
16
|
+
}
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
def card_type
|
21
|
+
|
22
|
+
@regex_map.each { |key, value|
|
23
|
+
unless value.match(number.to_s).nil?
|
24
|
+
return key
|
25
|
+
end
|
26
|
+
}
|
27
|
+
|
28
|
+
"Unknown"
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
33
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
module Hps
|
2
|
-
class HpsRefund < HpsTransaction
|
3
|
-
|
4
|
-
def initialize(header)
|
5
|
-
super(header)
|
6
|
-
end
|
7
|
-
|
8
|
-
end
|
1
|
+
module Hps
|
2
|
+
class HpsRefund < 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 HpsReportTransactionDetails < HpsAuthorization
|
3
|
-
|
4
|
-
attr_accessor :original_transaction_id, :masked_card_number, :transaction_type, :transaction_date, :exceptions
|
5
|
-
|
6
|
-
def initialize(header)
|
7
|
-
super(header)
|
8
|
-
end
|
9
|
-
|
10
|
-
end
|
1
|
+
module Hps
|
2
|
+
class HpsReportTransactionDetails < HpsAuthorization
|
3
|
+
|
4
|
+
attr_accessor :original_transaction_id, :masked_card_number, :transaction_type, :transaction_date, :exceptions
|
5
|
+
|
6
|
+
def initialize(header)
|
7
|
+
super(header)
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
11
11
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module Hps
|
2
|
-
class HpsReportTransactionSummary < HpsTransaction
|
3
|
-
|
4
|
-
attr_accessor :amount, :original_transaction_id, :masked_card_number, :transaction_type, :transaction_date, :exceptions
|
5
|
-
|
6
|
-
end
|
1
|
+
module Hps
|
2
|
+
class HpsReportTransactionSummary < HpsTransaction
|
3
|
+
|
4
|
+
attr_accessor :amount, :original_transaction_id, :masked_card_number, :transaction_type, :transaction_date, :exceptions
|
5
|
+
|
6
|
+
end
|
7
7
|
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
module Hps
|
2
|
-
class HpsReversal < HpsTransaction
|
3
|
-
|
4
|
-
attr_accessor :avs_result_code, :avs_result_text, :cvv_result_code, :cvv_result_text, :cpc_indicator
|
5
|
-
|
6
|
-
def initialize(header)
|
7
|
-
super(header)
|
8
|
-
end
|
9
|
-
|
10
|
-
end
|
1
|
+
module Hps
|
2
|
+
class HpsReversal < HpsTransaction
|
3
|
+
|
4
|
+
attr_accessor :avs_result_code, :avs_result_text, :cvv_result_code, :cvv_result_text, :cpc_indicator
|
5
|
+
|
6
|
+
def initialize(header)
|
7
|
+
super(header)
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
11
11
|
end
|
@@ -1,11 +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
|
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
11
|
end
|
@@ -1,161 +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
|
-
|
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
|
+
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module Hps
|
2
|
-
class HpsTransactionDetails
|
3
|
-
|
4
|
-
attr_accessor :memo, :invoice_number, :customer_id
|
5
|
-
|
6
|
-
end
|
1
|
+
module Hps
|
2
|
+
class HpsTransactionDetails
|
3
|
+
|
4
|
+
attr_accessor :memo, :invoice_number, :customer_id
|
5
|
+
|
6
|
+
end
|
7
7
|
end
|
@@ -1,9 +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
|
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
9
|
end
|
@@ -1,17 +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
|
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
17
|
end
|
@@ -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
|