merged master
This commit is contained in:
commit
1990c4758e
11 changed files with 103 additions and 134 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Next Release
|
||||||
|
* #3785: [hosting] update 'my bills' page design
|
||||||
|
* Bugfix: [hosting] card details input form alignment fix
|
||||||
|
* #3823: [hosting] favicon link fixed
|
||||||
1.2.4: 2017-10-02
|
1.2.4: 2017-10-02
|
||||||
* #3780: [hosting] Store VM details locally
|
* #3780: [hosting] Store VM details locally
|
||||||
* #3764: [hosting] Show cancelled VMs' invoices
|
* #3764: [hosting] Show cancelled VMs' invoices
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2017-10-03 18:54+0530\n"
|
"POT-Creation-Date: 2017-10-03 23:48+0530\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -346,9 +346,6 @@ msgstr ""
|
||||||
"Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, "
|
"Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, "
|
||||||
"nachdem Du die Bestellung auf der nächsten Seite bestätigt hast."
|
"nachdem Du die Bestellung auf der nächsten Seite bestätigt hast."
|
||||||
|
|
||||||
msgid "Submit"
|
|
||||||
msgstr "Absenden"
|
|
||||||
|
|
||||||
msgid "Card Number"
|
msgid "Card Number"
|
||||||
msgstr "Kreditkartennummer"
|
msgstr "Kreditkartennummer"
|
||||||
|
|
||||||
|
@ -510,6 +507,9 @@ msgstr ""
|
||||||
#~ msgid "Some problem encountered. Please try again later."
|
#~ msgid "Some problem encountered. Please try again later."
|
||||||
#~ msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal."
|
#~ msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal."
|
||||||
|
|
||||||
|
#~ msgid "Submit"
|
||||||
|
#~ msgstr "Absenden"
|
||||||
|
|
||||||
#~ msgid "Date"
|
#~ msgid "Date"
|
||||||
#~ msgstr "Datum"
|
#~ msgstr "Datum"
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,11 @@
|
||||||
<div id='payment_error'>
|
<div id='payment_error'>
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
||||||
<ul class="list-unstyled"><li>
|
<ul class="list-unstyled">
|
||||||
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
<li>
|
||||||
</li></ul>
|
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for error in form.non_field_errors %}
|
{% for error in form.non_field_errors %}
|
||||||
|
@ -116,7 +118,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<button id="payment_button_with_creditcard" class="btn btn-success btn-vm-contact" type="submit">{%trans "Submit" %}</button>
|
<button id="payment_button_with_creditcard" class="btn btn-vm-contact" type="submit">{%trans "SUBMIT" %}</button>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form action="" id="payment-form-new" method="POST">
|
<form action="" id="payment-form-new" method="POST">
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2017-10-03 18:54+0530\n"
|
"POT-Creation-Date: 2017-10-03 23:48+0530\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -413,15 +413,10 @@ msgid "Billing Address"
|
||||||
msgstr "Rechnungsadresse"
|
msgstr "Rechnungsadresse"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"Please fill in your credit card information below. We are using <a href="
|
||||||
" Please fill in your credit card information "
|
"\"https://stripe.com\" target=\"_blank\">Stripe</a> for payment and do not "
|
||||||
"below. We are using <a\n"
|
"store your information in our database."
|
||||||
" href=\"https://stripe.com\" target="
|
|
||||||
"\"_blank\">Stripe</a> for payment and do not store\n"
|
|
||||||
" your information in our database.\n"
|
|
||||||
" "
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"\n"
|
|
||||||
"Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen <a href="
|
"Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen <a href="
|
||||||
"\"https://stripe.com\" target=\"_blank\">Stripe</a> für die Bezahlung und "
|
"\"https://stripe.com\" target=\"_blank\">Stripe</a> für die Bezahlung und "
|
||||||
"speichern keine Informationen in unserer Datenbank."
|
"speichern keine Informationen in unserer Datenbank."
|
||||||
|
@ -433,8 +428,8 @@ msgstr ""
|
||||||
"Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, "
|
"Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, "
|
||||||
"nachdem Du die Bestellung auf der nächsten Seite bestätigt hast."
|
"nachdem Du die Bestellung auf der nächsten Seite bestätigt hast."
|
||||||
|
|
||||||
msgid "Submit"
|
msgid "SUBMIT"
|
||||||
msgstr "Absenden"
|
msgstr "ABSENDEN"
|
||||||
|
|
||||||
msgid "Card Number"
|
msgid "Card Number"
|
||||||
msgstr "Kreditkartennummer"
|
msgstr "Kreditkartennummer"
|
||||||
|
@ -454,6 +449,9 @@ msgstr "Weiter"
|
||||||
msgid "Enter your credit card number"
|
msgid "Enter your credit card number"
|
||||||
msgstr "Deine Kreditkartennummer"
|
msgstr "Deine Kreditkartennummer"
|
||||||
|
|
||||||
|
msgid "Submit"
|
||||||
|
msgstr "Absenden"
|
||||||
|
|
||||||
msgid "Reset your password"
|
msgid "Reset your password"
|
||||||
msgstr "Passwort zurücksetzen"
|
msgstr "Passwort zurücksetzen"
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.dcl-payment-section p {
|
.dcl-payment-section p {
|
||||||
padding: 0 5px;
|
/*padding: 0 5px;*/
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.dcl-payment-section .card-warning-content {
|
.dcl-payment-section .card-warning-content {
|
||||||
|
@ -77,7 +77,6 @@
|
||||||
|
|
||||||
.dcl-payment-user h4 {
|
.dcl-payment-user h4 {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding-left: 5px;
|
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -618,9 +618,8 @@
|
||||||
left: 8px;
|
left: 8px;
|
||||||
}
|
}
|
||||||
.table-switch .last-td {
|
.table-switch .last-td {
|
||||||
position: absolute;
|
padding-top: 12px;
|
||||||
bottom: 13px;
|
text-align: right;
|
||||||
right: 0;
|
|
||||||
}
|
}
|
||||||
.table-switch tbody tr .xs-td-inline {
|
.table-switch tbody tr .xs-td-inline {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
|
||||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||||
<link href="//fonts.googleapis.com/css?family=Lato:300,400,500,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
|
<link href="//fonts.googleapis.com/css?family=Lato:300,400,500,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
|
||||||
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="{% static 'hosting/img/favicon.ico' %}" type="image/x-icon" />
|
||||||
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "hosting/base_short.html" %}
|
{% extends "hosting/base_short.html" %}
|
||||||
{% load staticfiles bootstrap3 %}
|
{% load staticfiles bootstrap3 %}
|
||||||
{% load i18n %}
|
{% load i18n l10n %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="dashboard-container">
|
<div class="dashboard-container">
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
<th>{% trans "Order Nr." %}</th>
|
<th>{% trans "Order Nr." %}</th>
|
||||||
<th>{% trans "Date" %}</th>
|
<th>{% trans "Date" %}</th>
|
||||||
<th>{% trans "Amount" %}</th>
|
<th>{% trans "Amount" %}</th>
|
||||||
<th>{% trans "Status" %}</th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -30,15 +29,8 @@
|
||||||
{% for order in orders %}
|
{% for order in orders %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="xs-td-inline" data-header="{% trans 'Order Nr.' %}">{{ order.id }}</td>
|
<td class="xs-td-inline" data-header="{% trans 'Order Nr.' %}">{{ order.id }}</td>
|
||||||
<td class="xs-td-bighalf" data-header="{% trans 'Date' %}">{{ order.created_at | date:"M d, Y" }}</td>
|
<td class="xs-td-bighalf" data-header="{% trans 'Date' %}">{{ order.created_at | date:"M d, Y H:i" }}</td>
|
||||||
<td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price }}</td>
|
<td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price|unlocalize }}</td>
|
||||||
<td data-header="{% trans 'Status' %}">
|
|
||||||
{% if order.approved %}
|
|
||||||
<span class="vm-status-active"><strong>{% trans "Approved" %}</strong></span>
|
|
||||||
{% else %}
|
|
||||||
<span class="vm-status-failed"><strong>{% trans "Declined" %}</strong></span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td class="text-right last-td">
|
<td class="text-right last-td">
|
||||||
<a class="btn btn-order-detail" href="{% url 'hosting:orders' order.pk %}">{% trans 'See Invoice' %}</a>
|
<a class="btn btn-order-detail" href="{% url 'hosting:orders' order.pk %}">{% trans 'See Invoice' %}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -69,83 +69,67 @@
|
||||||
<h3><b>{%trans "Credit Card"%}</b></h3>
|
<h3><b>{%trans "Credit Card"%}</b></h3>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<p>
|
||||||
<p>
|
{% blocktrans %}Please fill in your credit card information below. We are using <a href="https://stripe.com" target="_blank">Stripe</a> for payment and do not store your information in our database.{% endblocktrans %}
|
||||||
{% blocktrans %}
|
</p>
|
||||||
Please fill in your credit card information below. We are using <a
|
|
||||||
href="https://stripe.com" target="_blank">Stripe</a> for payment and do not store
|
|
||||||
your information in our database.
|
|
||||||
{% endblocktrans %}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div>
|
<div>
|
||||||
{% if credit_card_data.last4 %}
|
{% if credit_card_data.last4 %}
|
||||||
<form role="form" id="payment-form-with-creditcard" novalidate>
|
<form role="form" id="payment-form-with-creditcard" novalidate>
|
||||||
<h5 class="billing-head">Credit Card</h5>
|
<h5 class="billing-head">Credit Card</h5>
|
||||||
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
|
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
|
||||||
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
|
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
|
||||||
<input type="hidden" name="credit_card_needed" value="false"/>
|
<input type="hidden" name="credit_card_needed" value="false"/>
|
||||||
</form>
|
</form>
|
||||||
<div class="row">
|
{% if not messages and not form.non_field_errors %}
|
||||||
<div class="col-xs-12">
|
<p class="card-warning-content card-warning-addtional-margin">
|
||||||
{% if not messages and not form.non_field_errors %}
|
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
|
||||||
<p class="card-warning-content card-warning-addtional-margin">
|
</p>
|
||||||
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
|
{% endif %}
|
||||||
</p>
|
<div id='payment_error'>
|
||||||
|
{% for message in messages %}
|
||||||
|
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li>
|
||||||
|
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div id='payment_error'>
|
{% endfor %}
|
||||||
{% for message in messages %}
|
{% for error in form.non_field_errors %}
|
||||||
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
<p class="card-warning-content card-warning-error">
|
||||||
<ul class="list-unstyled"><li>
|
{{ error|escape }}
|
||||||
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
</p>
|
||||||
</li></ul>
|
{% endfor %}
|
||||||
{% endif %}
|
</div>
|
||||||
{% endfor %}
|
<div class="text-right">
|
||||||
{% for error in form.non_field_errors %}
|
<button id="payment_button_with_creditcard" class="btn btn-vm-contact" type="submit">{%trans "SUBMIT" %}</button>
|
||||||
<p class="card-warning-content card-warning-error">
|
</div>
|
||||||
{{ error|escape }}
|
{% else %}
|
||||||
</p>
|
<form action="" id="payment-form-new" method="POST">
|
||||||
{% endfor %}
|
<input type="hidden" name="token"/>
|
||||||
|
<div class="group">
|
||||||
|
<div class="credit-card-goup">
|
||||||
|
<div class="card-element card-number-element">
|
||||||
|
<label>{%trans "Card Number" %}</label>
|
||||||
|
<div id="card-number-element" class="field my-input"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-5 card-element card-expiry-element">
|
||||||
|
<label>{%trans "Expiry Date" %}</label>
|
||||||
|
<div id="card-expiry-element" class="field my-input"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-3 col-xs-offset-4 card-element card-cvc-element">
|
||||||
|
<label>{%trans "CVC" %}</label>
|
||||||
|
<div id="card-cvc-element" class="field my-input"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-element brand">
|
||||||
|
<label>{%trans "Card Type" %}</label>
|
||||||
|
<i class="pf pf-credit-card" id="brand-icon"></i>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div id="card-errors"></div>
|
||||||
<div class="col-xs-6 pull-right">
|
|
||||||
<button id="payment_button_with_creditcard" class="btn btn-success stripe-payment-btn"
|
|
||||||
type="submit">
|
|
||||||
{%trans "Submit" %}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<form action="" id="payment-form-new" method="POST">
|
|
||||||
<input type="hidden" name="token"/>
|
|
||||||
<div class="group">
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-9 credit-card-goup">
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 card-element card-number-element">
|
|
||||||
<label>{%trans "Card Number" %}</label>
|
|
||||||
<div id="card-number-element" class="field my-input"></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-5 col-sm-3 col-md-3 col-lg-3 card-element card-expiry-element">
|
|
||||||
<label>{%trans "Expiry Date" %}</label>
|
|
||||||
<div id="card-expiry-element" class="field my-input"></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-2 col-md-6 col-lg-7 hide-mobile"></div>
|
|
||||||
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-2 card-element card-cvc-element">
|
|
||||||
<label>{%trans "CVC" %}</label>
|
|
||||||
<div id="card-cvc-element" class="field my-input"></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 card-element brand">
|
|
||||||
<label>{%trans "Card Type" %}</label>
|
|
||||||
<i class="pf pf-credit-card" id="brand-icon"></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="card-errors" role="alert"></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
{% if not messages and not form.non_field_errors %}
|
{% if not messages and not form.non_field_errors %}
|
||||||
<p class="card-warning-content">
|
<p class="card-warning-content">
|
||||||
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
|
{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
|
||||||
|
@ -154,9 +138,11 @@
|
||||||
<div id='payment_error'>
|
<div id='payment_error'>
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
||||||
<ul class="list-unstyled"><li>
|
<ul class="list-unstyled">
|
||||||
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
<li>
|
||||||
</li></ul>
|
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -166,22 +152,15 @@
|
||||||
</p>
|
</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="text-right">
|
||||||
<div class="col-xs-12">
|
<button class="btn btn-vm-contact btn-wide" type="submit">{%trans "SUBMIT" %}</button>
|
||||||
<div class="col-xs-6 pull-right">
|
|
||||||
<button class="btn btn-success stripe-payment-btn" type="submit">{%trans "Submit" %}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" style="display:none;">
|
<div style="display:none;">
|
||||||
<div class="col-xs-12">
|
|
||||||
<p class="payment-errors"></p>
|
<p class="payment-errors"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</form>
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,6 +10,7 @@ from .views import (
|
||||||
HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView,
|
HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView,
|
||||||
SSHKeyChoiceView, DashboardView, SettingsView, ResendActivationEmailView)
|
SSHKeyChoiceView, DashboardView, SettingsView, ResendActivationEmailView)
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'index/?$', IndexView.as_view(), name='index'),
|
url(r'index/?$', IndexView.as_view(), name='index'),
|
||||||
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
|
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
|
||||||
|
|
|
@ -632,7 +632,6 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
if 'next' in request.session:
|
if 'next' in request.session:
|
||||||
del request.session['next']
|
del request.session['next']
|
||||||
|
|
||||||
return self.render_to_response(self.get_context_data())
|
return self.render_to_response(self.get_context_data())
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
|
@ -655,7 +654,7 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
||||||
|
|
||||||
request.session['billing_address_data'] = billing_address_data
|
request.session['billing_address_data'] = billing_address_data
|
||||||
request.session['token'] = token
|
request.session['token'] = token
|
||||||
request.session['customer'] = customer.id
|
request.session['customer'] = customer.stripe_id
|
||||||
return HttpResponseRedirect("{url}?{query_params}".format(
|
return HttpResponseRedirect("{url}?{query_params}".format(
|
||||||
url=reverse('hosting:order-confirmation'),
|
url=reverse('hosting:order-confirmation'),
|
||||||
query_params='page=payment'))
|
query_params='page=payment'))
|
||||||
|
@ -680,16 +679,12 @@ class OrdersHostingDetailView(LoginRequiredMixin,
|
||||||
context = super(DetailView, self).get_context_data(**kwargs)
|
context = super(DetailView, self).get_context_data(**kwargs)
|
||||||
obj = self.get_object()
|
obj = self.get_object()
|
||||||
owner = self.request.user
|
owner = self.request.user
|
||||||
stripe_customer_id = self.request.session.get('customer')
|
stripe_api_cus_id = self.request.session.get('customer')
|
||||||
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
|
|
||||||
stripe_utils = StripeUtils()
|
stripe_utils = StripeUtils()
|
||||||
if customer:
|
card_details = stripe_utils.get_card_details(
|
||||||
card_details = stripe_utils.get_card_details(
|
stripe_api_cus_id,
|
||||||
customer.stripe_id,
|
self.request.session.get('token')
|
||||||
self.request.session.get('token')
|
)
|
||||||
)
|
|
||||||
else:
|
|
||||||
card_details = {}
|
|
||||||
|
|
||||||
if self.request.GET.get('page') == 'payment':
|
if self.request.GET.get('page') == 'payment':
|
||||||
context['page_header_text'] = _('Confirm Order')
|
context['page_header_text'] = _('Confirm Order')
|
||||||
|
|
Loading…
Reference in a new issue