Method: ActiveMerchant::Billing::MerchantWareVersionFourGateway#purchase
- Defined in:
- lib/active_merchant/billing/gateways/merchant_ware_version_four.rb
#purchase(money, payment_source, options = {}) ⇒ Object
Authorize and immediately capture funds from a credit card.
Parameters
-
money
- The amount to be authorized as anInteger value in cents. -
payment_source
- The CreditCard details or ‘token’ from prior transaction -
options
-
:order_id
- A unique reference for this order (required). -
:billing_address
- The billing address for the cardholder.
-
63 64 65 66 67 |
# File 'lib/active_merchant/billing/gateways/merchant_ware_version_four.rb', line 63 def purchase(money, payment_source, = {}) action = payment_source.is_a?(String) ? :reference_purchase : :purchase request = build_purchase_request(action, money, payment_source, ) commit(action, request) end |