Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- post '/account/id' do
- begin
- p params
- path = File.dirname(__FILE__)
- image = Image.new(file: params[:file])
- image.save
- file = Stripe::FileUpload.create(
- {
- :purpose => params[:purpose],
- :file => File.new("#{path}#{image.file.url}")
- },
- {
- :stripe_account => params[:stripe_account]
- }
- )
- rescue Stripe::StripeError => e
- status 402
- return "Error saving verification id to account: #{e.message}"
- end
- status 200
- return file.to_json
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement