Modified payment.html to include credit card number , cvv and year as separate Stripe elements

This commit is contained in:
PCoder 2017-07-16 03:38:48 +05:30
parent 481dadcfe5
commit 2bd5702b09

View file

@ -2,46 +2,49 @@
{% load staticfiles bootstrap3 i18n %} {% load staticfiles bootstrap3 i18n %}
{% block content %} {% block content %}
<!-- Credit card form --> <!-- Credit card form -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css" />
<div class="dcl-order-container container"> <div class="dcl-order-container container">
<div class="payment-container"> <div class="payment-container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-sec"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-sec">
<h3><strong>Your Order</strong></h3> <h3><strong>{%trans "Your Order" %}</strong></h3>
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-header"> <div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-header">
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 tbl-header"> <div class="col-xs-12 col-sm-1 col-md-1 col-lg-1 tbl-header">
Cores {%trans "Cores" %}
</div> </div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
Memory {%trans "Memory" %}
</div> </div>
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 tbl-header"> <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-header">
Disk space {%trans "Disk space" %}
</div> </div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
Configuration {%trans "Configuration" %}
</div> </div>
</div> </div>
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-content"> <div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-content">
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 tbl-content"> <div class="col-xs-12 col-sm-1 col-md-1 col-lg-1 tbl-content">
1 {{request.session.specs.cpu|floatformat}}
</div> </div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
2 GB {{request.session.specs.memory|floatformat}} GB
</div> </div>
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 tbl-content"> <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-content">
10 GB {{request.session.specs.disk_size|floatformat}} GB
</div> </div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
CentOS 7 {{request.session.template.name}}
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-table-total"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-table-total">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-tot tbl-no-padding"> <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-tot tbl-no-padding">
Total <span>including VAT</span> Total <span>{%trans "including VAT" %}</span>
</div> </div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding"> <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"></div> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"></div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-total">15CHF</div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-total">{{request.session.specs.price}}
CHF
</div>
</div> </div>
</div> </div>
</div> </div>
@ -64,11 +67,13 @@
<hr> <hr>
<div> <div>
<div> <div>
<p>{% trans 'Please fill in your credit card information below. We are using <a <p>
href="https://stripe.com" target="_blank">Stripe</a> for payment and do not {% blocktrans %}
store Please fill in your credit card information below. We are using <a
your href="https://stripe.com" target="_blank">Stripe</a> for payment and do not store
information in our database.' %}</p> your information in our database.
{% endblocktrans %}
</p>
</div> </div>
<br> <br>
<div> <div>
@ -81,14 +86,12 @@
</form> </form>
<div class="row"> <div class="row">
<br> <div class="col-xs-12">
<div class="col-xs-12>
<p> <p>
{% trans " You are not making any payment yet. After submitting your card {% blocktrans %}
information, You are not making any payment yet. After submitting your card
you information, you will be taken to the Confirm Order Page.
will be taken to the Confirm Order Page. {% endblocktrans %}
" %}
</p> </p>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
@ -112,18 +115,44 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="form-group col-xs-12">
<div id="new-card-element">
<!-- a Stripe Element will be inserted here. -->
<form action="" method="POST">
<input type="hidden" name="token" />
<div class="group">
<div class="brand"><i class="pf pf-credit-card" id="brand-icon"></i></div>
<div class="card-number-element">
<div id="card-number-element" class="field"></div>
</div>
<div class="card-expiry-element">
<div id="card-expiry-element" class="field"></div>
</div>
<div class="card-cvc-element">
<div id="card-cvc-element" class="field"></div>
</div>
</div>
<div class="outcome">
<div class="error"></div>
</div>
</form>
</div>
</div>
</div>
<div id="card-errors" role="alert"></div> <div id="card-errors" role="alert"></div>
<div class="row"> <div class="row">
<br>
<div class="col-xs-12"> <div class="col-xs-12">
<p style="font-family: Lato;border: 1px solid #a1a1a1;border-radius: 3px; padding: 5px;"> <p class="card-warning-content">
{% trans "You are not making any payment yet. After submitting your card {% blocktrans %}
information, you will be taken to the Confirm Order Page." %}</p> You are not making any payment yet. After submitting your card
information, you will be taken to the Confirm Order Page.
{% endblocktrans %}
</p>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<div class="col-xs-6 pull-right"> <div class="col-xs-6 pull-right">
<button style="width: 100px; float: right; font-style: normal; font-weight: bold; position: absolute; right: 0;" <button class="btn btn-success stripe-payment-btn" type="submit">{% trans "Submit" %}
class="btn btn-success" type="submit">{% trans "Submit" %}
</button> </button>
</div> </div>
</div> </div>
@ -146,13 +175,12 @@
</form> </form>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
<!-- stripe key data --> <!-- stripe key data -->