activemerchant 1.38.0 → 1.38.1
Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
= ActiveMerchant CHANGELOG
|
2
2
|
|
3
|
+
== Version 1.38.1 (September 16, 2013)
|
4
|
+
|
5
|
+
* Moneris: Remove verification_value support [melari]
|
6
|
+
|
3
7
|
== Version 1.38.0 (September 6, 2013)
|
4
8
|
|
5
9
|
* FirstData E4: Include missing address information for AVS and CVV [melari]
|
@@ -20,6 +24,7 @@
|
|
20
24
|
* MerchantWarrior: Send the CVV to the gateway [duff]
|
21
25
|
* PayU: Fix a major bug with status types [melari]
|
22
26
|
* SecureNet: Allow production transactions [duff]
|
27
|
+
* Stripe: Allow a card_not_present_fee to be specified [melari]
|
23
28
|
|
24
29
|
== Version 1.36.0 (August 2, 2013)
|
25
30
|
|
@@ -128,7 +128,6 @@ 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?
|
132
131
|
end
|
133
132
|
end
|
134
133
|
|
@@ -156,7 +155,6 @@ module ActiveMerchant #:nodoc:
|
|
156
155
|
|
157
156
|
Response.new(successful?(response), message_from(response[:message]), response,
|
158
157
|
:test => test?,
|
159
|
-
:cvv_result => response[:cvd_result_code].try(:last),
|
160
158
|
:authorization => authorization_from(response)
|
161
159
|
)
|
162
160
|
end
|
@@ -194,35 +192,14 @@ module ActiveMerchant #:nodoc:
|
|
194
192
|
root = xml.add_element("request")
|
195
193
|
root.add_element("store_id").text = options[:login]
|
196
194
|
root.add_element("api_token").text = options[:password]
|
197
|
-
root.add_element(
|
198
|
-
|
199
|
-
xml.to_s
|
200
|
-
end
|
201
|
-
|
202
|
-
def transaction_element(action, parameters)
|
203
|
-
transaction = REXML::Element.new(action)
|
195
|
+
transaction = root.add_element(action)
|
204
196
|
|
205
197
|
# Must add the elements in the correct order
|
206
198
|
actions[action].each do |key|
|
207
|
-
|
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
|
199
|
+
transaction.add_element(key.to_s).text = parameters[key] unless parameters[key].blank?
|
212
200
|
end
|
213
201
|
|
214
|
-
|
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
|
202
|
+
xml.to_s
|
226
203
|
end
|
227
204
|
|
228
205
|
def message_from(message)
|
@@ -242,8 +219,8 @@ module ActiveMerchant #:nodoc:
|
|
242
219
|
|
243
220
|
def actions
|
244
221
|
{
|
245
|
-
"purchase" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type
|
246
|
-
"preauth" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type
|
222
|
+
"purchase" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
|
223
|
+
"preauth" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
|
247
224
|
"command" => [:order_id],
|
248
225
|
"refund" => [:order_id, :amount, :txn_number, :crypt_type],
|
249
226
|
"indrefund" => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
|
@@ -47,11 +47,11 @@ module ActiveMerchant #:nodoc:
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def amount=(money)
|
50
|
-
|
51
|
-
if money.is_a?(String) or
|
50
|
+
@amount_in_cents = money.respond_to?(:cents) ? money.cents : money
|
51
|
+
if money.is_a?(String) or @amount_in_cents.to_i < 0
|
52
52
|
raise ArgumentError, "money amount must be either a Money object or a positive integer in cents."
|
53
53
|
end
|
54
|
-
add_field mappings[:amount], sprintf("%.2f",
|
54
|
+
add_field mappings[:amount], sprintf("%.2f", @amount_in_cents.to_f/100)
|
55
55
|
end
|
56
56
|
|
57
57
|
def currency(symbol)
|
@@ -103,7 +103,7 @@ module ActiveMerchant #:nodoc:
|
|
103
103
|
components = [merchant_key]
|
104
104
|
components << fields[mappings[:account]]
|
105
105
|
components << fields[mappings[:order]]
|
106
|
-
components << amount_in_cents
|
106
|
+
components << amount_in_cents.to_s.gsub(/[.,]/, '')
|
107
107
|
components << fields[mappings[:currency]]
|
108
108
|
components.join
|
109
109
|
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.38.
|
4
|
+
version: 1.38.1
|
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-09-
|
40
|
+
date: 2013-09-16 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: activesupport
|
metadata.gz.sig
CHANGED
Binary file
|