slider

parent 4265ae9b
......@@ -582,13 +582,18 @@ def Pay(request):
# -----------------------------------------------------------------
def IPN(request):
print("content-type: text/html\r\n\r\n")
if request.POST['payment_status'] == 'Completed':
Purchase.objects.filter(user_id=request.user.id, purchased=0).update(purchased=True)
return redirect('../../reports')
else:
return redirect('../cart')
f = open("myfile.txt", "w")
x = request.GET.dict()
for key, value in x.items():
f.write(key+": "+value+'\n')
return HttpResponse("hola")
#print("content-type: text/html\r\n\r\n")
#if request.POST.get['payment_status'] == 'Completed':
# Purchase.objects.filter(user_id=request.user.id, purchased=0).update(purchased=True)
# return redirect('../../reports')
#else:
# return redirect('../cart')
# f.write(request.GET)
# f.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment