mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Test GoCardless webhooks for valid events
This commit is contained in:
parent
ddc19547c5
commit
9910e4f997
@ -234,6 +234,15 @@ class GoCardlessPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
$this->init();
|
$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) {
|
foreach ($request->events as $event) {
|
||||||
if ($event['action'] === 'confirmed') {
|
if ($event['action'] === 'confirmed') {
|
||||||
$payment = Payment::query()
|
$payment = Payment::query()
|
||||||
|
@ -87,7 +87,7 @@ class UpdateInvoicePayment
|
|||||||
$invoice->refresh();
|
$invoice->refresh();
|
||||||
|
|
||||||
$invoice->service()
|
$invoice->service()
|
||||||
->touchPdf()
|
->touchPdf(true)
|
||||||
->workFlow()
|
->workFlow()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user