Reputation: 47
I used stripe for payment but customer not created. Please help me.
customer = Stripe::Customer.create(
:card => token,
:plan => "1",
:description => email
)
Upvotes: 1
Views: 37
Reputation: 4251
Make sure you have gem 'stripe' in your Gemfile.
Then try this from your console :
require "stripe"
Stripe.api_key = "sk_test_KT791S3jh1y5t5xdnW6bjBln"
Stripe::Customer.create(
:email => '[email protected]'
:description => "Customer for [email protected]",
:metadata => {
"first_name" => "John",
"last_name" => "Pinto"
}
)
Check this link for more info on creating customer.
Upvotes: 1