eboutic: check basket amount upon command validation

This commit is contained in:
Skia committed 2019-03-15 02:17:36 +01:00
1 parent d56990b91f
commit 03eeffdea0
2 files changed
+46 -2

No files matched your search

+4
View File
@@ -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"