mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
eboutic: check basket amount upon command validation
This commit is contained in:
1 parent
d56990b91f
commit
03eeffdea0
2 files changed
+46
-2
No files matched your search
@@ -271,6 +271,10 @@ class EtransactionAutoAnswer(View):
|
||||
)
|
||||
if b is None:
|
||||
raise SuspiciousOperation("Basket does not exists")
|
||||
if int(b.get_total() * 100) != int(request.GET["Amount"]):
|
||||
raise SuspiciousOperation(
|
||||
"Basket total and amount do not match"
|
||||
)
|
||||
i = Invoice()
|
||||
i.user = b.user
|
||||
i.payment_method = "CARD"
|
||||
|
||||
Reference in new issue
Block a user