add stripe integration for safebooru

This commit is contained in:
r888888888
2015-01-22 15:55:35 -08:00
parent 447597b665
commit b2b14cba98
11 changed files with 113 additions and 24 deletions

View File

@@ -1,9 +1,10 @@
module UserUpgradesHelper
def stripe_button(desc, cost)
def stripe_button(desc, cost, user)
html = %{
<form action="#{user_upgrade_path}" method="POST" class="stripe">
<input type="hidden" name="authenticity_token" value="#{form_authenticity_token}">
#{hidden_field_tag(:desc, desc)}
#{hidden_field_tag(:user_id, user.id)}
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="#{Danbooru.config.stripe_publishable_key}"