lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.14.0 vs lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.15.0
- old
+ new
@@ -24,19 +24,19 @@
# Information about ARB is available on the {Authorize.Net website}[http://www.authorize.net/solutions/merchantsolutions/merchantservices/automatedrecurringbilling/].
# Information about the ARB API is available at the {Authorize.Net Integration Center}[http://developer.authorize.net/]
class AuthorizeNetGateway < Gateway
API_VERSION = '3.1'
- class_inheritable_accessor :test_url, :live_url, :arb_test_url, :arb_live_url
+ class_attribute :test_url, :live_url, :arb_test_url, :arb_live_url
self.test_url = "https://test.authorize.net/gateway/transact.dll"
self.live_url = "https://secure.authorize.net/gateway/transact.dll"
self.arb_test_url = 'https://apitest.authorize.net/xml/v1/request.api'
self.arb_live_url = 'https://api.authorize.net/xml/v1/request.api'
- class_inheritable_accessor :duplicate_window
+ class_attribute :duplicate_window
APPROVED, DECLINED, ERROR, FRAUD_REVIEW = 1, 2, 3, 4
RESPONSE_CODE, RESPONSE_REASON_CODE, RESPONSE_REASON_TEXT = 0, 2, 3
AVS_RESULT_CODE, TRANSACTION_ID, CARD_CODE_RESPONSE_CODE = 5, 6, 38
@@ -129,10 +129,11 @@
# ==== Parameters
#
# * <tt>authorization</tt> - The authorization returned from the previous authorize request.
def void(authorization, options = {})
post = {:trans_id => authorization}
+ add_duplicate_window(post)
commit('VOID', nil, post)
end
# Refund a transaction.
#
@@ -153,9 +154,10 @@
post = { :trans_id => identification,
:card_num => options[:card_number]
}
add_invoice(post, options)
+ add_duplicate_window(post)
commit('CREDIT', money, post)
end
def credit(money, identification, options = {})