eboutic: et_autoanswer: don't require 'Auto' to proceed checking the request

This commit is contained in:
Skia 2022-02-28 09:57:41 +01:00
parent a0e4e9e8e3
commit 6c5db61a97

View File

@ -252,8 +252,6 @@ class EtransactionAutoAnswer(View):
if ( if (
not "Amount" in request.GET.keys() not "Amount" in request.GET.keys()
or not "BasketID" in request.GET.keys() or not "BasketID" in request.GET.keys()
or not "Auto"
in request.GET.keys() # If not in the request it means the payment has been refused
or not "Error" in request.GET.keys() or not "Error" in request.GET.keys()
or not "Sig" in request.GET.keys() or not "Sig" in request.GET.keys()
): ):
@ -271,7 +269,10 @@ class EtransactionAutoAnswer(View):
) )
except: except:
return HttpResponse("Bad signature", status=400) return HttpResponse("Bad signature", status=400)
if request.GET["Error"] == "00000": # Payment authorized:
# * 'Error' is '00000'
# * 'Auto' is in the request
if request.GET["Error"] == "00000" and "Auto" in request.GET.keys():
try: try:
with transaction.atomic(): with transaction.atomic():
b = ( b = (