Skip to content

Instantly share code, notes, and snippets.

@thorwebdev
Created May 15, 2016 17:26
Show Gist options
  • Save thorwebdev/65b258f0fa5805f8bd30feaa8338127f to your computer and use it in GitHub Desktop.
Save thorwebdev/65b258f0fa5805f8bd30feaa8338127f to your computer and use it in GitHub Desktop.
get '/customer/:cid' do
# Output params hash in bash
puts params.inspect
# Retrieve customer ID from params hash
cid = params[:cid]
# Retrieve customer object from Stripe API
# Store customer object in an instance variable
@customer = Stripe::Customer.retrieve(cid)
# Show customer.erb template to user
erb :customer
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment