payments: return error 400 on invalid invoice CRC (#40772)
This commit is contained in:
parent
2e93d15e6e
commit
1f93cc3435
|
@ -377,7 +377,7 @@ register_item_class(PaymentCancelWorkflowStatusItem)
|
|||
def request_payment(invoice_ids, url, add_regie=True):
|
||||
for invoice_id in invoice_ids:
|
||||
if not Invoice.check_crc(invoice_id):
|
||||
raise KeyError()
|
||||
raise errors.QueryError()
|
||||
invoices = [ Invoice.get(invoice_id) for invoice_id in invoice_ids ]
|
||||
invoices = [ i for i in invoices if not (i.paid or i.canceled) ]
|
||||
regie_ids = set([invoice.regie_id for invoice in invoices])
|
||||
|
@ -574,7 +574,7 @@ class PublicPaymentDirectory(Directory):
|
|||
|
||||
for invoice_id in invoice_ids:
|
||||
if not Invoice.check_crc(invoice_id):
|
||||
raise KeyError()
|
||||
raise errors.QueryError()
|
||||
|
||||
url = get_publisher().get_frontoffice_url() + '/payment/back/'
|
||||
|
||||
|
|
Reference in New Issue