# 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
# 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
# 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
# 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
Generated with the Darkfish Rdoc Generator 2.