Yearly account option
parent
63f066428c
commit
1fafc99191
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1890,7 +1890,7 @@ body.pro {
|
|||
div.payment-loading {
|
||||
background: rgba(#F2F2F2, .6);
|
||||
display: none;
|
||||
height: 202px;
|
||||
height: 248px;
|
||||
position: absolute;
|
||||
top: 37px;
|
||||
width: 100%;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
{% block content %}
|
||||
<section class="snipts" id="snipts">
|
||||
{% if not request.user.profile.is_pro %}
|
||||
<div class="alert alert-info site-notice">Announcing <a href="/pro/">Snipt Pro</a>. Support Snipt and get exclusive features for only $4/month.</div>
|
||||
<div class="alert alert-info site-notice"><a href="/pro/">Snipt Pro</a>: Support the development of Snipt and get exclusive features for only $4/month or $40/year.</div>
|
||||
{% endif %}
|
||||
{% with 'true' as detail %}
|
||||
{% include "snipts/snipt-list.html" %}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{% block content %}
|
||||
<section class="snipts" id="snipts">
|
||||
{% if not request.user.profile.is_pro %}
|
||||
<div class="alert alert-info site-notice">Announcing <a href="/pro/">Snipt Pro</a>. Support the development of Snipt and get exclusive features for only $4/month.</div>
|
||||
<div class="alert alert-info site-notice"><a href="/pro/">Snipt Pro</a>: Support the development of Snipt and get exclusive features for only $4/month or $40/year.</div>
|
||||
{% endif %}
|
||||
{% autopaginate snipts 10 %}
|
||||
{% for snipt in snipts %}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<h2>Snipt <span class="pro">Pro</span> members</h2>
|
||||
<p><strong>Congratulations!</strong> You're now a Snipt Pro.</p>
|
||||
<p>You should <a target="blank" href="http://twitter.com/intent/tweet?text=I'm now a @Snipt Pro. Are you? https://snipt.net/pro/">tell the world</a>. If you ever need anything at all, <a href="mailto:nick@snipt.net">email Nick</a> directly.</p>
|
||||
<p>We'll bill you again (for $19 USD) exactly one year from now. We'll give you a heads up.</p>
|
||||
<p>Also, you rock. :)</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -27,8 +27,17 @@
|
|||
<form class="form-horizontal" id="pro-signup" method="post" action="/pro/signup/complete/">
|
||||
<fieldset>
|
||||
<div class="payment-loading"><span>Please wait…</span></div>
|
||||
<legend>$4 USD will be charged to your card monthly. Also, you rock. Tell yourself that every month, too.</legend>
|
||||
<legend>You're awesome.</legend>
|
||||
<div class="payment-errors alert alert-error"></div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="plan">Billing plan:</label>
|
||||
<div class="controls">
|
||||
<select id="plan" name="plan">
|
||||
<option value="pro-monthly">$4/month</option>
|
||||
<option value="pro-yearly">$40/year (savings of $8)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="name">Name on card:</label>
|
||||
<div class="controls">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
{% if request.user.profile.is_pro %}
|
||||
<h3>You're already a Pro. You know that ;)</h3>
|
||||
{% else %}
|
||||
<h3>Pro accounts are just $4/month.</h3>
|
||||
<h3>Pro accounts are just $4/month or $40/year.</h3>
|
||||
<h4><a href="/pro/signup/" class="btn btn-large btn-success">Sign Up Now</a></h4>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
8
views.py
8
views.py
|
@ -106,9 +106,15 @@ def pro_signup_complete(request):
|
|||
token = request.POST['token']
|
||||
stripe.api_key = '5XchbRsWVbksTRWSX67kOdBnCf01DxSh'
|
||||
|
||||
plan = 'snipt-pro-monthly'
|
||||
|
||||
if 'plan' in request.POST:
|
||||
if request.POST['plan'] == 'pro-yearly':
|
||||
plan = 'snipt-pro-yearly'
|
||||
|
||||
customer = stripe.Customer.create(
|
||||
card = token,
|
||||
plan = 'snipt-pro-monthly',
|
||||
plan = plan,
|
||||
email = request.user.email
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue