Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::PaystationGateway

Constants

SUCCESSFUL_FUTURE_PAYMENT

an “error code” of “34” means “Future Payment Stored OK”

SUCCESSFUL_RESPONSE_CODE

an “error code” of “0” means “No error - transaction successful”

URL

Public Class Methods

new(options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/paystation.rb, line 25
def initialize(options = {})
  # You need to pass your Paystation ID and Gateway ID
  requires!(options, :paystation_id, :gateway_id)
  @options = options
  super
end

Public Instance Methods

authorize(money, credit_card, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/paystation.rb, line 32
def authorize(money, credit_card, options = {})
  post = new_request
  
  add_invoice(post, options)
  add_amount(post, money, options)
  
  add_credit_card(post, credit_card)
  
  add_authorize_flag(post, options)
  
  commit(post)
end
capture(money, authorization_token, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/paystation.rb, line 45
def capture(money, authorization_token, options = {})
  post = new_request
  
  add_invoice(post, options)
  add_amount(post, money, options)
  
  add_authorization_token(post, authorization_token, options[:credit_card_verification])
  
  commit(post)
end
purchase(money, payment_source, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/paystation.rb, line 56
def purchase(money, payment_source, options = {})
  post = new_request
  
  add_invoice(post, options)
  add_amount(post, money, options)
  
  if payment_source.is_a?(String)
    add_token(post, payment_source)        
  else
    add_credit_card(post, payment_source)
  end
  
  add_customer_data(post, options) if options.has_key?(:customer)
  
  commit(post)
end
store(credit_card, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/paystation.rb, line 73
def store(credit_card, options = {})
  post = new_request
  
  add_invoice(post, options)
  add_credit_card(post, credit_card)
  store_credit_card(post, options)
  
  commit(post)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.