mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
eboutic: check basket amount upon command validation
This commit is contained in:
@ -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