Skip to content

Commit

Permalink
[WIP] Stripe Checkout.js form
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotsykes committed Dec 8, 2015
1 parent 898f384 commit ff21fa6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/views/pages/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
<% if user_signed_in? %>
<p>Hello, <%= current_user.email %></p>
<nav><%= button_to "Log out", destroy_user_session_path, method: :delete %></nav>

<form action="/charge" method="POST">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="<%= Rails.application.secrets.stripe_publishable_key %>"
data-label="Upgrade Membership"
data-name="RSpec Rails Examples"
data-description="Member Upgrade"
data-currency="usd"
data-amount="999">
</script>
</form>

<% else %>
<p>Not registered? <%= link_to "Sign up", new_user_registration_path %></p>
<nav>
Expand Down

0 comments on commit ff21fa6

Please sign in to comment.