diff --git a/app/PaymentDrivers/GoCardlessPaymentDriver.php b/app/PaymentDrivers/GoCardlessPaymentDriver.php index 721125409090..1cb6e2fb8183 100644 --- a/app/PaymentDrivers/GoCardlessPaymentDriver.php +++ b/app/PaymentDrivers/GoCardlessPaymentDriver.php @@ -234,6 +234,15 @@ class GoCardlessPaymentDriver extends BaseDriver $this->init(); + + if(!is_array($request->events) || !is_object($request->events)){ + + nlog("No GoCardless events to process in response?"); + return response()->json([], 200); + + } + + foreach ($request->events as $event) { if ($event['action'] === 'confirmed') { $payment = Payment::query() diff --git a/app/Services/Payment/UpdateInvoicePayment.php b/app/Services/Payment/UpdateInvoicePayment.php index e1750713c95b..16c5d9738b2c 100644 --- a/app/Services/Payment/UpdateInvoicePayment.php +++ b/app/Services/Payment/UpdateInvoicePayment.php @@ -87,7 +87,7 @@ class UpdateInvoicePayment $invoice->refresh(); $invoice->service() - ->touchPdf() + ->touchPdf(true) ->workFlow() ->save();