do i know you ?
newly created user : are you hiding your real name with newly created user from this month
Join date => Nov 2020
if you know my name mean it's not your main Ragezone Account
About the project :
I did start rebuild the entire API on Laravel 8
as today i already finished 80% of whole API
I'm rebuilding the entire system that will use only MSSQL and no more Mysql
All database and stored procedure got merged to MSSQL
Remake the Purchase API actually from scratch
as the one in the package is fully bugged and easy to exploit.
below a part of the Controller API of CheckOTP
Below the ShopVersion APICode:class CheckOTPController extends Controller { /** * Display a listing of the resource. * * @return false|string */ public function index(Request $request) { try { $req = $request->input('req'); $request_params = json_decode($req); $user_key = $request_params->user_key; $user_otp = $request_params->user_otp; $channeling_index = $request_params->channeling_index; /** * For future update, not use for now * * $client_ip = $request_params->client_ip; * $locale = $request_params->locale; * $service_code = $request_params->service_code; * * */ if (CheckOTP::where('accountid', '=', $user_key)->exists()) { // Account found $accountfound = CheckOTP::where('accountid', $user_key)->first(); if (CheckOTP::where('passwd', '=', $user_otp)->first()) { $result_array = array( 'result_code' => 1, 'user_no' => (int)$accountfound['fcsaccountguid'], 'user_id' => $user_key, 'channeling_index' => $channeling_index ); } } else { $result_array = array('result_code' => -98); } if (CheckOTP::where('accountid', '=', $user_key)->doesntExist()) { $result_array = array('result_code' => -94); } header('Content-Type: application/json; charset=utf-8'); header('Access-Control-Allow-Origin: *'); http_response_code(200); return json_encode($result_array); } catch (Exception $e) { throw new Exception($e->getMessage()); } } }
Code:class ShopVersionController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse */ public function index(Request $request) { $region = $request->input('locale'); try { $validator = Validator::make($request->all(), [ 'locale' => 'required|string|max:2', ]); if ($validator->fails()) { return response()->json(['errors' => $validator->errors()->all()], 422); } if (ShopVersion::where('locale', '=', $region)->exists()) { // Locale found $localefound = ShopVersion::where('locale', $region)->first(); $error_code = 1; return response()->json([ 'result_code' => $error_code, 'condition_type' => '0x00', 'shop_version' => $localefound->version, 'return_structure_type' => '0x02', 'result_code_channel' => 'null', 'result_message_channel' => 'success' ]); } if (ShopVersion::where('locale', '=', $region)->doesntExist()) { // Locale not found $error_code = 90001; return response()->json([ 'result_code' => $error_code, 'condition_type' => '0x00', 'callback_attribute' => '', 'order_id' => '', 'return_structure_type' => '0x02', 'result_code_channel' => 'null', 'result_message_channel' => 'Invalid locale' ]); } } catch (Exception $e) { throw new Exception($e->getMessage()); } } }




Reply With Quote


