Working on new Snipt Pro flow.
parent
d93b564e0d
commit
2d80a4d594
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1928,9 +1928,9 @@ body.pro {
|
|||
div.payment-loading {
|
||||
background: rgba(#F2F2F2, .6);
|
||||
display: none;
|
||||
height: 248px;
|
||||
height: 287px;
|
||||
position: absolute;
|
||||
top: 37px;
|
||||
top: 261px;
|
||||
width: 100%;
|
||||
|
||||
span {
|
||||
|
@ -1939,7 +1939,7 @@ body.pro {
|
|||
color: #666;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin: 80px auto 0 auto;
|
||||
margin: 122px auto 0 auto;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{% block page-title %}Sign up for Snipt Pro{% endblock %}
|
||||
|
||||
{% block body-class %}{{ block.super }} static signup pro{% endblock %}
|
||||
{% block body-class %}{{ block.super }} static signup pro pro-signup{% endblock %}
|
||||
|
||||
{% block extra-scripts %}
|
||||
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
|
||||
|
@ -39,11 +39,20 @@
|
|||
<p class="sub">
|
||||
We believe the best way to build a superior product is to charge for it.
|
||||
As a paid Snipt member, you'll have unrestricted access to the app, <a href="/api/">API</a>,
|
||||
instant chat support, and more.
|
||||
custom-domain <a href="/blogging/">blogging</a>, instant chat support, and more.
|
||||
</p>
|
||||
</div>
|
||||
<div class="payment-loading"><span>Please wait…</span></div>
|
||||
<div class="payment-errors alert alert-error"></div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="name">Payment plan:</label>
|
||||
<div class="controls">
|
||||
<select name="plan" type="text" class="input-medium" id="plan">
|
||||
<option value="monthly">$5/month</option>
|
||||
<option value="yearly">$49/year</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="name">Name on card:</label>
|
||||
<div class="controls">
|
||||
|
@ -78,10 +87,8 @@
|
|||
<option value="11">11 - November</option>
|
||||
<option value="12">12 - December</option>
|
||||
</select>
|
||||
<select id="exp-year" class="span1">
|
||||
<select id="exp-year" class="span2">
|
||||
<option value="">----</option>
|
||||
<option value="2012">2012</option>
|
||||
<option value="2013">2013</option>
|
||||
<option value="2014">2014</option>
|
||||
<option value="2015">2015</option>
|
||||
<option value="2016">2016</option>
|
||||
|
@ -91,6 +98,8 @@
|
|||
<option value="2020">2020</option>
|
||||
<option value="2021">2021</option>
|
||||
<option value="2022">2022</option>
|
||||
<option value="2022">2023</option>
|
||||
<option value="2022">2024</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
{% block body-class %}{{ block.super }} static signup{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<script type="text/javascript">document.location.href = '/';</script>
|
||||
{% else %}
|
||||
<form class="form-horizontal static-box" method="post" action=".">
|
||||
{% if form.errors %}
|
||||
{% if form.non_field_errors %}
|
||||
|
@ -23,7 +26,7 @@
|
|||
<p class="sub">
|
||||
We believe the best way to build a superior product is to charge for it.
|
||||
As a paid Snipt member, you'll have unrestricted access to the app, <a href="/api/">API</a>,
|
||||
instant chat support, and more.
|
||||
custom-domain <a href="/blogging/">blogging</a>, instant chat support, and more.
|
||||
</p>
|
||||
</div>
|
||||
<div class="control-group {% if form.errors.username %}error{% endif %}">
|
||||
|
@ -85,4 +88,5 @@
|
|||
</fieldset>
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
3
views.py
3
views.py
|
@ -104,7 +104,10 @@ def pro_complete(request):
|
|||
token = request.POST['token']
|
||||
stripe.api_key = STRIPE_SECRET_KEY
|
||||
|
||||
if request.POST['plan'] == 'monthly':
|
||||
plan = 'snipt-monthly'
|
||||
elif request.POST['plan'] == 'yearly':
|
||||
plan = 'snipt-yearly'
|
||||
|
||||
try:
|
||||
customer = stripe.Customer.create(card=token,
|
||||
|
|
Loading…
Reference in New Issue