1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 05:32:39 +01:00
invoiceninja/app/Http/Controllers/PaymentWebhookController.php
Benjamin Beganović d3033c902d wip
2020-12-16 15:25:42 +01:00

34 lines
829 B
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Http\Controllers;
use App\Http\Requests\Payments\PaymentWebhookRequest;
use Illuminate\Support\Arr;
class PaymentWebhookController extends Controller
{
public function __construct()
{
$this->middleware('guest');
}
public function __invoke(PaymentWebhookRequest $request, string $company_gateway_id, string $company_key)
{
$payment = $request->getPayment();
return $request->getCompanyGateway()
->driver($payment->client)
->processWebhookRequest($request, $payment);
}
}