Skip to content

Instantly share code, notes, and snippets.

@SeraphimSerapis
Created May 19, 2015 23:08
Show Gist options
  • Save SeraphimSerapis/c7c2432326bdae6088ac to your computer and use it in GitHub Desktop.
Save SeraphimSerapis/c7c2432326bdae6088ac to your computer and use it in GitHub Desktop.
Create a new customer
result = Braintree::Customer.create(
:first_name => "John",
:last_name => "Doe",
:payment_method_nonce => params[:payment_method_nonce]
)
if result.success?
puts result.customer.id
puts result.customer.credit_cards[0].token
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment