slider

parent 4265ae9b
...@@ -582,13 +582,18 @@ def Pay(request): ...@@ -582,13 +582,18 @@ def Pay(request):
# ----------------------------------------------------------------- # -----------------------------------------------------------------
def IPN(request): def IPN(request):
print("content-type: text/html\r\n\r\n") f = open("myfile.txt", "w")
x = request.GET.dict()
if request.POST['payment_status'] == 'Completed': for key, value in x.items():
Purchase.objects.filter(user_id=request.user.id, purchased=0).update(purchased=True) f.write(key+": "+value+'\n')
return redirect('../../reports') return HttpResponse("hola")
else: #print("content-type: text/html\r\n\r\n")
return redirect('../cart')
#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.write(request.GET)
# f.close() # 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