Skip to content

Instantly share code, notes, and snippets.

@tgoldenberg
Created May 16, 2015 23:36
Show Gist options
  • Save tgoldenberg/ad505887e6804b6b99a4 to your computer and use it in GitHub Desktop.
Save tgoldenberg/ad505887e6804b6b99a4 to your computer and use it in GitHub Desktop.
= simple_form_for @charge, remote: true do |f|
= f.hidden_field :price, value: @request.recipient.price
= f.hidden_field :description, value: @request.recipient.name
= f.hidden_field :owner_id, value: @request.recipient.id
= f.hidden_field :vendor_id, value: params[:recipient_id]
= f.submit 'Send', id: 'charge-submit'
%script{src:"https://checkout.stripe.com/checkout.js", class:"stripe-button", data: {key: ENV["stripe_publishable_key"], price:"#{@request.recipient.price*100}", name:"ChessMentor", vendor_id: "#{@request.recipient.id}", description: "#{number_to_currency(@request.recipient.price)}", image: "/assets/landing_background.png"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment