Advertisement
wrumble

Untitled

Jan 17th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.39 KB | None | 0 0
  1. post '/account/id/save' do
  2.   p params
  3.   begin
  4.     account = Stripe::Account.retrieve(params[:stripe_account])
  5.     account.legal_entity.verification.document = params[:file_id]
  6.     p account
  7.     account.save
  8.     p account
  9.   rescue Stripe::StripeError => e
  10.     status 402
  11.     return "Error saving verification id to account: #{e.message}"
  12.   end
  13.   status 200
  14.   return account.to_json
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement