67 lines
1.9 KiB
PHP
67 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Http\Requests\OnlinePaymentStoreRequest;
|
|
use App\Repos\Payment\OnlinePaymentRepo;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class OnlinePaymentController extends Controller
|
|
{
|
|
/**
|
|
* Card online payment
|
|
*/
|
|
public function store(OnlinePaymentStoreRequest $request): View
|
|
{
|
|
$data = OnlinePaymentRepo::checkCardOrderPayment($request);
|
|
|
|
return view(OnlinePaymentRepo::statusView(), $data);
|
|
}
|
|
|
|
/**
|
|
* Visa-master online payment
|
|
*/
|
|
public function visaMaster(OnlinePaymentStoreRequest $request): View
|
|
{
|
|
$data = OnlinePaymentRepo::checkPaymentVisaMaster($request);
|
|
|
|
/** @var \App\Models\Payment\OnlinePaymentHistory */
|
|
// $paymentHistory = $data['paymentHistory'];
|
|
|
|
// /** @var \App\Models\Branch\Branch */
|
|
// $bank = $data['bank_branch'];
|
|
|
|
// /** @var \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem */
|
|
// $resource = $data['resource'];
|
|
|
|
// if ($data['success'] === true) {
|
|
// OnlinePaymentRepo::syncWithBilling(
|
|
// uuid: $request->orderId,
|
|
// bank_code: $bank->unique_code,
|
|
// terminal_id:
|
|
// );
|
|
// }
|
|
|
|
return view(OnlinePaymentRepo::statusView(), $data);
|
|
}
|
|
|
|
/**
|
|
* Sber online payment
|
|
*/
|
|
public function sber(OnlinePaymentStoreRequest $request): View
|
|
{
|
|
$data = OnlinePaymentRepo::checkPaymentSber($request);
|
|
|
|
// /** @var \App\Models\Payment\OnlinePaymentHistory */
|
|
// $paymentHistory = $data['paymentHistory'];
|
|
|
|
// /** @var \App\Models\Branch\Branch */
|
|
// $bank = $data['bank_branch'];
|
|
|
|
// /** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrderItem */
|
|
// $resource = $data['resource'];
|
|
|
|
return view(OnlinePaymentRepo::statusView(), $data);
|
|
}
|
|
}
|