Online payment controller sber

This commit is contained in:
nurmuhammet committed 2024-11-25 21:32:46 +05:00
1 parent ca31fc189e
commit f9cc2792c3
3 files changed
+17 -23

No files matched your search

@@ -5,7 +5,6 @@
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();