1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 17:01:33 +02:00
invoiceninja/app/PaymentDrivers/Razorpay/Hosted.php
Benjamin Beganović f28d1f2780 Authorization
2021-10-07 16:54:56 +02:00

64 lines
1.5 KiB
PHP

<?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://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers\Razorpay;
use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest;
use App\Http\Requests\Request;
use App\PaymentDrivers\Common\MethodInterface;
use App\PaymentDrivers\RazorpayPaymentDriver;
use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
class Hosted implements MethodInterface
{
protected RazorpayPaymentDriver $razorpay;
public function __construct(RazorpayPaymentDriver $razorpay)
{
$this->razorpay = $razorpay;
$this->razorpay->init();
}
/**
* Show the authorization page for Razorpay.
*
* @param array $data
* @return View
*/
public function authorizeView(array $data): View
{
return render('gateways.razorpay.hosted.authorize', $data);
}
/**
* Handle the authorization page for Razorpay.
*
* @param Request $request
* @return RedirectResponse
*/
public function authorizeResponse(Request $request): RedirectResponse
{
return redirect()->route('client.payment_methods.index');
}
public function paymentView(array $data)
{
}
public function paymentResponse(PaymentResponseRequest $request)
{
}
}