Class ActiveMerchant::Billing::PaySecureGateway
In: lib/active_merchant/billing/gateways/pay_secure.rb
Parent: Gateway

Methods

new   purchase  

Constants

URL = 'https://clearance.commsecure.com.au/cgi-bin/PSDirect'
TRANSACTIONS = { :purchase => 'PURCHASE', :authorization => 'AUTHORISE', :capture => 'ADVICE', :credit => 'REFUND'   Currently Authorization and Capture is not implemented because capturing requires the original credit card information
SUCCESS = 'Accepted'
SUCCESS_MESSAGE = 'The transaction was approved'

Public Class methods

[Source]

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

Public Instance methods

[Source]

    # File lib/active_merchant/billing/gateways/pay_secure.rb, line 31
31:       def purchase(money, credit_card, options = {})
32:         requires!(options, :order_id)
33:         
34:         post = {}
35:         add_amount(post, money)
36:         add_invoice(post, options)
37:         add_credit_card(post, credit_card)        
38:              
39:         commit(:purchase, money, post)
40:       end

[Validate]