diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index d7f5ee59..9cc22f7e 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -26,7 +26,16 @@ use App\Models\LelongBid; use App\Models\LelongBidMarhun; use App\Models\LelKarat; use App\Models\LelKarat_temp; +use App\Models\Resit; +use App\Models\Payment; + +use Session; use Carbon\Carbon; +use Money\Money; +use Billplz\Client; +use Http\Client\Common\HttpMethodsClient; +use Http\Adapter\Guzzle7\Client as GuzzleHttpClient; +use Http\Message\MessageFactory\GuzzleMessageFactory; class ApiController extends Controller { @@ -41,6 +50,19 @@ class ApiController extends Controller * * @return \Illuminate\Contracts\Support\Renderable */ + public function __construct(){ + // parent::__construct(); + if(config('app.env') != 'production'){ + $this->api_key = 'abecfd0c-98d8-4635-abc2-2fcba8c60c11'; + $this->XSignature_Key = 'S-GWr7z03XjAhqPsFfu_H5nQ'; + $this->collection_id = 'bwdtejv0'; + }else{ + $this->api_key = 'f3e82fe1-a422-4660-97f0-65cc59ff6c47'; + $this->XSignature_Key = 'S-alZUbzmD2_TF3vmrRqgehQ'; + } + + + } public function biditem() { @@ -101,6 +123,185 @@ class ApiController extends Controller ], 401); } } + + public function feepayment(Request $request) + { + + $arraycollection_id = array(); + + $http = new HttpMethodsClient( + new GuzzleHttpClient(), + new GuzzleMessageFactory() + ); + + $billplz = new Client($http, $this->api_key); + if(config('app.env') != 'production'){ + $billplz->useSandbox(); + } + + $billplz->useVersion('v4'); + + $bill = $billplz->bill(); + + $current = Carbon::now(); + $current = new Carbon(); + + $day = $current->day; + $month = $current->month; + $year = $current->format('y'); + + $total_bayaran = 1000; + + $collection_id = $this->collection_id; + $response = $bill->create( + $collection_id, + 'test@gmail.com', + $request->notel, + $request->name, + Money::MYR($total_bayaran), + route('pay.callback'), + 'Bayaran Borang', + ['redirect_url' => 'http://192.168.0.10:8003/api/pembayaran/response'] + ); + + $previous_siri = Resit::orderBy('id','desc')->first(); + if($previous_siri){ + $nosiri = $previous_siri->id + 1; + }else{ + $nosiri = 1; + } + + $billcode = $response->toArray(); + // dd($billcode); + // $billcode['redirect_url'] = 'http://192.168.0.10:8003/api/pembayaran/response'; + // dd($billcode); + $reference_no = 'LPKB' . $day . $month . $year . sprintf("%08d", $nosiri); + // $response2 = $bill->get($billcode['id']); + // dd($response2->toArray()); + $resit = new Resit; + $resit->user_id = $request->user_id; + $resit->lelongbid_id = null; + $resit->reference_no = $reference_no; + $resit->billplz_id = $billcode['id']; + $resit->resit_type = 1; + $resit->total_payment = 10; + $resit->save(); + + // foreach($array_payment as $index1=>$arraypay) + // { + // $previous_siri = Http::get(config('api.url') . '/api/online/transaction')->json(); + // if($previous_siri){ + // $nosiri = $previous_siri['nosiri'] + 1; + // }else{ + // $nosiri = 1; + // } + + // $reference_no = 'LPKB' . $day . $month . $year . sprintf("%08d", $nosiri); + + // $new_transaction = Http::post(config('api.url') . '/api/online/transaction',[ + // 'nokp'=> Auth::user()->icno, + // 'reference_no'=> $reference_no, + // 'nosiri'=> $nosiri, + // 'billplz_id' => $billcode['id'], + // 'norujukan' => $arraypay['norujukan'], + // 'kodcaw' => $arraypay['kodcaw'], + // 'total_payment'=> $arraypay['bayaran'], + // 'customer_name' => Auth::user()->name, + // ])->json(); + + // } + + + return redirect($billcode['url'] . '?auto_submit=true'); + + // return view('pembayaran.result.berjaya',compact('arraybayaran')); + } + public function callback(Request $request){ + dd('hye'); + $http = new HttpMethodsClient( + new GuzzleHttpClient(), + new GuzzleMessageFactory() + ); + + $billplz = new Client($http, $this->api_key); + if(config('app.env') != 'production'){ + $billplz->useSandbox(); + } + $billplz->useVersion('v4'); + + $bill = $billplz->bill(); + + $data = $bill->webhook($request->toArray()); + + if($data['billplz']['paid'] == 'true'){ + $resit = Resit::where('billplz_id','=',$data['billplz']['id'])->first(); + $resit->status = 'PAID'; + $resit->paid_at = $data['billplz']['paid_at']; + $resit->save(); + + // $transactionOnline = Http::get(config('api.url') . '/api/transaction/online/express',[ + // 'billplz_id' => $data['billplz']['id'] + // ])->json(); + return response()->json([ + 'success' => true, + 'resit' => $resit + ]); + + }else{ + $resit = Resit::where('billplz_id','=',$data['billplz']['id'])->first(); + $resit->status = 'UNSUCCESSFUL'; + $resit->paid_at = null; + $resit->save(); + return response()->json([ + 'success' => false, + 'resit' => $resit + ]); + } + } + + public function response(Request $request){ + // dd($request->all()); + $http = new HttpMethodsClient( + new GuzzleHttpClient(), + new GuzzleMessageFactory() + ); + + $billplz = new Client($http, $this->api_key); + if(config('app.env') != 'production'){ + $billplz->useSandbox(); + } + $billplz->useVersion('v4'); + + $bill = $billplz->bill(); + $req = $request->toArray(); + $response = $bill->get($req['billplz']['id']); + $data = $response->toArray(); + // dd($data); + if($data['paid'] == 'true'){ + $resit = Resit::where('billplz_id','=',$data['id'])->first(); + $resit->status = 'PAID'; + $resit->paid_at = $data['paid_at']; + $resit->save(); + + // $transactionOnline = Http::get(config('api.url') . '/api/transaction/online/express',[ + // 'billplz_id' => $data['billplz']['id'] + // ])->json(); + return response()->json([ + 'success' => true, + 'resit' => $resit + ]); + + }else{ + $resit = Resit::where('billplz_id','=',$data['id'])->first(); + $resit->status = 'UNSUCCESSFUL'; + $resit->paid_at = null; + $resit->save(); + return response()->json([ + 'success' => false, + 'resit' => $resit + ]); + } + } } \ No newline at end of file diff --git a/app/Http/Controllers/AuthMobile/AuthController.php b/app/Http/Controllers/AuthMobile/AuthController.php index 5f2a1c3a..96d961e6 100644 --- a/app/Http/Controllers/AuthMobile/AuthController.php +++ b/app/Http/Controllers/AuthMobile/AuthController.php @@ -19,6 +19,7 @@ class AuthController extends Controller 'username' => 'required|string|unique:users', 'nokp' => 'required|string|unique:users', 'password' => 'required|string|min:8', + 'email' => 'required|string|unique:users|email', 'notelbimbit' => 'required|string|unique:users', 'register_agree' => 'required|integer' @@ -45,6 +46,7 @@ class AuthController extends Controller $user->username = $fields['username']; $user->nokp = $fields['nokp']; $user->password = bcrypt($fields['password']); + $user->email = $fields['email']; $user->notelbimbit = $fields['notelbimbit']; $user->register_agree = $fields['register_agree']; $user->t_daftar = $currentdate; @@ -85,7 +87,25 @@ class AuthController extends Controller //Check username $user = User::where('username', $fields['username'])->first(); - + + if($user->status != 'active') + { + if($user->status == 'banned') + { + return response([ + 'message' => 'User Banned' + ], 401); + } + else + { + return response([ + 'message' => 'Registration in progress,status wait for approval.' + ], 401); + } + return response([ + 'message' => 'Bad Creds' + ], 401); + } //Check Password if(!$user || !Hash::check($fields['password'], $user->password)){ return response([ diff --git a/app/Http/Controllers/AuthMobile/LelongController.php b/app/Http/Controllers/AuthMobile/LelongController.php deleted file mode 100644 index 2b057812..00000000 --- a/app/Http/Controllers/AuthMobile/LelongController.php +++ /dev/null @@ -1,17 +0,0 @@ -where('t_lelong','=',$t_lelong) - ->first(); - - } -} diff --git a/app/Http/Controllers/AuthMobile/LelongMobileController.php b/app/Http/Controllers/AuthMobile/LelongMobileController.php new file mode 100644 index 00000000..6521cae8 --- /dev/null +++ b/app/Http/Controllers/AuthMobile/LelongMobileController.php @@ -0,0 +1,152 @@ +toDateString(); + + // $arrayLelong = []; + $lelong = Lelong::where('tarikh_lelong','=',$currentdate)->where('sts_lelong','=',1)->get()->toArray(); + + foreach($lelong as $index1=>$lel) + { + $lelongbid = LelongBid::whereIn('lelong_id',$lelong) + ->get()->toArray(); + + $lelong[$index1]['lelongbid'] = $lelongbid; + + foreach($lelongbid as $index2=>$lelbidmarhun){ + $cawangan = Cawangan::where('id','=',$lelbidmarhun['caw_id'])->first()->toArray(); + // $id = lelongbid::first(); + + $lelongbidmarhun = LelongBidMarhun::where('lelongbid_id', $lelbidmarhun['id']) + ->get()->toArray(); + + $lelong[$index1]['lelongbid'][$index2]['lelongbidmarhun'] = $lelongbidmarhun; + $lelong[$index1]['lelongbid'][$index2]['cawangan'] = $cawangan; + } + + } + + return response()->json($lelong); + + } + + public function getListKarat(Request $request){ + + $getKarat = lelkarat::all(); + + // $lelongBidder = lelongBidder::all(); + + return response()->json($getKarat); + + } + + public function bidderSelectBidItem(Request $request){ + + $feepayment = Payment::where('status', '=', 1)->first(); + + if($feepayment != null){ + + $user = User::where('id', '=', $request->user_id) + ->first(); + + $selectBid = Cart::join('lelongbid', 'carts.lelongbid_id', '=', 'lelongbid.id') + ->where('lelongbid.norujukan', $request->norujukan) + ->select('lelongbid.id as lelongbid_id', + 'lelongbid.t_lelong', + 'lelongbid.nilaimarhun', + 'lelongbid.cajlelong', + 'carts.hargabida') + ->get(); + + // dd($selectBid[0]->hargabida); + + $currentdate = Carbon::now()->toDateTimeString(); + + $lelongBidder = new LelongBidder(); + $lelongBidder->nama_bidder = $request->name; + $lelongBidder->user_id = $user->id; + $lelongBidder->notelbimbit = $user->notelbimbit; + $lelongBidder->hargabida = $selectBid[0]->hargabida; + $lelongBidder->lelongbid_id = $selectBid[0]->lelongbid_id; + $lelongBidder->nilaimarhun = $selectBid[0]->nilaimarhun; + $lelongBidder->cajlelong = $selectBid[0]->cajlelong; + $lelongBidder->masa_bidaan = $currentdate; + $lelongBidder->save(); + + return response()->json("success", 201); + } + else if($feepayment == null){ + return response()->json("unsuccess", 201); + } + } + + public function listBidItem(Request $request){ + + $lelongbidder = LelongBidder::where('user_id','=', $request->user_id) + ->get()->toArray(); + + foreach($lelongbidder as $index1=>$lelbid) + { + $lelongbid = LelongBid::whereIn('id',$lelongbidder) + ->get()->toArray(); + + $lelongbidder[$index1]['lelongbid'] = $lelongbid; + } + + return response()->json($lelongbidder); + } + + public function searchLelByCaw(Request $request){ + + $currentdate = Carbon::now(); + $currentdate = $currentdate->toDateString(); + + // $arrayLelong = []; + $lelong = Lelong::join('cawangan_lelong', 'lelong.id', '=', 'cawangan_lelong.lelong_id') + ->where('tarikh_lelong','=',$currentdate) + ->where('caw_id', '=', $request->caw_id) + ->get()->toArray(); + + foreach($lelong as $index1=>$lel) + { + $lelongbid = LelongBid::where('lelong_id',$lel['lelong_id']) + ->get()->toArray(); + + $lelong[$index1]['lelongbid'] = $lelongbid; + + foreach($lelongbid as $index2=>$lelbidmarhun){ + $cawangan = Cawangan::where('id','=',$lelbidmarhun['caw_id'])->first()->toArray(); + // $id = lelongbid::first(); + + $lelongbidmarhun = LelongBidMarhun::where('lelongbid_id', $lelbidmarhun['id']) + ->get()->toArray(); + + $lelong[$index1]['lelongbid'][$index2]['lelongbidmarhun'] = $lelongbidmarhun; + $lelong[$index1]['lelongbid'][$index2]['cawangan'] = $cawangan; + } + + } + + return response()->json($lelong); + } +} diff --git a/app/Http/Controllers/AuthMobile/NewPasswordController.php b/app/Http/Controllers/AuthMobile/NewPasswordController.php index 070d2976..8e486e4f 100644 --- a/app/Http/Controllers/AuthMobile/NewPasswordController.php +++ b/app/Http/Controllers/AuthMobile/NewPasswordController.php @@ -1,6 +1,6 @@ errors(), 201); } - $currentdate = Carbon::now(); - $currentdate = $currentdate->toDateString(); + $currentdate = Carbon::now()->toDateTimeString(); $user_update = User::where('nokp','=',$request->nokp) ->update([ diff --git a/app/Http/Controllers/CartController.php b/app/Http/Controllers/CartController.php index 6844171c..77f359b0 100644 --- a/app/Http/Controllers/CartController.php +++ b/app/Http/Controllers/CartController.php @@ -36,31 +36,21 @@ class CartController extends Controller public function getCart($userid) { - $carts = Cart::where('user_id','=', $userid)->get(); + $carts = Cart::where('user_id','=', $userid)->get()->toArray(); - foreach($carts as $cart) + foreach($carts as $index => $cart) { - $arraycart = []; - $lelongbid = LelongBid::where('id',$cart->lelongbid_id)->first(); - $marhun = LelongBidMarhun::where('lelongbid_id','=',$lelongbid->id)->get(); - $lelongbid->marhun = $marhun; - $cart->lelongbid = $lelongbid; + $lelongbid = LelongBid::where('id',$cart['lelongbid_id'])->first()->toArray(); + $marhun = LelongBidMarhun::where('lelongbid_id','=',$lelongbid['id'])->get()->toArray(); + $cawangan = Cawangan::where('id','=',$lelongbid['caw_id'])->first()->toArray(); + + $carts[$index]['datalelongbid'] = $lelongbid; + $carts[$index]['datalelongbid']['lelongbidmarhun'] = $marhun; + $carts[$index]['datalelongbid']['cawangan'] = $cawangan; } - if(sizeof($carts)!=0) - { - return response()->json([ - 'success' => true, - 'carts' => $carts - ]); - } - else - { - return response()->json([ - 'success' => false, - 'message' => 'No Data', - ], 401); - } + + return response()->json($carts); } public function addToCart(Request $request) @@ -72,19 +62,9 @@ class CartController extends Controller if($item->save()) { - $carts = Cart::where('user_id','=', $request->user_id)->get(); - - foreach($carts as $cart) - { - $arraycart = []; - $lelongbid = LelongBid::where('id',$cart->lelongbid_id)->first(); - $marhun = LelongBidMarhun::where('lelongbid_id','=',$lelongbid->id)->get(); - $lelongbid->marhun = $marhun; - $cart->lelongbid = $lelongbid; - } return response()->json([ 'success' => true, - 'carts' => $carts + 'carts' => $item ]); } else diff --git a/app/Http/Controllers/LelongController.php b/app/Http/Controllers/LelongController.php index 6f05d1a3..d7faa044 100644 --- a/app/Http/Controllers/LelongController.php +++ b/app/Http/Controllers/LelongController.php @@ -28,6 +28,9 @@ use App\Models\LelKarat; use App\Models\LelKarat_temp; use Carbon\Carbon; + +use Carbon\Carbon; + class LelongController extends Controller { /** @@ -346,9 +349,14 @@ class LelongController extends Controller public function start($id) { + $currentdate = Carbon::now(); + $currenttime = $currentdate->toTimeString(); + $endtime = $currentdate->addHours(2); + $lelong = Lelong::where('id','=',$id)->first(); - $lelong->masatamat_lelong = '2021-12-20 04:51:50'; - $lelong->sts_lelong = 1; + $lelong->masamula_lelong = $currenttime; + $lelong->masatamat_lelong = $endtime->toTimeString(); + $lelong->sts_lelong = 1; //start lelong $lelong->save(); return redirect()->route('lelong.senarailelong') @@ -425,5 +433,19 @@ class LelongController extends Controller ->with('success','Kemaskini Berjaya'); } + public function stop($id) + { + $currentdate = Carbon::now(); + $currenttime = $currentdate->toTimeString(); + + $lelong = Lelong::where('id','=',$id)->first(); + $lelong->masatamat_lelong = $currenttime; + $lelong->sts_lelong = 2; //stop lelong + $lelong->save(); + + return redirect()->route('lelong.senarailelong') + ->with('success','Lelongan berhenti'); + + } } \ No newline at end of file diff --git a/app/Http/Controllers/PembidaController.php b/app/Http/Controllers/PembidaController.php new file mode 100644 index 00000000..b37f6fdb --- /dev/null +++ b/app/Http/Controllers/PembidaController.php @@ -0,0 +1,93 @@ +middleware('auth'); + } + + /** + * Show the application dashboard. + * + * @return \Illuminate\Contracts\Support\Renderable + */ + public function index() + { + // $alluser = User::all(); + $alluser = User::doesntHave('roles')->where('user_type','=',2)->get(); + // $allroles = Role::all()->pluck('name'); + // $user = Auth::user(); + // $user->assignRole('admin'); + return view('pembida.senaraipembida',compact('alluser')); + } + + public function show($userid) + { + // dd($userid); + $user = User::where('id','=',$userid)->first(); + $files = File::where('user_id','=',$userid)->get()->toArray(); + + $array_ic = []; + foreach($files as $index=>$file) + { + $files[$index]['ic64']= 'data:image/' . $file['file_type'] . ';base64,' . base64_encode($file['filename']); + } + + // dd($files); + return view('pembida.show',compact('user','files')); + } + + + + public function delete(Request $request) + { + $user = User::where('id','=',$request->userid)->first(); + $user->note =$request->note; + $user->status = 'Fail'; + $user->save(); + + return redirect()->route('pembida.senaraipembida') + ->with('success','Padam Pengguna Berjaya'); + } + + public function sah($userid) + { + $currentdate = Carbon::now(); + $currentdate = $currentdate->toDateString(); + + $user = User::where('id','=',$userid)->first(); + $user->disahkan_pada = $currentdate; + $user->disahkan_oleh = Auth::user()->id; + $user->status = 'active'; + + if($user->save()) + { + $user->assignRole('pembida'); + } + + return redirect()->route('pembida.senaraipembida') + ->with('success','Pengesahan Berjaya'); + } + + + +} + \ No newline at end of file diff --git a/app/Models/lelongBidder.php b/app/Models/lelongBidder.php new file mode 100644 index 00000000..c739a829 --- /dev/null +++ b/app/Models/lelongBidder.php @@ -0,0 +1,26 @@ + 1 = paid , 2 = pending + 'paid_at' + ]; +} diff --git a/composer.json b/composer.json index 5367d869..c25ad304 100644 --- a/composer.json +++ b/composer.json @@ -10,9 +10,11 @@ "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "intervention/image": "^2.7", + "jomweb/billplz": "4.1", "laravel/framework": "^8.65", "laravel/sanctum": "^2.13", "laravel/tinker": "^2.5", + "php-http/guzzle7-adapter": "^1.0", "spatie/laravel-permission": "^5.3" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 05e3bbbf..47cc424e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f1a4693dce1d851ff833931d64de0180", + "content-hash": "c31afdc7c1e50fe368c759133eafd44f", "packages": [ { "name": "asm89/stack-cors", @@ -188,6 +188,72 @@ ], "time": "2021-08-15T20:50:18+00:00" }, + { + "name": "clue/stream-filter", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/clue/stream-filter.git", + "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\StreamFilter\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "A simple and modern approach to stream filtering in PHP", + "homepage": "https://github.com/clue/php-stream-filter", + "keywords": [ + "bucket brigade", + "callback", + "filter", + "php_user_filter", + "stream", + "stream_filter_append", + "stream_filter_register" + ], + "support": { + "issues": "https://github.com/clue/stream-filter/issues", + "source": "https://github.com/clue/stream-filter/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2020-10-02T12:38:20+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.1", @@ -1091,6 +1157,113 @@ ], "time": "2021-10-06T17:43:30+00:00" }, + { + "name": "http-interop/http-factory-guzzle", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/http-interop/http-factory-guzzle.git", + "reference": "8f06e92b95405216b237521cc64c804dd44c4a81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/8f06e92b95405216b237521cc64c804dd44c4a81", + "reference": "8f06e92b95405216b237521cc64c804dd44c4a81", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.7||^2.0", + "php": ">=7.3", + "psr/http-factory": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "^1.0" + }, + "require-dev": { + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "guzzlehttp/psr7": "Includes an HTTP factory starting in version 2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Http\\Factory\\Guzzle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "An HTTP Factory using Guzzle PSR7", + "keywords": [ + "factory", + "http", + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/http-interop/http-factory-guzzle/issues", + "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.0" + }, + "time": "2021-07-21T13:50:14+00:00" + }, + { + "name": "igorw/get-in", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/igorw/get-in.git", + "reference": "170ded831f49abc6a6061f655aba9bdbcf7b8111" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/get-in/zipball/170ded831f49abc6a6061f655aba9bdbcf7b8111", + "reference": "170ded831f49abc6a6061f655aba9bdbcf7b8111", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/get_in.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Functions for for hash map (assoc array) traversal.", + "keywords": [ + "assoc-array", + "hash-map" + ], + "support": { + "issues": "https://github.com/igorw/get-in/issues", + "source": "https://github.com/igorw/get-in/tree/v1.0.3" + }, + "time": "2014-12-15T23:03:51+00:00" + }, { "name": "intervention/image", "version": "2.7.1", @@ -1175,6 +1348,115 @@ ], "time": "2021-12-16T16:49:26+00:00" }, + { + "name": "jomweb/billplz", + "version": "v4.1.0", + "source": { + "type": "git", + "url": "https://github.com/jomweb/billplz.git", + "reference": "6449dcbb1b89fd9d98c1d68235b3801b1dc4ee25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jomweb/billplz/zipball/6449dcbb1b89fd9d98c1d68235b3801b1dc4ee25", + "reference": "6449dcbb1b89fd9d98c1d68235b3801b1dc4ee25", + "shasum": "" + }, + "require": { + "jomweb/ringgit": "^2.1", + "laravie/codex": "^5.1", + "laravie/codex-filter": "^1.0", + "php": ">=7.2", + "php-http/multipart-stream-builder": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.1", + "php-http/curl-client": "^2.0", + "phpunit/phpunit": "^8.4 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Billplz\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "PHP Agnostic library for working with BillPlz API", + "support": { + "issues": "https://github.com/jomweb/billplz/issues", + "source": "https://github.com/jomweb/billplz/tree/4.x" + }, + "time": "2020-02-17T14:15:32+00:00" + }, + { + "name": "jomweb/ringgit", + "version": "v2.4.1", + "source": { + "type": "git", + "url": "https://github.com/jomweb/ringgit.git", + "reference": "c9137299971e14652a9db0c8e73ff9d17c3075f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jomweb/ringgit/zipball/c9137299971e14652a9db0c8e73ff9d17c3075f3", + "reference": "c9137299971e14652a9db0c8e73ff9d17c3075f3", + "shasum": "" + }, + "require": { + "moneyphp/money": "^3.3 || ^4.0", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Duit\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "Malaysia Ringgit implementation on top of Money PHP", + "support": { + "issues": "https://github.com/jomweb/ringgit/issues", + "source": "https://github.com/jomweb/ringgit/tree/v2.4.1" + }, + "funding": [ + { + "url": "https://paypal.me/crynobone", + "type": "custom" + }, + { + "url": "https://liberapay.com/crynobone", + "type": "liberapay" + } + ], + "time": "2021-12-14T12:34:10+00:00" + }, { "name": "laravel/framework", "version": "v8.70.2", @@ -1538,6 +1820,204 @@ }, "time": "2021-09-28T15:47:34+00:00" }, + { + "name": "laravie/codex", + "version": "v5.3.2", + "source": { + "type": "git", + "url": "https://github.com/laravie/codex.git", + "reference": "07fbd9ffd09303b4964d305ad0c2bc738327def7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravie/codex/zipball/07fbd9ffd09303b4964d305ad0c2bc738327def7", + "reference": "07fbd9ffd09303b4964d305ad0c2bc738327def7", + "shasum": "" + }, + "require": { + "laravie/codex-common": "^1.4.3", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.0.1", + "laravie/codex-filter": "^1.2.1", + "mockery/mockery": "^1.3.1", + "php-http/guzzle7-adapter": "^1.0", + "php-http/multipart-stream-builder": "^1.0", + "phpstan/phpstan": "^0.12.90", + "phpunit/phpunit": "^8.4 || ^9.3.3" + }, + "suggest": { + "laravie/codex-filter": "Content filtering for Laravie Codex (^1.0)", + "php-http/multipart-stream-builder": "Allow to send multipart form request (^1.0)", + "phpunit/phpunit": "Allow to use Codex Faker request during testing (^8.4 || ^9.0)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravie\\Codex\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "PHP library for building API Client SDK for PHP", + "support": { + "issues": "https://github.com/laravie/codex/issues", + "source": "https://github.com/laravie/codex/tree/v5.3.2" + }, + "funding": [ + { + "url": "https://paypal.me/crynobone", + "type": "custom" + }, + { + "url": "https://liberapay.com/crynobone", + "type": "liberapay" + } + ], + "time": "2021-08-01T14:35:33+00:00" + }, + { + "name": "laravie/codex-common", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/laravie/codex-common.git", + "reference": "c843dcc1aefd326251d3415f3d74db1da2213e3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravie/codex-common/zipball/c843dcc1aefd326251d3415f3d74db1da2213e3e", + "reference": "c843dcc1aefd326251d3415f3d74db1da2213e3e", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.6 || ^2.0", + "http-interop/http-factory-guzzle": "^1.0", + "php": "^7.2 || ^8.0", + "php-http/client-common": "^2.0", + "php-http/client-implementation": "^1.0", + "php-http/discovery": "^1.13" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.0.1", + "mockery/mockery": "~1.3.1 || ^1.4.4", + "php-http/guzzle7-adapter": "^1.0", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laravie\\Codex\\Common\\": "src/Common/", + "Laravie\\Codex\\Contracts\\": "src/Contracts/", + "Laravie\\Codex\\Exceptions\\": "src/Exceptions/", + "Laravie\\Codex\\Testing\\": "src/Testing/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "Common PHP library for building API Client SDK for PHP", + "support": { + "issues": "https://github.com/laravie/codex-common/issues", + "source": "https://github.com/laravie/codex-common/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://paypal.me/crynobone", + "type": "custom" + }, + { + "url": "https://liberapay.com/crynobone", + "type": "liberapay" + } + ], + "time": "2022-01-06T03:05:05+00:00" + }, + { + "name": "laravie/codex-filter", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravie/codex-filter.git", + "reference": "a902b7ce2faef50ca97508569900a96488a35a9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravie/codex-filter/zipball/a902b7ce2faef50ca97508569900a96488a35a9e", + "reference": "a902b7ce2faef50ca97508569900a96488a35a9e", + "shasum": "" + }, + "require": { + "igorw/get-in": "^1.0", + "laravie/codex-common": "^1.4", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.1", + "php-http/guzzle7-adapter": "^0.1", + "phpstan/phpstan": "0.12.x-dev", + "phpunit/phpunit": "^8.4 || ^9.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravie\\Codex\\Filter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "Content filtering for Laravie Codex", + "support": { + "issues": "https://github.com/laravie/codex-filter/issues", + "source": "https://github.com/laravie/codex-filter/tree/v1.2.1" + }, + "funding": [ + { + "url": "https://paypal.me/crynobone", + "type": "custom" + }, + { + "url": "https://liberapay.com/crynobone", + "type": "liberapay" + } + ], + "time": "2021-08-01T13:57:49+00:00" + }, { "name": "league/commonmark", "version": "2.0.2", @@ -1881,6 +2361,92 @@ ], "time": "2021-09-25T08:23:19+00:00" }, + { + "name": "moneyphp/money", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "122664c2621a95180a13c1ac81fea1d2ef20781e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moneyphp/money/zipball/122664c2621a95180a13c1ac81fea1d2ef20781e", + "reference": "122664c2621a95180a13c1ac81fea1d2ef20781e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.6" + }, + "require-dev": { + "cache/taggable-cache": "^0.4.0", + "doctrine/instantiator": "^1.0.5", + "ext-bcmath": "*", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^1.0", + "florianv/swap": "^3.0", + "friends-of-phpspec/phpspec-code-coverage": "^3.1.1 || ^4.3", + "moneyphp/iso-currencies": "^3.2.1", + "php-http/message": "^1.4", + "php-http/mock-client": "^1.0.0", + "phpspec/phpspec": "^3.4.3", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.18 || ^8.5", + "psr/cache": "^1.0", + "symfony/phpunit-bridge": "^4" + }, + "suggest": { + "ext-bcmath": "Calculate without integer limits", + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Money\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" + } + ], + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "support": { + "issues": "https://github.com/moneyphp/money/issues", + "source": "https://github.com/moneyphp/money/tree/master" + }, + "time": "2020-03-18T17:49:59+00:00" + }, { "name": "monolog/monolog", "version": "2.3.5", @@ -2429,6 +2995,520 @@ }, "time": "2021-10-18T02:13:32+00:00" }, + { + "name": "php-http/client-common", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/client-common.git", + "reference": "d135751167d57e27c74de674d6a30cef2dc8e054" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/client-common/zipball/d135751167d57e27c74de674d6a30cef2dc8e054", + "reference": "d135751167d57e27c74de674d6a30cef2dc8e054", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/httplug": "^2.0", + "php-http/message": "^1.6", + "php-http/message-factory": "^1.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.17" + }, + "require-dev": { + "doctrine/instantiator": "^1.1", + "guzzlehttp/psr7": "^1.4", + "nyholm/psr7": "^1.2", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", + "phpspec/prophecy": "^1.10.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + }, + "suggest": { + "ext-json": "To detect JSON responses with the ContentTypePlugin", + "ext-libxml": "To detect XML responses with the ContentTypePlugin", + "php-http/cache-plugin": "PSR-6 Cache plugin", + "php-http/logger-plugin": "PSR-3 Logger plugin", + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\Common\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Common HTTP Client implementations and tools for HTTPlug", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "common", + "http", + "httplug" + ], + "support": { + "issues": "https://github.com/php-http/client-common/issues", + "source": "https://github.com/php-http/client-common/tree/2.5.0" + }, + "time": "2021-11-26T15:01:24+00:00" + }, + { + "name": "php-http/discovery", + "version": "1.14.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "de90ab2b41d7d61609f504e031339776bc8c7223" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/de90ab2b41d7d61609f504e031339776bc8c7223", + "reference": "de90ab2b41d7d61609f504e031339776bc8c7223", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "nyholm/psr7": "<1.0" + }, + "require-dev": { + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1", + "puli/composer-plugin": "1.0.0-beta10" + }, + "suggest": { + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr7" + ], + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.14.1" + }, + "time": "2021-09-18T07:57:46+00:00" + }, + { + "name": "php-http/guzzle7-adapter", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/guzzle7-adapter.git", + "reference": "fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/guzzle7-adapter/zipball/fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01", + "reference": "fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^7.0", + "php": "^7.2 | ^8.0", + "php-http/httplug": "^2.0", + "psr/http-client": "^1.0" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0", + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.0|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Adapter\\Guzzle7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + } + ], + "description": "Guzzle 7 HTTP Adapter", + "homepage": "http://httplug.io", + "keywords": [ + "Guzzle", + "http" + ], + "support": { + "issues": "https://github.com/php-http/guzzle7-adapter/issues", + "source": "https://github.com/php-http/guzzle7-adapter/tree/1.0.0" + }, + "time": "2021-03-09T07:35:15+00:00" + }, + { + "name": "php-http/httplug", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/promise": "^1.1", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "friends-of-phpspec/phpspec-code-coverage": "^4.1", + "phpspec/phpspec": "^5.1 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric GELOEN", + "email": "geloen.eric@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "support": { + "issues": "https://github.com/php-http/httplug/issues", + "source": "https://github.com/php-http/httplug/tree/master" + }, + "time": "2020-07-13T15:43:23+00:00" + }, + { + "name": "php-http/message", + "version": "1.12.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "39eb7548be982a81085fe5a6e2a44268cd586291" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/39eb7548be982a81085fe5a6e2a44268cd586291", + "reference": "39eb7548be982a81085fe5a6e2a44268cd586291", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.5", + "php": "^7.1 || ^8.0", + "php-http/message-factory": "^1.0.2", + "psr/http-message": "^1.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.6", + "ext-zlib": "*", + "guzzlehttp/psr7": "^1.0", + "laminas/laminas-diactoros": "^2.0", + "phpspec/phpspec": "^5.1 || ^6.3", + "slim/slim": "^3.0" + }, + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "laminas/laminas-diactoros": "Used with Diactoros Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + }, + "files": [ + "src/filters.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ], + "support": { + "issues": "https://github.com/php-http/message/issues", + "source": "https://github.com/php-http/message/tree/1.12.0" + }, + "time": "2021-08-29T09:13:12+00:00" + }, + { + "name": "php-http/message-factory", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-http/message-factory.git", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Factory interfaces for PSR-7 HTTP Message", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "stream", + "uri" + ], + "support": { + "issues": "https://github.com/php-http/message-factory/issues", + "source": "https://github.com/php-http/message-factory/tree/master" + }, + "time": "2015-12-19T14:08:53+00:00" + }, + { + "name": "php-http/multipart-stream-builder", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/multipart-stream-builder.git", + "reference": "11c1d31f72e01c738bbce9e27649a7cca829c30e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/11c1d31f72e01c738bbce9e27649a7cca829c30e", + "reference": "11c1d31f72e01c738bbce9e27649a7cca829c30e", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/discovery": "^1.7", + "php-http/message-factory": "^1.0.2", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "nyholm/psr7": "^1.0", + "php-http/message": "^1.5", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\MultipartStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + } + ], + "description": "A builder class that help you create a multipart stream", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "multipart stream", + "stream" + ], + "support": { + "issues": "https://github.com/php-http/multipart-stream-builder/issues", + "source": "https://github.com/php-http/multipart-stream-builder/tree/1.2.0" + }, + "time": "2021-05-21T08:32:01+00:00" + }, + { + "name": "php-http/promise", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", + "phpspec/phpspec": "^5.1.2 || ^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/php-http/promise/issues", + "source": "https://github.com/php-http/promise/tree/1.1.0" + }, + "time": "2020-07-07T09:29:14+00:00" + }, { "name": "phpoption/phpoption", "version": "1.8.0", @@ -4231,6 +5311,75 @@ ], "time": "2021-09-10T12:30:38+00:00" }, + { + "name": "symfony/options-resolver", + "version": "v5.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "b0fb78576487af19c500aaddb269fd36701d4847" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b0fb78576487af19c500aaddb269fd36701d4847", + "reference": "b0fb78576487af19c500aaddb269fd36701d4847", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-23T10:19:22+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.23.0", diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 64149651..ab6229ba 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -33,7 +33,7 @@ class CreateUsersTable extends Migration $table->datetime('email_verified_at')->nullable(); $table->string('password'); $table->datetime('disahkan_pada')->nullable(); - $table->datetime('disahkan_oleh')->nullable(); + $table->integer('disahkan_oleh')->nullable(); $table->string('user_type')->nullable(); //set 1,2 $table->rememberToken(); $table->timestamps(); diff --git a/database/migrations/2022_01_23_042652_create_lelongbidder_table.php b/database/migrations/2022_01_23_042652_create_lelongbidder_table.php new file mode 100644 index 00000000..1dd723f7 --- /dev/null +++ b/database/migrations/2022_01_23_042652_create_lelongbidder_table.php @@ -0,0 +1,50 @@ +bigIncrements('id'); + $table->unsignedBigInteger('user_id')->unsigned(); + $table->unsignedBigInteger('lelongbid_id')->unsigned(); + $table->string('nama_bidder'); + $table->decimal('hargabida'); + $table->string('notelbimbit'); + $table->decimal('nilaimarhun'); + $table->decimal('cajlelong'); + $table->integer('status_bidder')->nullable(); //1 = win + $table->integer('status_payment')->nullable(); // 1=paid + $table->datetime('masa_bidaan'); + $table->timestamps(); + + + $table->foreign('user_id') + ->references('id')->on('users') + ->onDelete('cascade'); + + $table->foreign('lelongbid_id') + ->references('id')->on('lelongbid') + ->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('lelongbidder'); + } +} diff --git a/database/migrations/2022_01_25_010223_create_payment_table.php b/database/migrations/2022_01_25_010223_create_payment_table.php new file mode 100644 index 00000000..60fcc5a4 --- /dev/null +++ b/database/migrations/2022_01_25_010223_create_payment_table.php @@ -0,0 +1,79 @@ +bigIncrements('id'); + $table->unsignedBigInteger('user_id')->unsigned(); + $table->unsignedBigInteger('lelongbidder_id')->unsigned()->nullable(); + $table->unsignedBigInteger('lelongbid_id')->unsigned(); + $table->string('kodcaw')->nullable(); + $table->decimal('total_payment')->nullable(); + $table->string('back_acc_pembeli')->nullable(); + $table->string('bank_acc_no_pembeli')->nullable(); + $table->string('nama_bank_acc_caw')->nullable(); + $table->string('bank_no_acc_caw')->nullable(); + $table->integer('status_payment_opt')->nullable(); //1=online,2=kaunter + $table->integer('resit_id'); + $table->integer('status'); //1 = fee RM10 , 2 = paybidifwin + $table->string('remark'); + $table->timestamps(); + + $table->foreign('user_id') + ->references('id')->on('users') + ->onDelete('cascade'); + + $table->foreign('lelongbid_id') + ->references('id')->on('lelongbid') + ->onDelete('cascade'); + + $table->foreign('lelongbidder_id') + ->references('id')->on('lelongbidder') + ->onDelete('cascade'); + }); + + Schema::create('resit', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->unsignedBigInteger('user_id')->unsigned(); + $table->unsignedBigInteger('lelongbid_id')->unsigned()->nullable(); + $table->string('reference_no')->nullable(); + $table->string('billplz_id'); + $table->decimal('total_payment', $precision = 9, $scale = 2); + $table->string('resit_type'); // 1 = fee , 2 = bid + $table->string('status')->nullable(); //status => 1 = paid , 2 = pending + $table->timestamp('paid_at')->nullable(); + $table->timestamps(); + + $table->foreign('user_id') + ->references('id')->on('users') + ->onDelete('cascade'); + + $table->foreign('lelongbid_id') + ->references('id')->on('lelongbid') + ->onDelete('cascade'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('payment'); + Schema::dropIfExists('resit'); + } +} diff --git a/database/seeders/RolesSeeder.php b/database/seeders/RolesSeeder.php index 7b100bf1..9df1079c 100644 --- a/database/seeders/RolesSeeder.php +++ b/database/seeders/RolesSeeder.php @@ -160,6 +160,7 @@ class RolesSeeder extends Seeder 'name' => 'Admin', 'username' => 'Admin', 'email' => 'admin@example.com', + 'user_type' => 1 ]); $user->assignRole($role1); @@ -167,6 +168,7 @@ class RolesSeeder extends Seeder 'name' => 'Khazanah', 'username' => 'Khazanah', 'email' => 'khazanah@example.com', + 'user_type' => 1 ]); $user->assignRole($role2); @@ -174,6 +176,7 @@ class RolesSeeder extends Seeder 'name' => 'Teller', 'username' => 'Teller', 'email' => 'teller@example.com', + 'user_type' => 1 ]); $user->assignRole($role3); @@ -181,6 +184,7 @@ class RolesSeeder extends Seeder 'name' => 'Pengurus Cawangan', 'username' => 'PC', 'email' => 'penguruscawangan@example.com', + 'user_type' => 1 ]); $user->assignRole($role4); @@ -188,6 +192,7 @@ class RolesSeeder extends Seeder 'name' => 'Juru Lelong', 'username' => 'Juru Lelong', 'email' => 'jurulelong@example.com', + 'user_type' => 1 ]); $user->assignRole($role5); @@ -195,6 +200,7 @@ class RolesSeeder extends Seeder 'name' => 'Operasi', 'username' => 'Operasi', 'email' => 'operasi@example.com', + 'user_type' => 1 ]); $user->assignRole($role6); @@ -202,6 +208,7 @@ class RolesSeeder extends Seeder 'name' => 'Account', 'username' => 'Account', 'email' => 'account@example.com', + 'user_type' => 1 ]); $user->assignRole($role7); @@ -209,6 +216,7 @@ class RolesSeeder extends Seeder 'name' => 'Pembida', 'username' => 'Pembida', 'email' => 'pembida@example.com', + 'user_type' => 2 ]); $user->assignRole($role8); } diff --git a/resources/views/includes/sidebar.blade.php b/resources/views/includes/sidebar.blade.php index 7717feac..b220e2d0 100644 --- a/resources/views/includes/sidebar.blade.php +++ b/resources/views/includes/sidebar.blade.php @@ -91,6 +91,9 @@ +
  • + Pengesahan Pembida Baharu +
  • @endhasrole @hasrole('account') {{--
  • diff --git a/resources/views/lelong/senarailelong.blade.php b/resources/views/lelong/senarailelong.blade.php index 04137887..3d3d957f 100644 --- a/resources/views/lelong/senarailelong.blade.php +++ b/resources/views/lelong/senarailelong.blade.php @@ -36,14 +36,17 @@ {{ $lel->cajlelong }} @hasrole('jurulelong') - + @if(!$lel->masatamat_lelong) + + + @elseif ($lel->sts_lelong == 2) + @else - + @endif - @endhasrole diff --git a/resources/views/pembida/senaraipembida.blade.php b/resources/views/pembida/senaraipembida.blade.php new file mode 100644 index 00000000..a5bd2cc3 --- /dev/null +++ b/resources/views/pembida/senaraipembida.blade.php @@ -0,0 +1,134 @@ +@extends('layouts.app') + +@section('content') +
    +
    +
    + + @if ($message = Session::get('success')) +
    +

    {{ $message }}

    +
    + @endif + +
    + @csrf + + + + + + + + + + + + + + + @foreach ($alluser as $user) + + + + + + + + + @endforeach + + +
    NamaNumber PhoneEmailStatusAction
    {{ $user->name }}{{ $user->notelbimbit }}{{ $user->email }} + @if ($user->status =='active') + + @elseif ($user->status =='banned') + + @endif + + + + {{-- --}} +
    +
    +
    + +
    +
    + + +@endsection diff --git a/resources/views/pembida/show.blade.php b/resources/views/pembida/show.blade.php new file mode 100644 index 00000000..ce4a88da --- /dev/null +++ b/resources/views/pembida/show.blade.php @@ -0,0 +1,83 @@ +@extends('layouts.app') + +@section('content') +
    +
    +
    + @if ($message = Session::get('success')) +
    +

    {{ $message }}

    +
    + @endif +
    + @csrf +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +

    Identity Card/Passport Picture

    +
    + @foreach ($files as $file) +
    + + + {{$file['ic64']}} +
    + @endforeach +
    +
    +
    + + Kembali + +
    + +
    + {{-- --}} +
    +
    +
    + +@endsection diff --git a/routes/api.php b/routes/api.php index 9ea4ff19..1a653a4c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -4,8 +4,9 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use App\Http\Controllers\AuthMobile\AuthController; use App\Http\Controllers\AuthMobile\UserController; +use App\Http\Controllers\AuthMobile\LelongMobileController; use App\Http\Controllers\CartController; -use App\Http\Controllers\AuthMobile\LelongController; +use App\Http\Controllers\ApiController; /* |-------------------------------------------------------------------------- @@ -24,21 +25,40 @@ Route::post('/login', [AuthController::class, 'login']); Route::post('/forgotpassword', [ResetPassword::class, 'forgotpassword']); Route::post('/addToCart', [CartController::class, 'addToCart']); Route::get('/cart/{userid}', [CartController::class, 'getCart']); + +// Route::post('/feepayment', [ApiController::class, 'feepayment']); +// Route::get('/callback', [ApiController::class, 'feepayment']); + +Route::post('/feepayment', [ApiController::class, 'feepayment'])->name('feepayment'); +Route::get('/pembayaran/response', [ApiController::class, 'response'])->name('pay.paymentStatus'); +Route::get('/pembayaran/backend', [ApiController::class, 'callback'])->name('pay.callback'); + //Protected routes Route::group(['middleware' => ['auth:sanctum']], function () { + // User Route::post('/logout', [AuthController::class, 'logout']); Route::get('/user/profile/{nokp}', [UserController::class, 'getProfileUser']); - - - - Route::post('/updateItem', [CartController::class, 'updateItem']); - Route::get('/deleteItem/{id}', [CartController::class, 'deleteCart']); Route::post('/forgotPassword', [NewPasswordController::class, 'forgotPassword']); - Route::post('/resetPassword', [NewPasswordController::class, 'reset']); + Route::post('/reset', [NewPasswordController::class, 'reset']); + + // User Profile Route::get('/user/profile', [UserController::class, 'getProfileUser']); Route::put('/userUpdate/profile', [UserController::class, 'updateProfileUser']); - Route::put('/lelong', [LelongController::class, 'listLelongDetails']); + + // Cart + Route::post('/updateItem', [CartController::class, 'updateItem']); + Route::get('/deleteItem/{id}', [CartController::class, 'deleteCart']); + + // Lelong + Route::get('/lelongDetails/today', [LelongMobileController::class, 'getlelongdetails']); + Route::get('/lelongDetails/cawangan', [LelongMobileController::class, 'searchLelByCaw']); + Route::get('/karat', [LelongMobileController::class, 'getListKarat']); + + // Lelong => Bidder + Route::post('/bidder/biditem', [LelongMobileController::class, 'bidderSelectBidItem']); + Route::get('/bidder/listbiditem', [LelongMobileController::class, 'listBidItem']); + }); diff --git a/routes/web.php b/routes/web.php index 2558ec25..9aba1b59 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,6 +1,7 @@ name('login'); +Route::get('/test', function () { + $response = Http::get('http://localhost:8000/api/lelongDetails/today')->json(); + dd($response); +})->name('test'); + Auth::routes(); Route::get('/home','HomeController@index')->name('home'); @@ -109,4 +115,11 @@ Route::group(['middleware' => ['permission:semakanmarhun','permission:kemaskinim Route::post('/exportmarhun',['as'=>'marhun.exportmarhundetails','uses'=>'MarhunController@exportmarhundetails']); +}); + +Route::group(['middleware' => ['permission:pengesahanpembida'],'prefix'=>'pembida'], function () { + Route::get('/senaraipembida',['as'=>'pembida.senaraipembida','uses'=>'PembidaController@index']); + Route::get('/pembida/{id}',['as'=>'pembida.show','uses'=>'PembidaController@show']); + Route::get('/deletepembida/{id}',['as'=>'pembida.delete','uses'=>'PembidaController@delete']); + Route::get('/sahkanpembida/{id}',['as'=>'pembida.sah','uses'=>'PembidaController@sah']); }); \ No newline at end of file