mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Additional checks for GoCardless webhooks
This commit is contained in:
parent
b159a5a08d
commit
99045110ed
@ -261,7 +261,7 @@ class GoCardlessPaymentDriver extends BaseDriver
|
|||||||
//finalize payments on invoices here.
|
//finalize payments on invoices here.
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($event['action'] === 'failed') {
|
if ($event['action'] === 'failed' && array_key_exists('payment', $event['links'])) {
|
||||||
$payment = Payment::query()
|
$payment = Payment::query()
|
||||||
->where('transaction_reference', $event['links']['payment'])
|
->where('transaction_reference', $event['links']['payment'])
|
||||||
->where('company_id', $request->getCompany()->id)
|
->where('company_id', $request->getCompany()->id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user