Changes stripe v2 to stripe v3 and added localization support
This commit is contained in:
parent
f2ee18deba
commit
ab4d1cf9c9
5 changed files with 77 additions and 31 deletions
|
|
@ -184,8 +184,9 @@
|
|||
<!-- Init JavaScript -->
|
||||
<script src="{% static 'hosting/js/initial.js' %}"></script>
|
||||
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script src="https://js.stripe.com/v2/"></script>
|
||||
<!-- Stripe Lib -->
|
||||
<script type="text/javascript" src="//js.stripe.com/v2/"></script>
|
||||
|
||||
<!-- Proccess payment lib -->
|
||||
<script type="text/javascript" src="{% static 'hosting/js/payment.js' %}"></script>
|
||||
|
|
|
|||
|
|
@ -62,7 +62,16 @@
|
|||
|
||||
|
||||
<form role="form" id="payment-form" novalidate>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div id="card-element">
|
||||
<!-- a Stripe Element will be inserted here. -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card-errors" role="alert"></div>
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="col-xs-9 col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cardNumber">CARD NUMBER</label>
|
||||
|
|
@ -91,10 +100,10 @@
|
|||
<input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<button class="btn btn-success btn-lg btn-block" type="submit">Submit Payment</button>
|
||||
<div class="col-xs-6 float-right">
|
||||
<button class="btn btn-success btn-sm btn-block" type="submit">Submit Payment</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display:none;">
|
||||
|
|
@ -115,6 +124,7 @@
|
|||
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -125,8 +135,14 @@
|
|||
|
||||
<!-- stripe key data -->
|
||||
{% if stripe_key %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<script type="text/javascript">
|
||||
(function () {window.stripeKey = "{{stripe_key}}";})();
|
||||
|
||||
|
||||
(function () {
|
||||
window.stripeKey = "{{stripe_key}}";
|
||||
window.current_lan = "{{LANGUAGE_CODE}}";
|
||||
})();
|
||||
</script>
|
||||
{%endif%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue