Online payment controller sber
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user