patmaddox-activemerchant 1.4.2.1 → 1.4.2.2
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/Rakefile
CHANGED
|
@@ -7,7 +7,7 @@ require 'rake/contrib/rubyforgepublisher'
|
|
|
7
7
|
require File.join(File.dirname(__FILE__), 'lib', 'support', 'gateway_support')
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
PKG_VERSION = "1.4.2.
|
|
10
|
+
PKG_VERSION = "1.4.2.2"
|
|
11
11
|
PKG_NAME = "patmaddox-activemerchant"
|
|
12
12
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
|
13
13
|
|
|
@@ -642,8 +642,8 @@ module ActiveMerchant #:nodoc:
|
|
|
642
642
|
|
|
643
643
|
authorization = response_params['customer_profile_id']
|
|
644
644
|
authorization ||= response_params['profile']['customer_profile_id'] if response_params['profile']
|
|
645
|
-
if authorization.nil? && response_params['direct_response']
|
|
646
|
-
direct_response = parse_direct_response(response_params['direct_response'])
|
|
645
|
+
if authorization.nil? && response_params['direct_response'] || response_params['validation_direct_response']
|
|
646
|
+
direct_response = parse_direct_response(response_params['direct_response'] || response_params['validation_direct_response'])
|
|
647
647
|
authorization = direct_response['approval_code']
|
|
648
648
|
end
|
|
649
649
|
|
|
@@ -169,14 +169,15 @@ class AuthorizeNetCimTest < Test::Unit::TestCase
|
|
|
169
169
|
|
|
170
170
|
assert response = @gateway.create_customer_payment_profile(
|
|
171
171
|
:customer_profile_id => @customer_profile_id,
|
|
172
|
-
:payment_profile => payment_profile
|
|
172
|
+
:payment_profile => payment_profile,
|
|
173
|
+
:validation_mode => :test
|
|
173
174
|
)
|
|
174
175
|
|
|
175
176
|
assert response.test?
|
|
176
177
|
assert_success response
|
|
177
|
-
assert_nil response.authorization
|
|
178
178
|
assert customer_payment_profile_id = response.params['customer_payment_profile_id']
|
|
179
179
|
assert customer_payment_profile_id =~ /\d+/, "The customerPaymentProfileId should be numeric. It was #{customer_payment_profile_id}"
|
|
180
|
+
assert_not_nil response.params['direct_response']
|
|
180
181
|
end
|
|
181
182
|
|
|
182
183
|
def test_successful_create_customer_payment_profile_request_with_bank_account
|