class CloudPayments::Namespaces::Cards

Public Instance Methods

auth(attributes) click to toggle source
# File lib/cloud_payments/namespaces/cards.rb, line 10
def auth(attributes)
  response = request(:auth, attributes)
  instantiate(response[:model])
end
charge(attributes) click to toggle source
# File lib/cloud_payments/namespaces/cards.rb, line 5
def charge(attributes)
  response = request(:charge, attributes)
  instantiate(response[:model])
end
post3ds(attributes) click to toggle source
# File lib/cloud_payments/namespaces/cards.rb, line 15
def post3ds(attributes)
  response = request(:post3ds, attributes)
  instantiate(response[:model])
end

Private Instance Methods

instantiate(model) click to toggle source
# File lib/cloud_payments/namespaces/cards.rb, line 22
def instantiate(model)
  if model[:pa_req]
    Secure3D.new(model)
  else
    Transaction.new(model)
  end
end