Sha256: 793665baed96881c3f5d1b81194f1d0b804a7a5519af2af6b3dfc1ae9bf274d4
Contents?: true
Size: 1.38 KB
Versions: 57
Compression:
Stored size: 1.38 KB
Contents
class Caboose::PaymentProcessors::Authorizenet < Caboose::PaymentProcessors::Base def self.api(root, body, test=false) end def self.form_url(order=nil) #if Rails.env == 'development' 'https://test.authorize.net/gateway/transact.dll' #else # 'https://secure.authorize.net/gateway/transact.dll' #end end def self.authorize(order, params) order.update_attribute(:transaction_id, params[:x_trans_id]) if params[:x_trans_id] return params[:x_response_code] == '1' end def self.void(order) response = AuthorizeNet::SIM::Transaction.new( Caboose::authorize_net_login_id, Caboose::authorize_net_transaction_key, order.total, :transaction_type => 'VOID', :transaction_id => order.transaction_id ) ap response end def self.capture(order) response = AuthorizeNet::SIM::Transaction.new( Caboose::authorize_net_login_id, Caboose::authorize_net_transaction_key, order.total, :transaction_type => 'CAPTURE_ONLY', :transaction_id => order.transaction_id ) ap response end def self.refund(order) response = AuthorizeNet::SIM::Transaction.new( Caboose::authorize_net_login_id, Caboose::authorize_net_transaction_key, order.total, :transaction_type => 'CREDIT', :transaction_id => order.transaction_id ) ap response end end
Version data entries
57 entries across 57 versions & 1 rubygems