Merge branch 'coinbase'
This commit is contained in:
8
app/views/user_upgrades/_coinbase_payment.html.erb
Normal file
8
app/views/user_upgrades/_coinbase_payment.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<p>You can pay with Bitcoin. You will pay either $20 USD or $40 USD equivalent in Bitcoin. Danbooru uses <a href="https://www.coinbase.com">Coinbase</a> as a payment intermediary so none of your personal information will be stored on the site.</p>
|
||||
|
||||
<% if CurrentUser.user.level < User::Levels::GOLD %>
|
||||
<%= raw coinbase.create_button("Upgrade to Gold", 20.to_money("USD"), "Upgrade your Basic Account to a Gold Account", encrypt_custom(User::Levels::GOLD), :button => {:style => "custom_small", :text => "Upgrade to Gold", :callback_url => user_upgrade_path(:only_path => false, :host => Danbooru.config.hostname, :protocol => "https")}).embed_html %>
|
||||
<%= raw coinbase.create_button("Upgrade to Platinum", 40.to_money("USD"), "Upgrade your Basic Account to a Platinum Account", encrypt_custom(User::Levels::PLATINUM), :button => {:style => "custom_small", :text => "Upgrade to Platinum", :callback_url => user_upgrade_path(:only_path => false, :host => Danbooru.config.hostname, :protocol => "https")}).embed_html %>
|
||||
<% elsif CurrentUser.level < User::Levels::PLATINUM %>
|
||||
<%= raw coinbase.create_button("Upgrade to Platinum", 20.to_money("USD"), "Upgrade your Gold Account to a Platinum Account", encrypt_custom(User::Levels::PLATINUM), :button => {:style => "custom_small", :text => "Upgrade to Platinum", :callback_url => user_upgrade_path(:only_path => false, :host => Danbooru.config.hostname, :protocol => "https")}).embed_html %>
|
||||
<% end %>
|
||||
@@ -1,8 +0,0 @@
|
||||
<p><strong>Upgrading from Gold to Platinum will only cost $20.</strong> If you have any further questions or concerns, feel free to contact me at <%= mail_to Danbooru.config.contact_email, nil, :encode => :javascript %>.</p>
|
||||
|
||||
<% if CurrentUser.user.level < User::Levels::GOLD %>
|
||||
<%= stripe_button("Upgrade to Gold", 2000) %>
|
||||
<%= stripe_button("Upgrade to Platinum", 4000) %>
|
||||
<% elsif CurrentUser.user.level < User::Levels::PLATINUM %>
|
||||
<%= stripe_button("Upgrade Gold to Platinum", 2000) %>
|
||||
<% end %>
|
||||
@@ -1,4 +0,0 @@
|
||||
<!--
|
||||
<p>You can upgrade your account at <%= link_to "Safebooru", new_user_upgrade_path(:protocol => "https", :host => "safebooru.donmai.us", :only_path => false), :target => "_blank" %>.</p>
|
||||
-->
|
||||
<p>Account upgrades are presently not available.</p>
|
||||
@@ -83,10 +83,8 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% if CurrentUser.safe_mode? %>
|
||||
<%= render "stripe_payment" %>
|
||||
<% else %>
|
||||
<%= render "unavailable_payment" %>
|
||||
<% if Danbooru.config.coinbase_api_key %>
|
||||
<%= render "coinbase_payment" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<div id="c-users">
|
||||
<div id="a-upgrade-result">
|
||||
<% if flash[:disable] %>
|
||||
<p>You can upgrade your account at <%= link_to "Safebooru", new_user_upgrade_path(:protocol => "https", :host => "safebooru.donmai.us", :only_path => false) %>.</p>
|
||||
<% elsif flash[:success] %>
|
||||
<% if flash[:success] %>
|
||||
<h1>Congradulations!</h1>
|
||||
|
||||
<p>You are now a <%= CurrentUser.user.level_string %> level account. Thanks for supporting the site!</p>
|
||||
|
||||
Reference in New Issue
Block a user