Use payment method instead of token and PaymentIntent all over
This commit is contained in:
parent
35cc9d4229
commit
c3286a68a5
8 changed files with 244 additions and 120 deletions
|
|
@ -187,7 +187,6 @@
|
|||
window.enter_your_card_text = '{%trans "Enter your credit card number" %}';
|
||||
|
||||
(function () {
|
||||
window.paymentIntentSecret = "{{payment_intent_secret}}";
|
||||
window.stripeKey = "{{stripe_key}}";
|
||||
window.current_lan = "{{LANGUAGE_CODE}}";
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
{% load staticfiles bootstrap3 i18n custom_tags humanize %}
|
||||
|
||||
{% block content %}
|
||||
<script>
|
||||
{% if payment_intent_secret %}
|
||||
console.log("payment_intent_secret");
|
||||
window.paymentIntentSecret = "{{payment_intent_secret}}";
|
||||
{% else %}
|
||||
console.log("No payment_intent_secret");
|
||||
{% endif %}
|
||||
</script>
|
||||
<div id="order-detail{{order.pk}}" class="order-detail-container">
|
||||
{% if messages %}
|
||||
<div class="alert alert-warning">
|
||||
|
|
@ -321,5 +329,10 @@
|
|||
<script type="text/javascript">
|
||||
{% trans "Some problem encountered. Please try again later." as err_msg %}
|
||||
var create_vm_error_message = '{{err_msg|safe}}';
|
||||
var pm_id = '{{id_payment_method}}';
|
||||
var error_url = '{{ error_msg.redirect }}';
|
||||
var error_msg = '{{ error_msg.msg_body }}';
|
||||
var error_title = '{{ error_msg.msg_title }}';
|
||||
window.stripeKey = "{{stripe_key}}";
|
||||
</script>
|
||||
{%endblock%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue