objective_active_merchant_first_data 1.3.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 24b7995085e1e354fb107a5ddecacda911798574
4
+ data.tar.gz: 6f0ec137aae58c87fd9202af9b9619c4d03950a6
5
+ SHA512:
6
+ metadata.gz: 32003cebb1b228694ab28dc704746e720d31d6a3a081fe9a99d1a85b42dfe9617f3b5db5ef83b8fd38348d94dae70bbec437f03b4012e8ba866c19e133c36f18
7
+ data.tar.gz: bbda103e398399310441179608d60cf4df0403bd56f9eb8417c4e0d9fb378bd65c745856d8f36d320b0fb0571d245562948b8b8d8b0229bb49621ddc7d22999d
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ ## 1.2.0
2
+
3
+ * Changed default currency from LVL to EUR
4
+
5
+ ## 1.1.0
6
+
7
+ * Recurring payments support (@rsim)
8
+
9
+ ## 1.0.0
10
+
11
+ * Initial version
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Edgars Beigarts
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ First Data Latvia gateway for Active Merchant
2
+ =============================================
3
+
4
+ [![Continuous Integration status](https://secure.travis-ci.org/ebeigarts/active_merchant_first_data.png)](http://travis-ci.org/ebeigarts/active_merchant_first_data)
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ $ gem install active_merchant_first_data
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```ruby
15
+ require "active_merchant_first_data"
16
+ @gateway = ActiveMerchant::Billing::FirstData::Gateway.new(
17
+ :pem => "1234567_keystore.pem"
18
+ :pem_password => "5x64jq8n234c"
19
+ )
20
+ ```
21
+
22
+ ## First Data test environment setup
23
+
24
+ 1. Generate a new certificate
25
+
26
+ ```bash
27
+ $ openssl req -newkey rsa:2048 -keyout spec/certs/1234567_key.pem -out spec/certs/1234567_req.pem -subj "/C=lv/O=example.com/CN=1234567" -outform PEM
28
+ Enter PEM pass phrase: 81f174259v45
29
+ ```
30
+
31
+ 2. [Request your certificate using `1234567_req.pem`](https://secureshop-test.firstdata.lv/report/keystore_.do)
32
+
33
+ 3. Copy the 3 files you received in e-mail to `spec/certs/`:
34
+
35
+ ```
36
+ 1234567.pem
37
+ 1234567_certificate_chain.p7.pem
38
+ ECOMM.pem
39
+ ```
40
+
41
+ 4. Convert the certificates and keys to `1234567_keystore.pem`
42
+
43
+ ```bash
44
+ $ openssl pkcs12 -export -in spec/certs/1234567.pem -out spec/certs/1234567_keystore.p12 -certfile spec/certs/ECOMM.pem -inkey spec/certs/1234567_key.pem
45
+ Enter pass phrase for 1234567_key.pem: 81f174259v45
46
+ Enter Export Password: <empty>
47
+ ```
48
+
49
+ ```bash
50
+ $ openssl pkcs12 -in spec/certs/1234567_keystore.p12 > spec/certs/1234567_keystore.pem
51
+ Enter Import Password: <empty>
52
+ Enter PEM pass phrase: 5x64jq8n234c
53
+ ```
54
+
55
+ 5. [Set your WAN IP address](https://secureshop-test.firstdata.lv/report/merchantlist.do)
@@ -0,0 +1,9 @@
1
+ require "active_merchant/billing/first_data/gateway"
2
+ require "active_merchant/billing/first_data/response"
3
+
4
+ module ActiveMerchant #:nodoc:
5
+ module Billing #:nodoc:
6
+ module FirstData
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,280 @@
1
+ module ActiveMerchant #:nodoc:
2
+ module Billing #:nodoc:
3
+ module FirstData
4
+ class Gateway < Gateway
5
+ mattr_accessor :ssl_strict
6
+ class_attribute :test_url, :live_url, :test_redirect_url, :live_redirect_url, :pem_file, :pem_password
7
+
8
+ self.test_redirect_url = 'https://secureshop-test.firstdata.lv/ecomm/ClientHandler'
9
+ self.live_redirect_url = 'https://secureshop.firstdata.lv/ecomm/ClientHandler'
10
+
11
+ self.test_url = 'https://secureshop-test.firstdata.lv:8443/ecomm/MerchantHandler'
12
+ self.live_url = 'https://secureshop.firstdata.lv:8443/ecomm/MerchantHandler'
13
+
14
+ self.homepage_url = 'http://www.firstdata.lv/'
15
+ self.display_name = 'First Data'
16
+
17
+ self.default_currency = '978' # EUR (http://en.wikipedia.org/wiki/ISO_4217)
18
+ self.money_format = :cents
19
+
20
+ class Error < StandardError
21
+ attr_reader :response
22
+
23
+ def initialize(response, msg=nil)
24
+ @response = response
25
+ super(msg || response[:error])
26
+ end
27
+ end
28
+
29
+ # Creates a new FirstDataGateway
30
+ #
31
+ # The gateway requires that a valid pem and password be passed
32
+ # in the +options+ hash.
33
+ #
34
+ # @option options [String] :pem First Data cert/key (REQUIRED)
35
+ # @option options [String] :pem_password First Data cert password (REQUIRED)
36
+ #
37
+ def initialize(options = {})
38
+ requires!(options, :pem, :pem_password)
39
+ @options = options
40
+ super
41
+ end
42
+
43
+ # Perform a purchase, which is essentially an authorization and capture in a single operation.
44
+ #
45
+ # Registering of SMS transaction
46
+ #
47
+ # @param [Integer] amount transaction amount in minor units, mandatory
48
+ # @option params [Integer, String] :currency transaction currency code, mandatory
49
+ # @option params [String] :client_ip_addr client's IP address, mandatory
50
+ # @option params [String] :description description of transaction, optional
51
+ # @option params [String] :language authorization language identificator, optional
52
+ # @return [ActiveSupport::HashWithIndifferentAccess] TRANSACTION_ID
53
+ #
54
+ def purchase(amount, params = {})
55
+ params = params.reverse_merge(
56
+ :command => :v,
57
+ :amount => amount,
58
+ :currency => default_currency
59
+ )
60
+ lookup_currency(params)
61
+ requires!(params, :amount, :currency, :client_ip_addr)
62
+ commit(params)
63
+ end
64
+
65
+ # Performs an authorization, which reserves the funds on the customer's credit card, but does not
66
+ # charge the card.
67
+ #
68
+ # Registering of DMS authorisation
69
+ #
70
+ # @param [Integer] amount transaction amount in minor units, mandatory
71
+ # @option params [Integer, String] :currency transaction currency code, mandatory
72
+ # @option params [String] :client_ip_addr client's IP address, mandatory
73
+ # @option params [String] :description description of transaction, optional
74
+ # @option params [String] :language authorization language identificator, optional
75
+ # @return [ActiveSupport::HashWithIndifferentAccess] TRANSACTION_ID
76
+ #
77
+ def authorize(amount, params = {})
78
+ params = params.reverse_merge(
79
+ :command => :a,
80
+ :msg_type => 'DMS',
81
+ :amount => amount,
82
+ :currency => default_currency
83
+ )
84
+ lookup_currency(params)
85
+ requires!(params, :amount, :currency, :client_ip_addr, :msg_type)
86
+ commit(params)
87
+ end
88
+
89
+ # Captures the funds from an authorized transaction.
90
+ #
91
+ # Making of DMS transaction
92
+ #
93
+ # @param [Integer] amount transaction amount in minor units, mandatory
94
+ # @param [Integer] trans_id id of previously made successeful authorisation
95
+ # @option params [Integer, String] :currency transaction currency code, mandatory
96
+ # @option params [String] :client_ip_addr client's IP address, mandatory
97
+ # @option params [String] :description description of transaction, optional
98
+ # @return [ActiveSupport::HashWithIndifferentAccess] RESULT, RESULT_CODE, RRN, APPROVAL_CODE
99
+ #
100
+ def capture(amount, trans_id, params = {})
101
+ params = params.reverse_merge(
102
+ :command => :t,
103
+ :msg_type => 'DMS',
104
+ :trans_id => trans_id,
105
+ :amount => amount,
106
+ :currency => default_currency
107
+ )
108
+ lookup_currency(params)
109
+ requires!(params, :trans_id, :amount, :currency, :client_ip_addr)
110
+ commit(params)
111
+ end
112
+
113
+ # Transaction result
114
+ #
115
+ # @param [Integer] trans_id transaction identifier, mandatory
116
+ # @option params [String] :client_ip_addr client's IP address, mandatory
117
+ # @return [ActiveSupport::HashWithIndifferentAccess] RESULT, RESULT_CODE, 3DSECURE, AAV, RRN, APPROVAL_CODE
118
+ #
119
+ def result(trans_id, params = {})
120
+ params = params.reverse_merge(
121
+ :command => :c,
122
+ :trans_id => trans_id
123
+ )
124
+ requires!(params, :trans_id, :client_ip_addr)
125
+ commit(params)
126
+ end
127
+
128
+ # refund() allows you to return money to a card that was previously billed.
129
+ #
130
+ # Transaction reversal
131
+ #
132
+ # @param [Integer] amount transaction amount in minor units, mandatory
133
+ # @param [Integer] trans_id transaction identifier, mandatory
134
+ # @return [ActiveSupport::HashWithIndifferentAccess] RESULT, RESULT_CODE
135
+ #
136
+ def refund(amount, trans_id = nil)
137
+ params = {
138
+ :command => :r,
139
+ :trans_id => trans_id,
140
+ :amount => amount
141
+ }
142
+ requires!(params, :command, :trans_id, :amount)
143
+ commit(params)
144
+ end
145
+
146
+ def credit(amount, trans_id = nil)
147
+ deprecated CREDIT_DEPRECATION_MESSAGE
148
+ refund(amount, trans_id)
149
+ end
150
+
151
+ # Register new recurring payment along with the first payment
152
+ #
153
+ # @param [Integer] amount transaction amount in minor units, mandatory (up to 12 digits)
154
+ # @option params [Integer, String] :currency transaction currency code, mandatory
155
+ # @option params [String] :client_ip_addr client's IP address, mandatory
156
+ # @option params [String] :description transaction details, mandatory (up to 125 characters)
157
+ # @option params [String] :biller_client_id recurring payment identifier, mandatory (up to 30 characters)
158
+ # @option params [String] :perspayee_expiry preferred deadline for a Recurring payment, mandatory (MMYY)
159
+ # (system will compare two expiry dates - recurring payment expiry date provided by Merchant and
160
+ # card expiry date provided by Cardholder. In response Merchant will receive back the earliest expiry dates of both).
161
+ # For example, Recurring payment date is 1214 but card expiry date 1213 then Merchant will receive back 1213.
162
+ # First Data system will save the earliest expiry date as Recurring payment expiry date.
163
+ # @option params [Integer] :perspayee_overwrite set to 1 to overwrite existing recurring payment card data
164
+ # together with payment, optional
165
+ # @option params [String] :language authorization language identificator, optional
166
+ # @return [ActiveSupport::HashWithIndifferentAccess] TRANSACTION_ID
167
+ #
168
+ # Afterwards when transaction result is requested then result response includes also RECC_PMNT_ID and RECC_PMNT_EXPIRY
169
+ #
170
+ def recurring(amount, params = {})
171
+ params = params.reverse_merge(
172
+ :command => :z,
173
+ :amount => amount,
174
+ :currency => default_currency,
175
+ :msg_type => 'SMS',
176
+ :perspayee_gen => 1
177
+ )
178
+ lookup_currency(params)
179
+ requires!(params, :amount, :currency, :client_ip_addr, :description, :biller_client_id, :perspayee_expiry)
180
+ commit(params)
181
+ end
182
+
183
+ # Execute subsequent recurring payment
184
+ #
185
+ # @param [Integer] amount transaction amount in minor units, mandatory (up to 12 digits)
186
+ # @option params [Integer, String] :currency transaction currency code, mandatory
187
+ # @option params [String] :client_ip_addr client's IP address, mandatory
188
+ # (the same IP address which was provided when registered recurring payment)
189
+ # @option params [String] :description transaction details, mandatory (up to 125 characters)
190
+ # @option params [String] :biller_client_id recurring payment identifier, mandatory (up to 30 characters)
191
+ # @return [ActiveSupport::HashWithIndifferentAccess] TRANSACTION_ID, RESULT, RESULT_CODE, RRN, APPROVAL_CODE
192
+ #
193
+ def execute_recurring(amount, params = {})
194
+ params = params.reverse_merge(
195
+ :command => :e,
196
+ :amount => amount,
197
+ :currency => default_currency
198
+ )
199
+ lookup_currency(params)
200
+ requires!(params, :amount, :currency, :client_ip_addr, :description, :biller_client_id)
201
+ commit(params)
202
+ end
203
+
204
+ # Overwriting existing recurring payment card data without payment
205
+ #
206
+ # @option params [Integer, String] :currency transaction currency code, mandatory
207
+ # @option params [String] :client_ip_addr client's IP address, mandatory
208
+ # @option params [String] :description transaction details, mandatory (up to 125 characters)
209
+ # @option params [String] :biller_client_id existing recurring payment identifier, mandatory (up to 30 characters)
210
+ # @option params [String] :perspayee_expiry preferred deadline for a Recurring payment, mandatory (MMYY)
211
+ # (system will compare two expiry dates - recurring payment expiry date provided by Merchant and
212
+ # card expiry date provided by Cardholder. In response Merchant will receive back the earliest expiry dates of both).
213
+ # For example, Recurring payment date is 1214 but card expiry date 1213 then Merchant will receive back 1213.
214
+ # First Data system will save the earliest expiry date as Recurring payment expiry date.
215
+ # @option params [String] :language authorization language identificator, optional
216
+ # @return [ActiveSupport::HashWithIndifferentAccess] TRANSACTION_ID
217
+ #
218
+ # Afterwards when transaction result is requested then result response includes also RECC_PMNT_ID and RECC_PMNT_EXPIRY
219
+ #
220
+ def update_recurring(params = {})
221
+ params = params.reverse_merge(
222
+ :command => :p,
223
+ :amount => 0,
224
+ :currency => default_currency,
225
+ :msg_type => 'AUTH',
226
+ :perspayee_gen => 1,
227
+ :perspayee_overwrite => 1
228
+ )
229
+ lookup_currency(params)
230
+ requires!(params, :currency, :client_ip_addr, :description, :biller_client_id, :perspayee_expiry)
231
+ commit(params)
232
+ end
233
+
234
+ # Close business day.
235
+ def close_day
236
+ commit({ :command => :b })
237
+ end
238
+
239
+ def endpoint_url
240
+ test? ? test_url : live_url
241
+ end
242
+
243
+ def redirect_url(trans_id = nil)
244
+ url = test? ? test_redirect_url : live_redirect_url
245
+ url += "?trans_id=#{CGI.escape trans_id}" if trans_id
246
+ url
247
+ end
248
+
249
+ private
250
+ def lookup_currency(params)
251
+ params[:currency] = CURRENCY_CODES[params[:currency]] || params[:currency]
252
+ end
253
+
254
+ # Convert HTTP response body to a Ruby Hash.
255
+ def parse(body)
256
+ results = ActiveSupport::HashWithIndifferentAccess.new
257
+ body.split(/[\r\n]+/).each do |pair|
258
+ key, val = pair.split(": ")
259
+ results[key.downcase] = val
260
+ end
261
+ results
262
+ end
263
+
264
+ def commit(params = {})
265
+ response = parse(ssl_post(endpoint_url, post_data(params)))
266
+ # FIXME: test cases 17 and 19 return unnecessary error even when result and result_code are present
267
+ # should be removed when this issue is fixed on gataway side
268
+ raise Error.new(response) if !response[:error].blank? && response[:result_code].blank?
269
+ ActiveMerchant::Billing::FirstData::Response.new response
270
+ end
271
+
272
+ def post_data(params)
273
+ post = PostData.new
274
+ params.each { |k, v| post[k] = v }
275
+ post.to_s
276
+ end
277
+ end
278
+ end
279
+ end
280
+ end
@@ -0,0 +1,57 @@
1
+ module ActiveMerchant #:nodoc:
2
+ module Billing #:nodoc:
3
+ module FirstData
4
+ class Response
5
+
6
+ def initialize response_parameters
7
+ self.parameters=response_parameters
8
+ end
9
+
10
+ def ok?
11
+ result == "OK"
12
+ end
13
+
14
+ def recurring?
15
+ recc_pmnt_id.present? && recc_pmnt_expiry.present?
16
+ end
17
+
18
+ def result
19
+ @parameters[:result]
20
+ end
21
+
22
+ def transaction_id
23
+ @parameters[:transaction_id]
24
+ end
25
+
26
+ def result_code
27
+ @parameters[:result_code]
28
+ end
29
+
30
+ def recc_pmnt_id
31
+ @parameters[:recc_pmnt_id]
32
+ end
33
+
34
+ def recc_pmnt_expiry
35
+ @parameters[:recc_pmnt_expiry]
36
+ end
37
+
38
+ def three_dee_secure
39
+ @parameters[:'3dsecure']
40
+ end
41
+
42
+ def result_text
43
+ FDL_RESPONSE_CODES["c#{result_code}".to_sym]
44
+ end
45
+
46
+ def parameters
47
+ @parameters
48
+ end
49
+
50
+ private
51
+ def parameters=(value)
52
+ @parameters=value
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,145 @@
1
+ require "active_merchant"
2
+ require "active_merchant/billing/first_data"
3
+
4
+ CURRENCY_CODES = {
5
+ 'ADP' => '020', 'AED' => '784', 'AFA' => '004', 'ALL' => '008', 'AMD' => '051',
6
+ 'ANG' => '532', 'AOA' => '973', 'ARS' => '032', 'AUD' => '036', 'AWG' => '533',
7
+ 'AZM' => '031', 'BAM' => '977', 'BBD' => '052', 'BDT' => '050', 'BGL' => '100',
8
+ 'BGN' => '975', 'BHD' => '048', 'BIF' => '108', 'BMD' => '060', 'BND' => '096',
9
+ 'BOB' => '068', 'BOV' => '984', 'BRL' => '986', 'BSD' => '044', 'BTN' => '064',
10
+ 'BWP' => '072', 'BYR' => '974', 'BZD' => '084', 'CAD' => '124', 'CDF' => '976',
11
+ 'CHF' => '756', 'CLF' => '990', 'CLP' => '152', 'CNY' => '156', 'COP' => '170',
12
+ 'CRC' => '188', 'CUP' => '192', 'CVE' => '132', 'CYP' => '196', 'CZK' => '203',
13
+ 'DJF' => '262', 'DKK' => '208', 'DOP' => '214', 'DZD' => '012', 'ECS' => '218',
14
+ 'ECV' => '983', 'EEK' => '233', 'EGP' => '818', 'ERN' => '232', 'ETB' => '230',
15
+ 'EUR' => '978', 'FJD' => '242', 'FKP' => '238', 'GBP' => '826', 'GEL' => '981',
16
+ 'GHC' => '288', 'GIP' => '292', 'GMD' => '270', 'GNF' => '324', 'GTQ' => '320',
17
+ 'GWP' => '624', 'GYD' => '328', 'HKD' => '344', 'HNL' => '340', 'HRK' => '191',
18
+ 'HTG' => '332', 'HUF' => '348', 'IDR' => '360', 'ILS' => '376', 'INR' => '356',
19
+ 'IQD' => '368', 'IRR' => '364', 'ISK' => '352', 'JMD' => '388', 'JOD' => '400',
20
+ 'JPY' => '392', 'KES' => '404', 'KGS' => '417', 'KHR' => '116', 'KMF' => '174',
21
+ 'KPW' => '408', 'KRW' => '410', 'KWD' => '414', 'KYD' => '136', 'KZT' => '398',
22
+ 'LAK' => '418', 'LBP' => '422', 'LKR' => '144', 'LRD' => '430', 'LSL' => '426',
23
+ 'LTL' => '440', 'LVL' => '428', 'LYD' => '434', 'MAD' => '504', 'MDL' => '498',
24
+ 'MGF' => '450', 'MKD' => '807', 'MMK' => '104', 'MNT' => '496', 'MOP' => '446',
25
+ 'MRO' => '478', 'MTL' => '470', 'MUR' => '480', 'MVR' => '462', 'MWK' => '454',
26
+ 'MXN' => '484', 'MXV' => '979', 'MYR' => '458', 'MZM' => '508', 'NAD' => '516',
27
+ 'NGN' => '566', 'NIO' => '558', 'NOK' => '578', 'NPR' => '524', 'NZD' => '554',
28
+ 'OMR' => '512', 'PAB' => '590', 'PEN' => '604', 'PGK' => '598', 'PHP' => '608',
29
+ 'PKR' => '586', 'PLN' => '985', 'PYG' => '600', 'QAR' => '634', 'ROL' => '642',
30
+ 'RUB' => '643', 'RUR' => '810', 'RWF' => '646', 'SAR' => '682', 'SBD' => '090',
31
+ 'SCR' => '690', 'SDD' => '736', 'SEK' => '752', 'SGD' => '702', 'SHP' => '654',
32
+ 'SIT' => '705', 'SKK' => '703', 'SLL' => '694', 'SOS' => '706', 'SRG' => '740',
33
+ 'STD' => '678', 'SVC' => '222', 'SYP' => '760', 'SZL' => '748', 'THB' => '764',
34
+ 'TJS' => '972', 'TMM' => '795', 'TND' => '788', 'TOP' => '776', 'TPE' => '626',
35
+ 'TRL' => '792', 'TRY' => '949', 'TTD' => '780', 'TWD' => '901', 'TZS' => '834',
36
+ 'UAH' => '980', 'UGX' => '800', 'USD' => '840', 'UYU' => '858', 'UZS' => '860',
37
+ 'VEB' => '862', 'VND' => '704', 'VUV' => '548', 'XAF' => '950', 'XCD' => '951',
38
+ 'XOF' => '952', 'XPF' => '953', 'YER' => '886', 'YUM' => '891', 'ZAR' => '710',
39
+ 'ZMK' => '894', 'ZWD' => '716'
40
+ }
41
+
42
+ FDL_RESPONSE_CODES = {
43
+ c000: "Approved",
44
+ c001: "Approved, honour with identification",
45
+ c002: "Approved for partial amount",
46
+ c003: "Approved for VIP",
47
+ c004: "Approved, update track 3",
48
+ c005: "Approved, account type specified by card issuer",
49
+ c006: "Approved for partial amount, account type specified by card issuer",
50
+ c007: "Approved, update ICC",
51
+ c100: "Decline (general, no comments)",
52
+ c101: "Decline, expired card",
53
+ c102: "Decline, suspected fraud",
54
+ c103: "Decline, card acceptor contact acquirer",
55
+ c104: "Decline, restricted card",
56
+ c105: "Decline, card acceptor call acquirer's security department",
57
+ c106: "Decline, allowable PIN tries exceeded",
58
+ c107: "Decline, refer to card issuer",
59
+ c108: "Decline, refer to card issuer's special conditions",
60
+ c109: "Decline, invalid merchant",
61
+ c110: "Decline, invalid amount",
62
+ c111: "Decline, invalid card number",
63
+ c112: "Decline, PIN data required",
64
+ c113: "Decline, unacceptable fee",
65
+ c114: "Decline, no account of type requested",
66
+ c115: "Decline, requested function not supported",
67
+ c116: "Decline, not sufficient funds",
68
+ c117: "Decline, incorrect PIN",
69
+ c118: "Decline, no card record",
70
+ c119: "Decline, transaction not permitted to cardholder",
71
+ c120: "Decline, transaction not permitted to terminal",
72
+ c121: "Decline, exceeds withdrawal amount limit",
73
+ c122: "Decline, security violation",
74
+ c123: "Decline, exceeds withdrawal frequency limit",
75
+ c124: "Decline, violation of law",
76
+ c125: "Decline, card not effective",
77
+ c126: "Decline, invalid PIN block",
78
+ c127: "Decline, PIN length error",
79
+ c128: "Decline, PIN kay synch error",
80
+ c129: "Decline, suspected counterfeit card",
81
+ c200: "Pick-up (general, no comments)",
82
+ c201: "Pick-up, expired card",
83
+ c202: "Pick-up, suspected fraud",
84
+ c203: "Pick-up, card acceptor contact card acquirer",
85
+ c204: "Pick-up, restricted card",
86
+ c205: "Pick-up, card acceptor call acquirer's security department",
87
+ c206: "Pick-up, allowable PIN tries exceeded",
88
+ c207: "Pick-up, special conditions",
89
+ c208: "Pick-up, lost card",
90
+ c209: "Pick-up, stolen card",
91
+ c210: "Pick-up, suspected counterfeit card",
92
+ c300: "Status message: file action successful",
93
+ c301: "Status message: file action not supported by receiver",
94
+ c302: "Status message: unable to locate record on file",
95
+ c303: "Status message: duplicate record, old record replaced",
96
+ c304: "Status message: file record field edit error",
97
+ c305: "Status message: file locked out",
98
+ c306: "Status message: file action not successful",
99
+ c307: "Status message: file data format error",
100
+ c308: "Status message: duplicate record, new record rejected",
101
+ c309: "Status message: unknown file",
102
+ c400: "Accepted (for reversal)",
103
+ c500: "Status message: reconciled, in balance",
104
+ c501: "Status message: reconciled, out of balance",
105
+ c502: "Status message: amount not reconciled, totals provided",
106
+ c503: "Status message: totals for reconciliation not available",
107
+ c504: "Status message: not reconciled, totals provided",
108
+ c600: "Accepted (for administrative info)",
109
+ c601: "Status message: impossible to trace back original transaction",
110
+ c602: "Status message: invalid transaction reference number",
111
+ c603: "Status message: reference number/PAN incompatible",
112
+ c604: "Status message: POS photograph is not available",
113
+ c605: "Status message: requested item supplied",
114
+ c606: "Status message: request cannot be fulfilled - required documentation is not available",
115
+ c700: "Accepted (for fee collection)",
116
+ c800: "Accepted (for network management)",
117
+ c900: "Advice acknowledged, no financial liability accepted",
118
+ c901: "Advice acknowledged, finansial liability accepted",
119
+ c902: "Decline reason message: invalid transaction",
120
+ c903: "Status message: re-enter transaction",
121
+ c904: "Decline reason message: format error",
122
+ c905: "Decline reason message: acqiurer not supported by switch",
123
+ c906: "Decline reason message: cutover in process",
124
+ c907: "Decline reason message: card issuer or switch inoperative",
125
+ c908: "Decline reason message: transaction destination cannot be found for routing",
126
+ c909: "Decline reason message: system malfunction",
127
+ c910: "Decline reason message: card issuer signed off",
128
+ c911: "Decline reason message: card issuer timed out",
129
+ c912: "Decline reason message: card issuer unavailable",
130
+ c913: "Decline reason message: duplicate transmission",
131
+ c914: "Decline reason message: not able to trace back to original transaction",
132
+ c915: "Decline reason message: reconciliation cutover or checkpoint error",
133
+ c916: "Decline reason message: MAC incorrect",
134
+ c917: "Decline reason message: MAC key sync error",
135
+ c918: "Decline reason message: no communication keys available for use",
136
+ c919: "Decline reason message: encryption key sync error",
137
+ c920: "Decline reason message: security software/hardware error - try again",
138
+ c921: "Decline reason message: security software/hardware error - no action",
139
+ c922: "Decline reason message: message number out of sequence",
140
+ c923: "Status message: request in progress",
141
+ c940: "Decline, blocked by fraud filter",
142
+ c950: "Decline reason message: violation of business arrangement",
143
+ c198: "Declined, call Card Processing Centre",
144
+ c197: "Declined, call AmEx"
145
+ }
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: objective_active_merchant_first_data
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.0
5
+ platform: ruby
6
+ authors:
7
+ - Girts Kesteris
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activemerchant
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.15.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.15.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: vcr
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.11'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.11'
69
+ - !ruby/object:Gem::Dependency
70
+ name: fakeweb
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '1.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '1.3'
83
+ description: First Data Latvia gateway for Active Merchant
84
+ email:
85
+ - girts.kesteris@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - CHANGELOG.md
91
+ - LICENSE
92
+ - README.md
93
+ - lib/active_merchant/billing/first_data.rb
94
+ - lib/active_merchant/billing/first_data/gateway.rb
95
+ - lib/active_merchant/billing/first_data/response.rb
96
+ - lib/active_merchant_first_data.rb
97
+ homepage: https://github.com/Sacristan/active_merchant_first_data
98
+ licenses: []
99
+ metadata: {}
100
+ post_install_message:
101
+ rdoc_options: []
102
+ require_paths:
103
+ - lib
104
+ required_ruby_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ required_rubygems_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - '>='
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ requirements: []
115
+ rubyforge_project:
116
+ rubygems_version: 2.2.2
117
+ signing_key:
118
+ specification_version: 4
119
+ summary: First Data Latvia gateway for Active Merchant
120
+ test_files: []
121
+ has_rdoc: