lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.42.5 vs lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.42.6
- old
+ new
@@ -265,29 +265,19 @@
private
def commit(action, money, parameters)
parameters[:amount] = amount(money) unless action == 'VOID'
- # Only activate the test_request when the :test option is passed in
- parameters[:test_request] = @options[:test] ? 'TRUE' : 'FALSE'
-
url = test? ? self.test_url : self.live_url
data = ssl_post url, post_data(action, parameters)
response = parse(data)
response[:action] = action
message = message_from(response)
- # Return the response. The authorization can be taken out of the transaction_id
- # Test Mode on/off is something we have to parse from the response text.
- # It usually looks something like this
- #
- # (TESTMODE) Successful Sale
- test_mode = test? || message =~ /TESTMODE/
-
Response.new(success?(response), message, response,
- :test => test_mode,
+ :test => test?,
:authorization => response[:transaction_id],
:fraud_review => fraud_review?(response),
:avs_result => { :code => response[:avs_result_code] },
:cvv_result => response[:card_code]
)