2017-11-03 05:26:07 +00:00
|
|
|
<?php
|
|
|
|
|
2023-05-13 11:20:56 +00:00
|
|
|
use Intuit\Controllers\Webhook;
|
|
|
|
|
2023-05-10 03:59:42 +00:00
|
|
|
use App\Http\Controllers\{AccountingController,
|
|
|
|
AdminController,
|
2023-05-06 11:48:46 +00:00
|
|
|
CheckoutController,
|
|
|
|
ProductController,
|
2023-05-10 03:59:42 +00:00
|
|
|
ResellerServicesController};
|
2018-04-10 11:23:13 +00:00
|
|
|
|
2017-11-03 05:26:07 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| API Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2018-04-10 11:23:13 +00:00
|
|
|
| Here is where you can register API routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
2017-11-03 05:26:07 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2022-04-02 07:06:34 +00:00
|
|
|
// Wholesaler API calls
|
|
|
|
Route::group(['middleware'=>['auth:api','role:wholesaler']], function() {
|
|
|
|
Route::get('a/supplier_products',[ProductController::class,'api_supplier_products']);
|
|
|
|
});
|
|
|
|
|
2022-06-13 04:21:48 +00:00
|
|
|
// Reseller API calls
|
|
|
|
Route::group(['middleware'=>['auth:api','role:reseller']], function() {
|
2022-06-13 05:46:38 +00:00
|
|
|
Route::post('r/invoices/{o}',[AdminController::class,'pay_invoices'])
|
|
|
|
->where('o','[0-9]+')
|
|
|
|
->middleware(['theme:adminlte-be','role:wholesaler']);
|
2022-06-13 04:21:48 +00:00
|
|
|
});
|
|
|
|
|
2018-06-05 11:13:57 +00:00
|
|
|
Route::group(['middleware'=>'auth:api'], function() {
|
2021-06-30 05:50:33 +00:00
|
|
|
Route::post('/u/checkout/fee/{o}',[CheckoutController::class,'fee'])
|
2020-07-27 04:49:59 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-05-10 03:59:42 +00:00
|
|
|
|
|
|
|
Route::any('/intuit/accounting/list',[AccountingController::class,'list']);
|
2023-05-06 11:48:46 +00:00
|
|
|
});
|
|
|
|
|
2023-05-13 11:20:56 +00:00
|
|
|
Route::any('/intuit/webhook',[Webhook::class,'webhook']);
|