DONE: use annur api when feature enabled
This commit is contained in:
@@ -4,6 +4,8 @@ APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
|
|||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
APP_TIMEZONE=Asia/Kuala_Lumpur
|
APP_TIMEZONE=Asia/Kuala_Lumpur
|
||||||
|
API_ARRAHNBID=http://lelong.test/api/
|
||||||
|
API_ARRAHNBID_ANNUR=http://lelong-annur.test/api/
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ APP_DEBUG=true
|
|||||||
APP_URL=http://api_arrahn.test
|
APP_URL=http://api_arrahn.test
|
||||||
APP_TIMEZONE=Asia/Kuala_Lumpur
|
APP_TIMEZONE=Asia/Kuala_Lumpur
|
||||||
API_ARRAHNBID=http://lelong.test/api/
|
API_ARRAHNBID=http://lelong.test/api/
|
||||||
|
API_ARRAHNBID_ANNUR=http://lelong-annur.test/api/
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_SLACK_WEBHOOK_URL=
|
LOG_SLACK_WEBHOOK_URL=
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
|
|||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
APP_URL=https://apiujrah.erahn.com.my
|
APP_URL=https://apiujrah.erahn.com.my
|
||||||
APP_TIMEZONE=Asia/Kuala_Lumpur
|
APP_TIMEZONE=Asia/Kuala_Lumpur
|
||||||
|
API_ARRAHNBID=https://adminbid-kopkb.erahn.com.my/api/
|
||||||
|
API_ARRAHNBID_ANNUR=https://adminbid-annur.erahn.com.my/api/
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_SLACK_WEBHOOK_URL=
|
LOG_SLACK_WEBHOOK_URL=
|
||||||
|
|||||||
-244
@@ -1,244 +0,0 @@
|
|||||||
APP_NAME=Lumen
|
|
||||||
APP_ENV=local
|
|
||||||
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
|
|
||||||
APP_DEBUG=false
|
|
||||||
APP_URL=https://api.arrahn.com.my
|
|
||||||
APP_TIMEZONE=Asia/Kuala_Lumpur
|
|
||||||
|
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
|
||||||
LOG_SLACK_WEBHOOK_URL=
|
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=172.16.4.102
|
|
||||||
DB_PORT=3306
|
|
||||||
DB_DATABASE=arrahn_kb2
|
|
||||||
DB_USERNAME=zone2
|
|
||||||
DB_PASSWORD=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_2=mysql
|
|
||||||
DB_HOST_2=172.16.4.102
|
|
||||||
DB_PORT_2=3306
|
|
||||||
DB_DATABASE_2=arrahn_wcy
|
|
||||||
DB_USERNAME_2=zone2
|
|
||||||
DB_PASSWORD_2=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_3=mysql
|
|
||||||
DB_HOST_3=172.16.4.102
|
|
||||||
DB_PORT_3=3306
|
|
||||||
DB_DATABASE_3=arrahn_1stop
|
|
||||||
DB_USERNAME_3=zone2
|
|
||||||
DB_PASSWORD_3=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_4=mysql
|
|
||||||
DB_HOST_4=172.16.4.102
|
|
||||||
DB_PORT_4=3306
|
|
||||||
DB_DATABASE_4=arrahn_jlwt
|
|
||||||
DB_USERNAME_4=zone2
|
|
||||||
DB_PASSWORD_4=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_5=mysql
|
|
||||||
DB_HOST_5=172.16.4.102
|
|
||||||
DB_PORT_5=3306
|
|
||||||
DB_DATABASE_5=arrahn_wb
|
|
||||||
DB_USERNAME_5=zone2
|
|
||||||
DB_PASSWORD_5=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_6=mysql
|
|
||||||
DB_HOST_6=172.16.4.102
|
|
||||||
DB_PORT_6=3306
|
|
||||||
DB_DATABASE_6=arrahn_kls
|
|
||||||
DB_USERNAME_6=zone2
|
|
||||||
DB_PASSWORD_6=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_7=mysql
|
|
||||||
DB_HOST_7=172.16.4.102
|
|
||||||
DB_PORT_7=3306
|
|
||||||
DB_DATABASE_7=online_arrahn
|
|
||||||
DB_USERNAME_7=zone2
|
|
||||||
DB_PASSWORD_7=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_8=mysql
|
|
||||||
DB_HOST_8=172.16.4.102
|
|
||||||
DB_PORT_8=3306
|
|
||||||
DB_DATABASE_8=arrahn_pp
|
|
||||||
DB_USERNAME_8=zone2
|
|
||||||
DB_PASSWORD_8=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_9=mysql
|
|
||||||
DB_HOST_9=172.16.4.102
|
|
||||||
DB_PORT_9=3306
|
|
||||||
DB_DATABASE_9=arrahn_mace
|
|
||||||
DB_USERNAME_9=zone2
|
|
||||||
DB_PASSWORD_9=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_10=mysql
|
|
||||||
DB_HOST_10=172.16.4.102
|
|
||||||
DB_PORT_10=3306
|
|
||||||
DB_DATABASE_10=arrahn_pm
|
|
||||||
DB_USERNAME_10=zone2
|
|
||||||
DB_PASSWORD_10=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_11=mysql
|
|
||||||
DB_HOST_11=172.16.4.102
|
|
||||||
DB_PORT_11=3306
|
|
||||||
DB_DATABASE_11=arrahn_gm
|
|
||||||
DB_USERNAME_11=zone2
|
|
||||||
DB_PASSWORD_11=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_12=mysql
|
|
||||||
DB_HOST_12172.16.4.102
|
|
||||||
DB_PORT_12=3306
|
|
||||||
DB_DATABASE_12=arrahn_gcl
|
|
||||||
DB_USERNAME_12=zone2
|
|
||||||
DB_PASSWORD_12=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_13=mysql
|
|
||||||
DB_HOST_13=172.16.4.102
|
|
||||||
DB_PORT_13=3306
|
|
||||||
DB_DATABASE_13=arrahn_jli
|
|
||||||
DB_USERNAME_13=zone2
|
|
||||||
DB_PASSWORD_13=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_14=mysql
|
|
||||||
DB_HOST_14=172.16.4.102
|
|
||||||
DB_PORT_14=3306
|
|
||||||
DB_DATABASE_14=arrahn_rp
|
|
||||||
DB_USERNAME_14=zone2
|
|
||||||
DB_PASSWORD_14=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_15=mysql
|
|
||||||
DB_HOST_15=172.16.4.102
|
|
||||||
DB_PORT_15=3306
|
|
||||||
DB_DATABASE_15=arrahn_ktn
|
|
||||||
DB_USERNAME_15=zone2
|
|
||||||
DB_PASSWORD_15=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_16=mysql
|
|
||||||
DB_HOST_16=172.16.4.102
|
|
||||||
DB_PORT_16=3306
|
|
||||||
DB_DATABASE_16=arrahn_pg
|
|
||||||
DB_USERNAME_16=zone2
|
|
||||||
DB_PASSWORD_16=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_17=mysql
|
|
||||||
DB_HOST_17=172.16.4.102
|
|
||||||
DB_PORT_17=3306
|
|
||||||
DB_DATABASE_17=arrahn_skudai
|
|
||||||
DB_USERNAME_17=zone2
|
|
||||||
DB_PASSWORD_17=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_18=mysql
|
|
||||||
DB_HOST_18=172.16.4.102
|
|
||||||
DB_PORT_18=3306
|
|
||||||
DB_DATABASE_18=arrahn_pttn
|
|
||||||
DB_USERNAME_18=zone2
|
|
||||||
DB_PASSWORD_18=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_19=mysql
|
|
||||||
DB_HOST_19=172.16.4.102
|
|
||||||
DB_PORT_19=3306
|
|
||||||
DB_DATABASE_19=arrahn_btg
|
|
||||||
DB_USERNAME_19=zone2
|
|
||||||
DB_PASSWORD_19=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_20=mysql
|
|
||||||
DB_HOST_20=172.16.4.102
|
|
||||||
DB_PORT_20=3306
|
|
||||||
DB_DATABASE_20=arrahn_raub
|
|
||||||
DB_USERNAME_20=zone2
|
|
||||||
DB_PASSWORD_20=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_21=mysql
|
|
||||||
DB_HOST_21=172.16.4.102
|
|
||||||
DB_PORT_21=3306
|
|
||||||
DB_DATABASE_21=arrahn_kgr
|
|
||||||
DB_USERNAME_21=zone2
|
|
||||||
DB_PASSWORD_21=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_22=mysql
|
|
||||||
DB_HOST_22=172.16.4.102
|
|
||||||
DB_PORT_22=3306
|
|
||||||
DB_DATABASE_22=arrahn_sdk
|
|
||||||
DB_USERNAME_22=zone2
|
|
||||||
DB_PASSWORD_22=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_23=mysql
|
|
||||||
DB_HOST_23=172.16.4.102
|
|
||||||
DB_PORT_23=3306
|
|
||||||
DB_DATABASE_23=arrahn_sp
|
|
||||||
DB_USERNAME_23=zone2
|
|
||||||
DB_PASSWORD_23=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_24=mysql
|
|
||||||
DB_HOST_24=172.16.4.102
|
|
||||||
DB_PORT_24=3306
|
|
||||||
DB_DATABASE_24=arrahn_twu
|
|
||||||
DB_USERNAME_24=zone2
|
|
||||||
DB_PASSWORD_24=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_25=mysql
|
|
||||||
DB_HOST_25=172.16.4.102
|
|
||||||
DB_PORT_25=3306
|
|
||||||
DB_DATABASE_25=arrahn_api2
|
|
||||||
DB_USERNAME_25=zone2
|
|
||||||
DB_PASSWORD_25=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_26=mysql
|
|
||||||
DB_HOST_26=172.16.4.102
|
|
||||||
DB_PORT_26=3306
|
|
||||||
DB_DATABASE_26=arrahn_kjg
|
|
||||||
DB_USERNAME_26=zone2
|
|
||||||
DB_PASSWORD_26=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_27=mysql
|
|
||||||
DB_HOST_27=172.16.4.102
|
|
||||||
DB_PORT_27=3306
|
|
||||||
DB_DATABASE_27=arrahn_rl
|
|
||||||
DB_USERNAME_27=zone2
|
|
||||||
DB_PASSWORD_27=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_28=mysql
|
|
||||||
DB_HOST_28=172.16.4.102
|
|
||||||
DB_PORT_28=3306
|
|
||||||
DB_DATABASE_28=arrahn_bfort
|
|
||||||
DB_USERNAME_28=zone2
|
|
||||||
DB_PASSWORD_28=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_29=mysql
|
|
||||||
DB_HOST_29=172.16.4.102
|
|
||||||
DB_PORT_29=3306
|
|
||||||
DB_DATABASE_29=arrahn_kbelud
|
|
||||||
DB_USERNAME_29=zone2
|
|
||||||
DB_PASSWORD_29=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_30=mysql
|
|
||||||
DB_HOST_30=172.16.4.102
|
|
||||||
DB_PORT_30=3306
|
|
||||||
DB_DATABASE_30=arrahn_tuaran
|
|
||||||
DB_USERNAME_30=zone2
|
|
||||||
DB_PASSWORD_30=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_31=mysql
|
|
||||||
DB_HOST_31=172.16.4.102
|
|
||||||
DB_PORT_31=3306
|
|
||||||
DB_DATABASE_31=arrahn_kngau
|
|
||||||
DB_USERNAME_31=zone2
|
|
||||||
DB_PASSWORD_31=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_32=mysql
|
|
||||||
DB_HOST_32=172.16.4.102
|
|
||||||
DB_PORT_32=3306
|
|
||||||
DB_DATABASE_32=arrahn_tm
|
|
||||||
DB_USERNAME_32=zone2
|
|
||||||
DB_PASSWORD_32=G0dz!ll4@2020
|
|
||||||
|
|
||||||
DB_CONNECTION_33=mysql
|
|
||||||
DB_HOST_33=172.16.4.102
|
|
||||||
DB_PORT_33=3306
|
|
||||||
DB_DATABASE_33=arrahn_tmlh
|
|
||||||
DB_USERNAME_33=zone2
|
|
||||||
DB_PASSWORD_33=G0dz!ll4@2020
|
|
||||||
|
|
||||||
CACHE_DRIVER=file
|
|
||||||
QUEUE_CONNECTION=sync
|
|
||||||
@@ -46,6 +46,28 @@ class Feature
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lelong portal base URL for this branch. rebet_annur branches (Annur/Tampoi)
|
||||||
|
* use API_ARRAHNBID_ANNUR; everyone else uses API_ARRAHNBID.
|
||||||
|
*
|
||||||
|
* Always returned with a trailing slash so callers can append 'portalApi'.
|
||||||
|
*
|
||||||
|
* @param string $kodcaw
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function arrahnbidUrl($kodcaw)
|
||||||
|
{
|
||||||
|
$url = config('app_parameter.api_arrahnbid');
|
||||||
|
if ($kodcaw && self::enabled($kodcaw, self::REBET_ANNUR)) {
|
||||||
|
$annur = config('app_parameter.api_arrahnbid_annur');
|
||||||
|
if ($annur) {
|
||||||
|
$url = $annur;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rtrim((string) $url, '/') . '/';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Missing row is off (fail closed).
|
* Missing row is off (fail closed).
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class CawanganController extends Controller
|
|||||||
|
|
||||||
$data = $cawangan->toArray();
|
$data = $cawangan->toArray();
|
||||||
$data['features'] = Feature::mapFor($code_cawangan);
|
$data['features'] = Feature::mapFor($code_cawangan);
|
||||||
|
$data['api_arrahnbid'] = Feature::arrahnbidUrl($code_cawangan);
|
||||||
|
|
||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use App\Negeri;
|
|||||||
use App\Lelong;
|
use App\Lelong;
|
||||||
use App\Transaction;
|
use App\Transaction;
|
||||||
use App\Cawangan;
|
use App\Cawangan;
|
||||||
|
use App\Feature;
|
||||||
use App\Gadai;
|
use App\Gadai;
|
||||||
use App\TuntutBaki;
|
use App\TuntutBaki;
|
||||||
use App\WTD;
|
use App\WTD;
|
||||||
@@ -604,13 +605,7 @@ class LelongController extends Controller
|
|||||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
||||||
|
|
||||||
if($cawangan['tagarrahnbid'] == 1){
|
if($cawangan['tagarrahnbid'] == 1){
|
||||||
if(env('APP_ENV') != 'production'){
|
$lelong = Http::withOptions(['verify' => true])->get(Feature::arrahnbidUrl($request->kodcaw).'portalApi',[
|
||||||
$link = 'https://adminbid-kopkb.erahn.com.my/api/portalApi';
|
|
||||||
}else{
|
|
||||||
$link = 'https://adminbid-kopkb.erahn.com.my/api/portalApi';
|
|
||||||
}
|
|
||||||
|
|
||||||
$lelong = Http::withOptions(['verify' => true])->get($link,[
|
|
||||||
'norujukan' => $request->norujukan
|
'norujukan' => $request->norujukan
|
||||||
])->json();
|
])->json();
|
||||||
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
||||||
@@ -656,7 +651,7 @@ class LelongController extends Controller
|
|||||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw', '=', $request->kodcaw)->first();
|
$cawangan = Cawangan::on('mysql7')->where('kodcaw', '=', $request->kodcaw)->first();
|
||||||
|
|
||||||
if ($cawangan['tagarrahnbid'] == 0){
|
if ($cawangan['tagarrahnbid'] == 0){
|
||||||
$lelong = Http::withOptions(['verify' => true])->get(config('app_parameter.api_arrahnbid').'portalApi',[
|
$lelong = Http::withOptions(['verify' => true])->get(Feature::arrahnbidUrl($request->kodcaw).'portalApi',[
|
||||||
'norujukan' => $request->norujukan
|
'norujukan' => $request->norujukan
|
||||||
])->json();
|
])->json();
|
||||||
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
||||||
@@ -729,7 +724,7 @@ class LelongController extends Controller
|
|||||||
|
|
||||||
if($cawangan['tagarrahnbid'] == 1)
|
if($cawangan['tagarrahnbid'] == 1)
|
||||||
{
|
{
|
||||||
$lelong = Http::withOptions(['verify' => true])->get(config('app_parameter.api_arrahnbid').'portalApi',['norujukan' => $request->norujukan])->json();
|
$lelong = Http::withOptions(['verify' => true])->get(Feature::arrahnbidUrl($request->kodcaw).'portalApi',['norujukan' => $request->norujukan])->json();
|
||||||
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
||||||
}else{
|
}else{
|
||||||
$lelong = Lelong::on($cawangan['mysql'])->where([['norujukan',$request->norujukan]])->first();
|
$lelong = Lelong::on($cawangan['mysql'])->where([['norujukan',$request->norujukan]])->first();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
return [
|
return [
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
'api_arrahnbid' => env('API_ARRAHNBID', 'http://lelong.test/api/'),
|
'api_arrahnbid' => env('API_ARRAHNBID', 'http://lelong.test/api/'),
|
||||||
|
'api_arrahnbid_annur' => env('API_ARRAHNBID_ANNUR', env('API_ARRAHNBID', 'http://lelong.test/api/')),
|
||||||
'api_v3' => env('API_V3', 'http://apiv3.localhost/api/')
|
'api_v3' => env('API_V3', 'http://apiv3.localhost/api/')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user