diff --git a/shop/templates/shop/checkout.html b/shop/templates/shop/checkout.html
index 380ff0b..9754e44 100644
--- a/shop/templates/shop/checkout.html
+++ b/shop/templates/shop/checkout.html
@@ -100,11 +100,6 @@
Step 2 - Enter Address & Other Details:
document.getElementById('cart').innerHTML = sum;
document.getElementById('totalPrice').innerHTML = totalPrice;
$('#itemsJson').val(JSON.stringify(cart));
-{% if thank %}
-alert('Thanks for ordering with us. Your order is is {{id}}. Use it to track your order using our order tracker');
-localStorage.clear();
-document.location = "/shop";
-{% endif %}
$('#amount').val($('#totalPrice').html())
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/shop/views.py b/shop/views.py
index 88c27e4..8339901 100644
--- a/shop/views.py
+++ b/shop/views.py
@@ -107,8 +107,6 @@ def checkout(request):
order.save()
update = OrderUpdate(order_id=order.order_id, update_desc="The order has been placed")
update.save()
- thank = True
- id = order.order_id
# return render(request, 'shop/checkout.html', {'thank':thank, 'id': id})
# Request paytm to transfer the amount to your account after payment by user
param_dict = {
@@ -142,7 +140,8 @@ def handlerequest(request):
verify = Checksum.verify_checksum(response_dict, MERCHANT_KEY, checksum)
if verify:
if response_dict['RESPCODE'] == '01':
- print('order successful')
+ thank= True
+ return render(request, 'shop/paymentstatus.html', {'response': response_dict, 'thank':thank})
else:
print('order was not successful because' + response_dict['RESPMSG'])
- return render(request, 'shop/paymentstatus.html', {'response': response_dict})
+ return render(request, 'shop/paymentstatus.html', {'response': response_dict})