activemerchant 1.37.0 → 1.38.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.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +14 -2
- data/README.md +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +2 -2
- data/lib/active_merchant/billing/gateways/eway.rb +1 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +14 -3
- data/lib/active_merchant/billing/gateways/litle.rb +7 -2
- data/lib/active_merchant/billing/gateways/moneris.rb +28 -5
- data/lib/active_merchant/billing/gateways/secure_net.rb +3 -2
- data/lib/active_merchant/billing/gateways/stripe.rb +10 -29
- data/lib/active_merchant/billing/gateways/webpay.rb +23 -0
- data/lib/active_merchant/billing/integrations/hi_trust/return.rb +6 -5
- data/lib/active_merchant/billing/response.rb +11 -3
- data/lib/active_merchant/version.rb +1 -1
- metadata +36 -24
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
= ActiveMerchant CHANGELOG
|
|
2
2
|
|
|
3
|
+
== Version 1.38.0 (September 6, 2013)
|
|
4
|
+
|
|
5
|
+
* FirstData E4: Include missing address information for AVS and CVV [melari]
|
|
6
|
+
* Litle: Deprecate credit method in favor of refund [melari]
|
|
7
|
+
* Moneris: Add verification_value support [duff]
|
|
8
|
+
* Webpay: Fixes issues with partial JPY currency [keikubo, melari]
|
|
9
|
+
* SecureNet: Add INVOICENUM and INVOICEDESC optional fields [duff]
|
|
10
|
+
* Balanced: Make BalancedGateway::Error inherit from ActiveMerchantError [duff]
|
|
11
|
+
* Balanced: Fix #void interface [duff]
|
|
12
|
+
* HiTrust: Return correct error message for positive retcodes [melari]
|
|
13
|
+
* Moving to pessimistic versioning [davefp]
|
|
14
|
+
|
|
15
|
+
== Version 1.37.0 (August 20, 2013)
|
|
16
|
+
|
|
3
17
|
* MerchantWarrior: Fix handling of amounts [duff]
|
|
4
18
|
* Ipay88: New gateway [kamal, siong1987, jduff]
|
|
5
19
|
* IATS: New gateway [unkown, jduff]
|
|
6
20
|
* MerchantWarrior: Send the CVV to the gateway [duff]
|
|
7
21
|
* PayU: Fix a major bug with status types [melari]
|
|
8
22
|
* SecureNet: Allow production transactions [duff]
|
|
9
|
-
* Stripe: Allow a card_not_present_fee to be specified [melari]
|
|
10
|
-
|
|
11
23
|
|
|
12
24
|
== Version 1.36.0 (August 2, 2013)
|
|
13
25
|
|
data/README.md
CHANGED
|
@@ -166,7 +166,7 @@ The [ActiveMerchant Wiki](http://github.com/Shopify/active_merchant/wikis) conta
|
|
|
166
166
|
* [SecurePayTech](http://www.securepaytech.com/) - NZ
|
|
167
167
|
* [SkipJack](http://www.skipjack.com/) - US, CA
|
|
168
168
|
* [Spreedly Core](https://spreedlycore.com/) - AD, AE, AT, AU, BD, BE, BG, BN, CA, CH, CY, CZ, DE, DK, EE, EG, ES, FI, FR, GB, GI, GR, HK, HU, ID, IE, IL, IM, IN, IS, IT, JO, KW, LB, LI, LK, LT, LU, LV, MC, MT, MU, MV, MX, MY, NL, NO, NZ, OM, PH, PL, PT, QA, RO, SA, SE, SG, SI, SK, SM, TR, TT, UM, US, VA, VN, ZA
|
|
169
|
-
* [Stripe](https://stripe.com/) - US
|
|
169
|
+
* [Stripe](https://stripe.com/) - US, CA, GB
|
|
170
170
|
* [TransFirst](http://www.transfirst.com/) - US
|
|
171
171
|
* [Transnational](http://www.tnbci.com/) - US
|
|
172
172
|
* [TrustCommerce](http://www.trustcommerce.com/) - US
|
|
@@ -69,7 +69,7 @@ module ActiveMerchant #:nodoc:
|
|
|
69
69
|
self.display_name = 'Balanced'
|
|
70
70
|
self.money_format = :cents
|
|
71
71
|
|
|
72
|
-
class Error <
|
|
72
|
+
class Error < ActiveMerchant::ActiveMerchantError
|
|
73
73
|
attr_reader :response
|
|
74
74
|
|
|
75
75
|
def initialize(response, msg=nil)
|
|
@@ -210,7 +210,7 @@ module ActiveMerchant #:nodoc:
|
|
|
210
210
|
#
|
|
211
211
|
# * <tt>authorization</tt> -- The uri of the authorization returned from
|
|
212
212
|
# an `authorize` request.
|
|
213
|
-
def void(authorization)
|
|
213
|
+
def void(authorization, options = {})
|
|
214
214
|
post = {}
|
|
215
215
|
post[:is_void] = true
|
|
216
216
|
|
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
|
8
8
|
self.live_url = 'https://www.eway.com.au'
|
|
9
9
|
|
|
10
10
|
self.money_format = :cents
|
|
11
|
-
self.supported_countries = ['AU']
|
|
11
|
+
self.supported_countries = ['AU', 'NZ', 'GB']
|
|
12
12
|
self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]
|
|
13
13
|
self.homepage_url = 'http://www.eway.com.au/'
|
|
14
14
|
self.display_name = 'eWAY'
|
|
@@ -116,7 +116,7 @@ module ActiveMerchant #:nodoc:
|
|
|
116
116
|
if credit_card_or_store_authorization.is_a? String
|
|
117
117
|
add_credit_card_token(xml, credit_card_or_store_authorization)
|
|
118
118
|
else
|
|
119
|
-
add_credit_card(xml, credit_card_or_store_authorization)
|
|
119
|
+
add_credit_card(xml, credit_card_or_store_authorization, options)
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
add_customer_data(xml, options)
|
|
@@ -138,7 +138,7 @@ module ActiveMerchant #:nodoc:
|
|
|
138
138
|
def build_store_request(credit_card, options)
|
|
139
139
|
xml = Builder::XmlMarkup.new
|
|
140
140
|
|
|
141
|
-
add_credit_card(xml, credit_card)
|
|
141
|
+
add_credit_card(xml, credit_card, options)
|
|
142
142
|
add_customer_data(xml, options)
|
|
143
143
|
|
|
144
144
|
xml.target!
|
|
@@ -164,12 +164,23 @@ module ActiveMerchant #:nodoc:
|
|
|
164
164
|
xml.tag! "DollarAmount", amount(money)
|
|
165
165
|
end
|
|
166
166
|
|
|
167
|
-
def add_credit_card(xml, credit_card)
|
|
167
|
+
def add_credit_card(xml, credit_card, options)
|
|
168
168
|
xml.tag! "Card_Number", credit_card.number
|
|
169
169
|
xml.tag! "Expiry_Date", expdate(credit_card)
|
|
170
170
|
xml.tag! "CardHoldersName", credit_card.name
|
|
171
171
|
xml.tag! "CardType", credit_card.brand
|
|
172
172
|
|
|
173
|
+
add_credit_card_verification_strings(xml, credit_card, options)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def add_credit_card_verification_strings(xml, credit_card, options)
|
|
177
|
+
address = options[:billing_address] || options[:address]
|
|
178
|
+
if address
|
|
179
|
+
address_values = []
|
|
180
|
+
[:address1, :zip, :city, :state, :country].each { |part| address_values << address[part].to_s }
|
|
181
|
+
xml.tag! "VerificationStr1", address_values.join("|")
|
|
182
|
+
end
|
|
183
|
+
|
|
173
184
|
if credit_card.verification_value?
|
|
174
185
|
xml.tag! "CVD_Presence_Ind", "1"
|
|
175
186
|
xml.tag! "VerificationStr2", credit_card.verification_value
|
|
@@ -112,11 +112,16 @@ module ActiveMerchant #:nodoc:
|
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
def
|
|
116
|
-
to_pass = build_credit_request(money,
|
|
115
|
+
def refund(money, authorization, options = {})
|
|
116
|
+
to_pass = build_credit_request(money, authorization, options)
|
|
117
117
|
build_response(:credit, @litle.credit(to_pass))
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
def credit(money, authorization, options = {})
|
|
121
|
+
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
122
|
+
refund(money, authorization, options)
|
|
123
|
+
end
|
|
124
|
+
|
|
120
125
|
def store(creditcard_or_paypage_registration_id, options = {})
|
|
121
126
|
to_pass = create_token_hash(creditcard_or_paypage_registration_id, options)
|
|
122
127
|
build_response(:registerToken, @litle.register_token_request(to_pass), %w(000 801 802))
|
|
@@ -128,6 +128,7 @@ module ActiveMerchant #:nodoc:
|
|
|
128
128
|
else
|
|
129
129
|
post[:pan] = source.number
|
|
130
130
|
post[:expdate] = expdate(source)
|
|
131
|
+
post[:cvd_value] = source.verification_value if source.verification_value?
|
|
131
132
|
end
|
|
132
133
|
end
|
|
133
134
|
|
|
@@ -155,6 +156,7 @@ module ActiveMerchant #:nodoc:
|
|
|
155
156
|
|
|
156
157
|
Response.new(successful?(response), message_from(response[:message]), response,
|
|
157
158
|
:test => test?,
|
|
159
|
+
:cvv_result => response[:cvd_result_code].try(:last),
|
|
158
160
|
:authorization => authorization_from(response)
|
|
159
161
|
)
|
|
160
162
|
end
|
|
@@ -192,14 +194,35 @@ module ActiveMerchant #:nodoc:
|
|
|
192
194
|
root = xml.add_element("request")
|
|
193
195
|
root.add_element("store_id").text = options[:login]
|
|
194
196
|
root.add_element("api_token").text = options[:password]
|
|
195
|
-
|
|
197
|
+
root.add_element(transaction_element(action, parameters))
|
|
198
|
+
|
|
199
|
+
xml.to_s
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def transaction_element(action, parameters)
|
|
203
|
+
transaction = REXML::Element.new(action)
|
|
196
204
|
|
|
197
205
|
# Must add the elements in the correct order
|
|
198
206
|
actions[action].each do |key|
|
|
199
|
-
|
|
207
|
+
if key == :cvd_info
|
|
208
|
+
transaction.add_element(cvd_element(parameters[:cvd_value]))
|
|
209
|
+
else
|
|
210
|
+
transaction.add_element(key.to_s).text = parameters[key] unless parameters[key].blank?
|
|
211
|
+
end
|
|
200
212
|
end
|
|
201
213
|
|
|
202
|
-
|
|
214
|
+
transaction
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def cvd_element(cvd_value)
|
|
218
|
+
element = REXML::Element.new('cvd_info')
|
|
219
|
+
if cvd_value
|
|
220
|
+
element.add_element('cvd_indicator').text = "1"
|
|
221
|
+
element.add_element('cvd_value').text = cvd_value
|
|
222
|
+
else
|
|
223
|
+
element.add_element('cvd_indicator').text = "0"
|
|
224
|
+
end
|
|
225
|
+
element
|
|
203
226
|
end
|
|
204
227
|
|
|
205
228
|
def message_from(message)
|
|
@@ -219,8 +242,8 @@ module ActiveMerchant #:nodoc:
|
|
|
219
242
|
|
|
220
243
|
def actions
|
|
221
244
|
{
|
|
222
|
-
"purchase" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
|
|
223
|
-
"preauth" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
|
|
245
|
+
"purchase" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type, :cvd_info],
|
|
246
|
+
"preauth" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type, :cvd_info],
|
|
224
247
|
"command" => [:order_id],
|
|
225
248
|
"refund" => [:order_id, :amount, :txn_number, :crypt_type],
|
|
226
249
|
"indrefund" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
|
|
@@ -182,8 +182,9 @@ module ActiveMerchant #:nodoc:
|
|
|
182
182
|
end
|
|
183
183
|
|
|
184
184
|
def add_invoice(xml, options)
|
|
185
|
-
xml.tag! '
|
|
186
|
-
xml.tag! '
|
|
185
|
+
xml.tag! 'NOTE', options[:description] if options[:description]
|
|
186
|
+
xml.tag! 'INVOICEDESC', options[:invoice_description] if options[:invoice_description]
|
|
187
|
+
xml.tag! 'INVOICENUM', options[:invoice_number] if options[:invoice_number]
|
|
187
188
|
end
|
|
188
189
|
|
|
189
190
|
def add_merchant_key(xml, options)
|
|
@@ -21,7 +21,7 @@ module ActiveMerchant #:nodoc:
|
|
|
21
21
|
'unchecked' => 'P'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
self.supported_countries = ['US', 'CA']
|
|
24
|
+
self.supported_countries = ['US', 'CA', 'GB']
|
|
25
25
|
self.default_currency = 'USD'
|
|
26
26
|
self.money_format = :cents
|
|
27
27
|
self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
|
|
@@ -40,7 +40,7 @@ module ActiveMerchant #:nodoc:
|
|
|
40
40
|
post = create_post_for_auth_or_purchase(money, creditcard, options)
|
|
41
41
|
post[:capture] = "false"
|
|
42
42
|
|
|
43
|
-
commit(:post, 'charges', post, generate_meta(options)
|
|
43
|
+
commit(:post, 'charges', post, generate_meta(options))
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
# To create a charge on a card or a token, call
|
|
@@ -53,12 +53,12 @@ module ActiveMerchant #:nodoc:
|
|
|
53
53
|
def purchase(money, creditcard, options = {})
|
|
54
54
|
post = create_post_for_auth_or_purchase(money, creditcard, options)
|
|
55
55
|
|
|
56
|
-
commit(:post, 'charges', post, generate_meta(options)
|
|
56
|
+
commit(:post, 'charges', post, generate_meta(options))
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def capture(money, authorization, options = {})
|
|
60
60
|
post = {:amount => amount(money)}
|
|
61
|
-
add_application_fee(post,
|
|
61
|
+
add_application_fee(post, options)
|
|
62
62
|
|
|
63
63
|
commit(:post, "charges/#{CGI.escape(authorization)}/capture", post)
|
|
64
64
|
end
|
|
@@ -71,7 +71,7 @@ module ActiveMerchant #:nodoc:
|
|
|
71
71
|
post = {:amount => amount(money)}
|
|
72
72
|
commit_options = generate_meta(options)
|
|
73
73
|
|
|
74
|
-
MultiResponse.run do |r|
|
|
74
|
+
MultiResponse.run(:first) do |r|
|
|
75
75
|
r.process { commit(:post, "charges/#{CGI.escape(identification)}/refund", post, commit_options) }
|
|
76
76
|
|
|
77
77
|
return r unless options[:refund_fee_amount]
|
|
@@ -131,7 +131,7 @@ module ActiveMerchant #:nodoc:
|
|
|
131
131
|
add_customer_data(post,options)
|
|
132
132
|
post[:description] = options[:description] || options[:email]
|
|
133
133
|
add_flags(post, options)
|
|
134
|
-
add_application_fee(post,
|
|
134
|
+
add_application_fee(post, options)
|
|
135
135
|
post
|
|
136
136
|
end
|
|
137
137
|
|
|
@@ -140,25 +140,8 @@ module ActiveMerchant #:nodoc:
|
|
|
140
140
|
post[:currency] = (options[:currency] || currency(money)).downcase
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
def add_application_fee(post,
|
|
144
|
-
|
|
145
|
-
if use_card_not_present_fee?(creditcard, options)
|
|
146
|
-
post[:application_fee] = options[:card_not_present_fee]
|
|
147
|
-
else
|
|
148
|
-
post[:application_fee] = options[:application_fee]
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def use_card_not_present_fee?(creditcard, options)
|
|
153
|
-
options[:card_not_present_fee].present? && !includes_track_data?(creditcard, options)
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
def includes_track_data?(creditcard, options)
|
|
157
|
-
if creditcard.respond_to?(:track_data)
|
|
158
|
-
creditcard.track_data.present?
|
|
159
|
-
else
|
|
160
|
-
options[:track_data].present?
|
|
161
|
-
end
|
|
143
|
+
def add_application_fee(post, options)
|
|
144
|
+
post[:application_fee] = options[:application_fee] if options[:application_fee]
|
|
162
145
|
end
|
|
163
146
|
|
|
164
147
|
def add_customer_data(post, options)
|
|
@@ -207,7 +190,7 @@ module ActiveMerchant #:nodoc:
|
|
|
207
190
|
end
|
|
208
191
|
|
|
209
192
|
def add_customer(post, options)
|
|
210
|
-
post[:customer] = options[:customer] if options[:customer] &&
|
|
193
|
+
post[:customer] = options[:customer] if options[:customer] && post[:card].blank?
|
|
211
194
|
end
|
|
212
195
|
|
|
213
196
|
def add_flags(post, options)
|
|
@@ -265,7 +248,7 @@ module ActiveMerchant #:nodoc:
|
|
|
265
248
|
}
|
|
266
249
|
end
|
|
267
250
|
|
|
268
|
-
def commit(method, url, parameters=nil, options = {}
|
|
251
|
+
def commit(method, url, parameters=nil, options = {})
|
|
269
252
|
raw_response = response = nil
|
|
270
253
|
success = false
|
|
271
254
|
begin
|
|
@@ -279,8 +262,6 @@ module ActiveMerchant #:nodoc:
|
|
|
279
262
|
response = json_error(raw_response)
|
|
280
263
|
end
|
|
281
264
|
|
|
282
|
-
response[:card_present] = includes_track_data?(creditcard, options)
|
|
283
|
-
|
|
284
265
|
card = response["card"] || response["active_card"] || {}
|
|
285
266
|
avs_code = AVS_CODE_TRANSLATOR["line1: #{card["address_line1_check"]}, zip: #{card["address_zip_check"]}"]
|
|
286
267
|
cvc_code = CVC_CODE_TRANSLATOR[card["cvc_check"]]
|
|
@@ -21,10 +21,33 @@ module ActiveMerchant #:nodoc:
|
|
|
21
21
|
raise NotImplementedError.new
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
def refund(money, identification, options = {})
|
|
25
|
+
post = {:amount => localized_amount(money)}
|
|
26
|
+
commit_options = generate_meta(options)
|
|
27
|
+
|
|
28
|
+
MultiResponse.run do |r|
|
|
29
|
+
r.process { commit(:post, "charges/#{CGI.escape(identification)}/refund", post, commit_options) }
|
|
30
|
+
|
|
31
|
+
return r unless options[:refund_fee_amount]
|
|
32
|
+
|
|
33
|
+
r.process { fetch_application_fees(identification, commit_options) }
|
|
34
|
+
r.process { refund_application_fee(options[:refund_fee_amount], application_fee_from_response(r), commit_options) }
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
24
38
|
def refund_fee(identification, options, meta)
|
|
25
39
|
raise NotImplementedError.new
|
|
26
40
|
end
|
|
27
41
|
|
|
42
|
+
def localized_amount(money, currency = self.default_currency)
|
|
43
|
+
non_fractional_currency?(currency) ? (amount(money).to_f / 100).floor : amount(money)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def add_amount(post, money, options)
|
|
47
|
+
post[:currency] = (options[:currency] || currency(money)).downcase
|
|
48
|
+
post[:amount] = localized_amount(money, post[:currency].upcase)
|
|
49
|
+
end
|
|
50
|
+
|
|
28
51
|
def json_error(raw_response)
|
|
29
52
|
msg = 'Invalid response received from the WebPay API. Please contact support@webpay.jp if you continue to receive this message.'
|
|
30
53
|
msg += " (The raw response returned by the API was #{raw_response.inspect})"
|
|
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
|
|
|
7
7
|
CODES = { "00" => "Operation completed successfully",
|
|
8
8
|
"-1" => "Unable to initialize winsock dll.",
|
|
9
9
|
"-2" => "Can't create stream socket.",
|
|
10
|
-
"-3" => "No Request Message.",
|
|
10
|
+
"-3" => "No Request Message.",
|
|
11
11
|
"-4" => "Can't connect to server.",
|
|
12
12
|
"-5" => "Send socket error.",
|
|
13
|
-
"-6" => "Couldn't receive data.",
|
|
13
|
+
"-6" => "Couldn't receive data.",
|
|
14
14
|
"-7" => "Receive Broken message.",
|
|
15
15
|
"-8" => "Unable to initialize Envirnment.",
|
|
16
16
|
"-9" => "Can't Read Server RSA File.",
|
|
@@ -52,15 +52,16 @@ module ActiveMerchant #:nodoc:
|
|
|
52
52
|
"-308" => "Order Number already exists.",
|
|
53
53
|
"positive" => "Response from Bank. Please contact with Acquirer Bank Service or HiTRUST Call Center."
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
def success?
|
|
57
57
|
params['retcode'] == SUCCESS
|
|
58
58
|
end
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
def message
|
|
61
|
+
return CODES["positive"] if params['retcode'].to_i > 0
|
|
61
62
|
CODES[ params['retcode'] ]
|
|
62
63
|
end
|
|
63
|
-
|
|
64
|
+
end
|
|
64
65
|
end
|
|
65
66
|
end
|
|
66
67
|
end
|
|
@@ -39,14 +39,18 @@ module ActiveMerchant #:nodoc:
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
class MultiResponse < Response
|
|
42
|
-
def self.run(&block)
|
|
43
|
-
new.tap(&block)
|
|
42
|
+
def self.run(primary_response = :last, &block)
|
|
43
|
+
response = new.tap(&block)
|
|
44
|
+
response.primary_response = primary_response
|
|
45
|
+
response
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
attr_reader :responses
|
|
49
|
+
attr_writer :primary_response
|
|
47
50
|
|
|
48
51
|
def initialize
|
|
49
52
|
@responses = []
|
|
53
|
+
@primary_response = :last
|
|
50
54
|
end
|
|
51
55
|
|
|
52
56
|
def process
|
|
@@ -65,10 +69,14 @@ module ActiveMerchant #:nodoc:
|
|
|
65
69
|
@responses.all?{|r| r.success?}
|
|
66
70
|
end
|
|
67
71
|
|
|
72
|
+
def primary_response
|
|
73
|
+
success? && @primary_response == :first ? @responses.first : @responses.last
|
|
74
|
+
end
|
|
75
|
+
|
|
68
76
|
%w(params message test authorization avs_result cvv_result test? fraud_review?).each do |m|
|
|
69
77
|
class_eval %(
|
|
70
78
|
def #{m}
|
|
71
|
-
(@responses.empty? ? nil :
|
|
79
|
+
(@responses.empty? ? nil : primary_response.#{m})
|
|
72
80
|
end
|
|
73
81
|
)
|
|
74
82
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activemerchant
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.38.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
|
37
37
|
Z1BvU1BxN25rK3MyRlFVQko5VVpGSzFsZ016aG8vNGZaZ3pKd2J1K2NPOFNO
|
|
38
38
|
dWFMUy9iagpoUGFTVHlWVTB5Q1Nudz09Ci0tLS0tRU5EIENFUlRJRklDQVRF
|
|
39
39
|
LS0tLS0K
|
|
40
|
-
date: 2013-
|
|
40
|
+
date: 2013-09-06 00:00:00.000000000 Z
|
|
41
41
|
dependencies:
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: activesupport
|
|
@@ -47,6 +47,9 @@ dependencies:
|
|
|
47
47
|
- - ! '>='
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
49
|
version: 2.3.14
|
|
50
|
+
- - <
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: 5.0.0
|
|
50
53
|
type: :runtime
|
|
51
54
|
prerelease: false
|
|
52
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -55,38 +58,41 @@ dependencies:
|
|
|
55
58
|
- - ! '>='
|
|
56
59
|
- !ruby/object:Gem::Version
|
|
57
60
|
version: 2.3.14
|
|
61
|
+
- - <
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: 5.0.0
|
|
58
64
|
- !ruby/object:Gem::Dependency
|
|
59
65
|
name: i18n
|
|
60
66
|
requirement: !ruby/object:Gem::Requirement
|
|
61
67
|
none: false
|
|
62
68
|
requirements:
|
|
63
|
-
- -
|
|
69
|
+
- - ~>
|
|
64
70
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: '0'
|
|
71
|
+
version: '0.5'
|
|
66
72
|
type: :runtime
|
|
67
73
|
prerelease: false
|
|
68
74
|
version_requirements: !ruby/object:Gem::Requirement
|
|
69
75
|
none: false
|
|
70
76
|
requirements:
|
|
71
|
-
- -
|
|
77
|
+
- - ~>
|
|
72
78
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '0'
|
|
79
|
+
version: '0.5'
|
|
74
80
|
- !ruby/object:Gem::Dependency
|
|
75
81
|
name: money
|
|
76
82
|
requirement: !ruby/object:Gem::Requirement
|
|
77
83
|
none: false
|
|
78
84
|
requirements:
|
|
79
|
-
- -
|
|
85
|
+
- - <
|
|
80
86
|
- !ruby/object:Gem::Version
|
|
81
|
-
version:
|
|
87
|
+
version: 6.0.0
|
|
82
88
|
type: :runtime
|
|
83
89
|
prerelease: false
|
|
84
90
|
version_requirements: !ruby/object:Gem::Requirement
|
|
85
91
|
none: false
|
|
86
92
|
requirements:
|
|
87
|
-
- -
|
|
93
|
+
- - <
|
|
88
94
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
95
|
+
version: 6.0.0
|
|
90
96
|
- !ruby/object:Gem::Dependency
|
|
91
97
|
name: builder
|
|
92
98
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -94,7 +100,10 @@ dependencies:
|
|
|
94
100
|
requirements:
|
|
95
101
|
- - ! '>='
|
|
96
102
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: 2.
|
|
103
|
+
version: 2.1.2
|
|
104
|
+
- - <
|
|
105
|
+
- !ruby/object:Gem::Version
|
|
106
|
+
version: 4.0.0
|
|
98
107
|
type: :runtime
|
|
99
108
|
prerelease: false
|
|
100
109
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -102,55 +111,58 @@ dependencies:
|
|
|
102
111
|
requirements:
|
|
103
112
|
- - ! '>='
|
|
104
113
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: 2.
|
|
114
|
+
version: 2.1.2
|
|
115
|
+
- - <
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 4.0.0
|
|
106
118
|
- !ruby/object:Gem::Dependency
|
|
107
119
|
name: json
|
|
108
120
|
requirement: !ruby/object:Gem::Requirement
|
|
109
121
|
none: false
|
|
110
122
|
requirements:
|
|
111
|
-
- -
|
|
123
|
+
- - ~>
|
|
112
124
|
- !ruby/object:Gem::Version
|
|
113
|
-
version: 1.
|
|
125
|
+
version: '1.7'
|
|
114
126
|
type: :runtime
|
|
115
127
|
prerelease: false
|
|
116
128
|
version_requirements: !ruby/object:Gem::Requirement
|
|
117
129
|
none: false
|
|
118
130
|
requirements:
|
|
119
|
-
- -
|
|
131
|
+
- - ~>
|
|
120
132
|
- !ruby/object:Gem::Version
|
|
121
|
-
version: 1.
|
|
133
|
+
version: '1.7'
|
|
122
134
|
- !ruby/object:Gem::Dependency
|
|
123
135
|
name: active_utils
|
|
124
136
|
requirement: !ruby/object:Gem::Requirement
|
|
125
137
|
none: false
|
|
126
138
|
requirements:
|
|
127
|
-
- -
|
|
139
|
+
- - ~>
|
|
128
140
|
- !ruby/object:Gem::Version
|
|
129
|
-
version:
|
|
141
|
+
version: '2.0'
|
|
130
142
|
type: :runtime
|
|
131
143
|
prerelease: false
|
|
132
144
|
version_requirements: !ruby/object:Gem::Requirement
|
|
133
145
|
none: false
|
|
134
146
|
requirements:
|
|
135
|
-
- -
|
|
147
|
+
- - ~>
|
|
136
148
|
- !ruby/object:Gem::Version
|
|
137
|
-
version:
|
|
149
|
+
version: '2.0'
|
|
138
150
|
- !ruby/object:Gem::Dependency
|
|
139
151
|
name: nokogiri
|
|
140
152
|
requirement: !ruby/object:Gem::Requirement
|
|
141
153
|
none: false
|
|
142
154
|
requirements:
|
|
143
|
-
- -
|
|
155
|
+
- - ~>
|
|
144
156
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 1.
|
|
157
|
+
version: '1.4'
|
|
146
158
|
type: :runtime
|
|
147
159
|
prerelease: false
|
|
148
160
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
161
|
none: false
|
|
150
162
|
requirements:
|
|
151
|
-
- -
|
|
163
|
+
- - ~>
|
|
152
164
|
- !ruby/object:Gem::Version
|
|
153
|
-
version: 1.
|
|
165
|
+
version: '1.4'
|
|
154
166
|
- !ruby/object:Gem::Dependency
|
|
155
167
|
name: rake
|
|
156
168
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|