63 lines
1.7 KiB
PHP
63 lines
1.7 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'];
|
|
|
|
info(gettype($paymentHistory->api_response));
|
|
|
|
// if ($data['success'] && $paymentHistory) {
|
|
// info(OnlinePaymentRepo::syncWithBilling(
|
|
// uuid: $paymentHistory->orderId,
|
|
// bank_code: $bank->unique_code,
|
|
// terminal_id: $paymentHistory->api_response,
|
|
// account_number:,
|
|
// rrn,
|
|
// amount,
|
|
// pay_purpose:
|
|
// ));
|
|
// }
|
|
|
|
return view(OnlinePaymentRepo::statusView(), $data);
|
|
}
|
|
|
|
/**
|
|
* Sber online payment
|
|
*/
|
|
public function sber(OnlinePaymentStoreRequest $request): View
|
|
{
|
|
$data = OnlinePaymentRepo::checkPaymentSber($request);
|
|
|
|
// OnlinePaymentRepo::syncWithBilling();
|
|
|
|
return view(OnlinePaymentRepo::statusView(), $data);
|
|
}
|
|
}
|