Class ActiveMerchant::Billing::NetbillingGateway
In: lib/active_merchant/billing/gateways/netbilling.rb
Parent: Gateway

Methods

authorize   capture   new   purchase   test?  

Constants

URL = 'https://secure.netbilling.com:1402/gw/sas/direct3.1'
TRANSACTIONS = { :authorization => 'A', :purchase => 'S', :referenced_credit => 'R', :unreferenced_credit => 'C', :capture => 'D'
SUCCESS_CODES = [ '1', 'T' ]
SUCCESS_MESSAGE = 'The transaction was approved'
FAILURE_MESSAGE = 'The transaction failed'
TEST_LOGIN = '104901072025'

Public Class methods

[Source]

    # File lib/active_merchant/billing/gateways/netbilling.rb, line 24
24:       def initialize(options = {})
25:         requires!(options, :login)
26:         @options = options
27:         super
28:       end

Public Instance methods

[Source]

    # File lib/active_merchant/billing/gateways/netbilling.rb, line 30
30:       def authorize(money, credit_card, options = {})
31:         post = {}
32:         add_amount(post, money)
33:         add_invoice(post, options)
34:         add_credit_card(post, credit_card)        
35:         add_address(post, credit_card, options)        
36:         add_customer_data(post, options)
37:         
38:         commit(:authorization, money, post)
39:       end

[Source]

    # File lib/active_merchant/billing/gateways/netbilling.rb, line 52
52:       def capture(money, authorization, options = {})
53:         post = {}
54:         add_reference(post, authorization)
55:         commit(:capture, money, post)
56:       end

[Source]

    # File lib/active_merchant/billing/gateways/netbilling.rb, line 41
41:       def purchase(money, credit_card, options = {})
42:         post = {}
43:         add_amount(post, money)
44:         add_invoice(post, options)
45:         add_credit_card(post, credit_card)        
46:         add_address(post, credit_card, options)        
47:         add_customer_data(post, options)
48:              
49:         commit(:purchase, money, post)
50:       end

[Source]

    # File lib/active_merchant/billing/gateways/netbilling.rb, line 58
58:       def test?
59:         @options[:login] == TEST_LOGIN || super
60:       end

[Validate]