feat(course_page.html): use form for buy course button as checkout now individually-managed
This commit is contained in:
@@ -55,8 +55,12 @@
|
||||
<h2 class="not-prose text-2xl mt-4 text-gray-700 font-semibold">
|
||||
{{ page.purchasable_products.first.price | floatformat:2 }} {{ page.purchasable_products.first.currency | upper }}
|
||||
</h2>
|
||||
<a href="{{ page.purchasable_products.first.stripe_payment_url }}?prefilled_email={{ user.email }}"
|
||||
class="mt-2 inline-block bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700 transition">{% trans "Purchase Course" %}</a>
|
||||
<form method="post" action="{% url 'create_checkout_session' purchasable_id=page.purchasable_products.first.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="mt-2 inline-block bg-green-600 text-white px-4 py-2 rounded cursor-pointer hover:bg-green-700 transition">
|
||||
{% trans "Purchase Course" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
||||
Reference in New Issue
Block a user