Skip to content

Instantly share code, notes, and snippets.

@ornerymoose
Created March 26, 2014 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ornerymoose/9794156 to your computer and use it in GitHub Desktop.
Save ornerymoose/9794156 to your computer and use it in GitHub Desktop.
<%= form_tag charges_path(id: @cart.id) do %>
<article>
<%= number_to_currency(@cart.total_price) %>
</article>
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
data-description="One-time Charge"
data-amount="<%= @cart.total_price * 100 %>"
data-shipping-address="false"
data-billing-address="false"
data-email="">
</script>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment