Class: Gateway::AuthorizeNet

Inherits:
Gateway
  • Object
show all
Defined in:
app/models/spree/gateway/authorize_net.rb

Instance Method Summary collapse

Instance Method Details

#credit(amount, response_code, refund, gateway_options = {}) ⇒ Object



15
16
17
18
# File 'app/models/spree/gateway/authorize_net.rb', line 15

def credit(amount, response_code, refund, gateway_options = {})
  gateway_options[:card_number] = refund[:originator].payment.source.last_digits
  auth_net_gateway.refund(amount, response_code, gateway_options)
end

#options_with_test_preferenceObject



10
11
12
# File 'app/models/spree/gateway/authorize_net.rb', line 10

def options_with_test_preference
  options_without_test_preference.merge(test: self.preferred_test_mode)
end

#provider_classObject



6
7
8
# File 'app/models/spree/gateway/authorize_net.rb', line 6

def provider_class
  ActiveMerchant::Billing::AuthorizeNetGateway
end