lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.28.0 vs lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.29.0
- old
+ new
@@ -70,11 +70,10 @@
# * <tt>:password</tt> -- The Authorize.Net Transaction Key. (REQUIRED)
# * <tt>:test</tt> -- +true+ or +false+. If true, perform transactions against the test server.
# Otherwise, perform transactions against the production server.
def initialize(options = {})
requires!(options, :login, :password)
- @options = options
super
end
# Performs an authorization, which reserves the funds on the customer's credit card, but does not
# charge the card.
@@ -120,10 +119,11 @@
# * <tt>money</tt> -- The amount to be captured as an Integer value in cents.
# * <tt>authorization</tt> -- The authorization returned from the previous authorize request.
def capture(money, authorization, options = {})
post = {:trans_id => authorization}
add_customer_data(post, options)
+ add_invoice(post, options)
commit('PRIOR_AUTH_CAPTURE', money, post)
end
# Void a previous transaction
#
@@ -266,10 +266,11 @@
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 = 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.