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



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

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

#optionsObject



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

def options
  super().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