Online payment controller sber

This commit is contained in:
2024-11-25 21:32:46 +05:00
parent ca31fc189e
commit f9cc2792c3
3 changed files with 17 additions and 23 deletions

View File

@@ -5,7 +5,6 @@ namespace App\Http\Controllers;
use App\Http\Requests\OnlinePaymentStoreRequest;
use App\Models\Payment\OnlinePaymentHistory;
use App\Repos\Payment\OnlinePaymentRepo;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
@@ -13,16 +12,9 @@ class OnlinePaymentController extends Controller
{
/**
* Online payment
*
* @param Request $request
*/
public function store(Request $request)
public function store(OnlinePaymentStoreRequest $request)
{
// Validate the order id
if (validator($request->all(), ['orderId' => ['required', 'string', 'max:50', 'exists:online_payment_histories,orderId']])->fails()) {
return ['wrong order id'];
}
// Find order from history
$paymentHistory = OnlinePaymentHistory::where('orderId', $request->orderId)->first();