mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
eboutic: et_autoanswer: don't require 'Auto' to proceed checking the request
This commit is contained in:
parent
a0e4e9e8e3
commit
6c5db61a97
@ -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 = (
|
||||||
|
Loading…
Reference in New Issue
Block a user