Additional checks for GoCardless webhooks
This commit is contained in:
parent
b159a5a08d
commit
99045110ed
1 changed files with 1 additions and 1 deletions
|
|
@ -261,7 +261,7 @@ class GoCardlessPaymentDriver extends BaseDriver
|
|||
//finalize payments on invoices here.
|
||||
}
|
||||
|
||||
if ($event['action'] === 'failed') {
|
||||
if ($event['action'] === 'failed' && array_key_exists('payment', $event['links'])) {
|
||||
$payment = Payment::query()
|
||||
->where('transaction_reference', $event['links']['payment'])
|
||||
->where('company_id', $request->getCompany()->id)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue