mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 23:22:52 +01:00
Add GoCardless webhook controller for processing events
This commit is contained in:
parent
e5e72123f0
commit
f15fb4c412
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
// @todo: Double check if this should be in admin module
|
||||
|
||||
namespace App\Http\Controllers\Gateways;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class GoCardlessOAuthController extends Controller
|
||||
{
|
||||
public function __invoke(Request $request)
|
||||
{
|
||||
foreach ($request->events as $event) {
|
||||
match ($event['details']['cause']) {
|
||||
'app_disconnected' => info($event),
|
||||
default => nlog('Not acting on this event type: ' . $event['details']['cause']),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user