Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::WorldpayGateway

Public Class Methods

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

Public Instance Methods

authorize(money, payment_method, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/worldpay.rb, line 34
def authorize(money, payment_method, options = {})
  requires!(options, :order_id)
  commit 'authorize', build_authorization_request(money, payment_method, options)
end
capture(money, authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/worldpay.rb, line 39
def capture(money, authorization, options = {})
  response = MultiResponse.new
  response << inquire(authorization, options) unless options[:authorization_validated]
  response << commit('capture', build_capture_request(money, authorization, options)) if response.success?
  response
end
purchase(money, payment_method, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/worldpay.rb, line 27
def purchase(money, payment_method, options = {})
  response = MultiResponse.new
  response << authorize(money, payment_method, options)
  response << capture(money, response.authorization, :authorization_validated => true) if response.success?
  response
end
refund(money, authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/worldpay.rb, line 53
def refund(money, authorization, options = {})
  response = MultiResponse.new
  response << inquire(authorization, options)
  response << commit('refund', build_refund_request(money, authorization, options)) if response.success?
  response        
end
void(authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/worldpay.rb, line 46
def void(authorization, options = {})
  response = MultiResponse.new
  response << inquire(authorization, options)
  response << commit('cancel', build_void_request(authorization, options)) if response.success?
  response        
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.