2021-09-24 20:42:39 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\PaymentDrivers\Mollie;
|
|
|
|
|
|
|
|
use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest;
|
2021-09-24 20:49:40 +02:00
|
|
|
use App\Http\Requests\Request;
|
2021-09-24 20:42:39 +02:00
|
|
|
use App\PaymentDrivers\Common\MethodInterface;
|
2021-09-24 20:44:47 +02:00
|
|
|
use App\PaymentDrivers\MolliePaymentDriver;
|
2021-09-24 20:49:40 +02:00
|
|
|
use Illuminate\Http\RedirectResponse;
|
|
|
|
use Illuminate\View\View;
|
2021-09-24 20:42:39 +02:00
|
|
|
|
|
|
|
class BankTransfer implements MethodInterface
|
|
|
|
{
|
2021-09-24 20:44:47 +02:00
|
|
|
protected MolliePaymentDriver $mollie;
|
|
|
|
|
|
|
|
public function __construct(MolliePaymentDriver $mollie)
|
|
|
|
{
|
|
|
|
$this->mollie = $mollie;
|
|
|
|
|
|
|
|
$this->mollie->init();
|
|
|
|
}
|
|
|
|
|
2021-09-24 20:49:40 +02:00
|
|
|
/**
|
|
|
|
* Show the authorization page for bank transfer.
|
|
|
|
*
|
|
|
|
* @param array $data
|
|
|
|
* @return View
|
|
|
|
*/
|
|
|
|
public function authorizeView(array $data): View
|
|
|
|
{
|
|
|
|
return render('gateways.mollie.bank_transfer.authorize', $data);
|
|
|
|
}
|
2021-09-24 20:42:39 +02:00
|
|
|
|
2021-09-24 20:49:40 +02:00
|
|
|
/**
|
|
|
|
* Handle the authorization for bank transfer.
|
|
|
|
*
|
|
|
|
* @param Request $request
|
|
|
|
* @return RedirectResponse
|
|
|
|
*/
|
|
|
|
public function authorizeResponse(Request $request): RedirectResponse
|
|
|
|
{
|
|
|
|
return redirect()->route('client.payment_methods.index');
|
|
|
|
}
|
2021-09-24 20:42:39 +02:00
|
|
|
|
2021-09-24 20:49:40 +02:00
|
|
|
public function paymentView(array $data)
|
|
|
|
{
|
|
|
|
}
|
2021-09-24 20:42:39 +02:00
|
|
|
|
2021-09-24 20:49:40 +02:00
|
|
|
public function paymentResponse(PaymentResponseRequest $request)
|
|
|
|
{
|
|
|
|
}
|
2021-09-24 20:42:39 +02:00
|
|
|
}
|