Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::PlugnpayGateway

Public Class Methods

new(options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 102
def initialize(options = {})
  requires!(options, :login, :password)
  @options = options
  super
end

Public Instance Methods

authorize(money, creditcard, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 121
def authorize(money, creditcard, options = {})
  post = PlugnpayPostData.new
  
  add_amount(post, money, options)
  add_creditcard(post, creditcard)        
  add_addresses(post, options)
  add_invoice_data(post, options)        
  add_customer_data(post, options)
  
  post[:authtype] = 'authonly'
  commit(:authorization, post)
end
capture(money, authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 134
def capture(money, authorization, options = {})
  post = PlugnpayPostData.new
  
  post[:orderID] = authorization
  
  add_amount(post, money, options)
  add_customer_data(post, options)
   
  commit(:capture, post)
end
credit(money, identification_or_creditcard, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 154
def credit(money, identification_or_creditcard, options = {})
  post = PlugnpayPostData.new
  add_amount(post, money, options)
 
  if identification_or_creditcard.is_a?(String)
    deprecated CREDIT_DEPRECATION_MESSAGE
    refund(money, identification_or_creditcard, options)
  else
    add_creditcard(post, identification_or_creditcard)        
    add_addresses(post, options)   
    add_customer_data(post, options) 
    
    commit(:credit, post)
  end
end
purchase(money, creditcard, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 108
def purchase(money, creditcard, options = {})
  post = PlugnpayPostData.new
  
  add_amount(post, money, options)
  add_creditcard(post, creditcard)
  add_addresses(post, options)
  add_invoice_data(post, options)
  add_customer_data(post, options)
   
  post[:authtype] = 'authpostauth'
  commit(:authorization, post)
end
refund(money, reference, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 170
def refund(money, reference, options = {})
  post = PlugnpayPostData.new
  add_amount(post, money, options)
  post[:orderID] = reference
  commit(:refund, post)
end
void(authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/plugnpay.rb, line 145
def void(authorization, options = {})
  post = PlugnpayPostData.new
  
  post[:orderID] = authorization
  post[:txn_type] = 'auth'
  
  commit(:void, post)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.