Method: ActiveMerchant::Billing::PinGateway#store

Defined in:
lib/active_merchant/billing/gateways/pin.rb

#store(payment_method, options = {}) ⇒ Object

Create a customer and associated payment method. The token that is returned can be used instead of a payment method parameter in the purchase method



43
44
45
46
47
48
49
50
# File 'lib/active_merchant/billing/gateways/pin.rb', line 43

def store(payment_method, options = {})
  post = {}

  add_payment_method(post, payment_method)
  add_customer_data(post, options)
  add_address(post, payment_method, options)
  commit(:post, 'customers', post, options)
end