tomriley-active_merchant 1.4.2.10 → 1.4.2.11
Sign up to get free protection for your applications and to get access to all the features.
data/active_merchant.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "tomriley-active_merchant"
|
3
|
-
s.version = "1.4.2.
|
3
|
+
s.version = "1.4.2.11"
|
4
4
|
s.date = "2009-01-12"
|
5
5
|
s.summary = "Active Merchant is a simple payment abstraction library used in and sponsored by Shopify."
|
6
6
|
s.homepage = "http://www.activemerchant.org/"
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
|
11
11
|
APPROVED = 'OK'
|
12
12
|
REGISTERED = 'REGISTERED'
|
13
|
-
|
13
|
+
AUTHENTICATED = 'AUTHENTICATED'
|
14
14
|
|
15
15
|
TRANSACTIONS = {
|
16
16
|
:purchase => 'PAYMENT',
|
@@ -290,7 +290,7 @@ module ActiveMerchant #:nodoc:
|
|
290
290
|
def commit(action, parameters)
|
291
291
|
response = parse( ssl_post(url_for(action), post_data(action, parameters)) )
|
292
292
|
|
293
|
-
Response.new([APPROVED, REGISTERED,
|
293
|
+
Response.new([APPROVED, REGISTERED, AUTHENTICATED].include?(response['Status']), message_from(response), response,
|
294
294
|
:test => test?,
|
295
295
|
:authorization => authorization_from(response, parameters, action),
|
296
296
|
:avs_result => {
|
@@ -349,7 +349,7 @@ module ActiveMerchant #:nodoc:
|
|
349
349
|
end
|
350
350
|
|
351
351
|
def message_from(response)
|
352
|
-
[APPROVED, REGISTERED,
|
352
|
+
[APPROVED, REGISTERED, AUTHENTICATED].include?(response['Status']) ? 'Success' : (response['StatusDetail'] || 'Unspecified error') # simonr 20080207 can't actually get non-nil blanks, so this is shorter
|
353
353
|
end
|
354
354
|
|
355
355
|
def post_data(action, parameters = {})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tomriley-active_merchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 97
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
9
|
- 2
|
10
|
-
-
|
11
|
-
version: 1.4.2.
|
10
|
+
- 11
|
11
|
+
version: 1.4.2.11
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Tobias Luetke
|