wip
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App\Modules\HalkbankOnlinePayment\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Modules\HalkbankOnlinePayment\Repositories\HalkbankOnlinePaymentRepository;
|
||||
use App\Modules\OnlinePayment\Repositories\OnlinePaymentRepository;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -11,9 +13,14 @@ class HalkbankOnlinePaymentController extends Controller
|
||||
public function store(Request $request): View
|
||||
{
|
||||
$request->validate([
|
||||
'orderId' => ['required', 'string', 'max:50', 'exists:online_payment_histories,orderId'],
|
||||
'orderId' => ['required', 'string', 'max:50', 'exists:online_payments,orderId'],
|
||||
]);
|
||||
|
||||
return view('welcome');
|
||||
$onlinePaymentRepository = OnlinePaymentRepository::make()
|
||||
->paymentProvider(new HalkbankOnlinePaymentRepository);
|
||||
|
||||
$paymentStatus = $onlinePaymentRepository->checkPayment($request->string('orderId'));
|
||||
|
||||
return $onlinePaymentRepository->paymentStatusView($paymentStatus);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user