updates for dev environment

This commit is contained in:
JiaSheng
2023-11-22 16:18:02 +08:00
parent 1f057e464e
commit 8f20c0e8a8
5 changed files with 23 additions and 9 deletions
@@ -19,9 +19,11 @@ class RegisterOnShippingProcessor
if (App::environment(['production'])) {
dd("Delete this line before push to production");
$url = 'https://izyim.cief-malaysia.com/api/v1/account/registration';
} else {
} else if (App::environment(['local'])) {
$url = 'http://127.0.0.1:8001/api/v1/account/registration';
}
} else {
$url = 'https://dev.portal.cief-malaysia.com/api/v1/account/registration';
}
try {
$client = new \GuzzleHttp\Client(['verify' => false]);
$formParams = $request->toArray();
@@ -78,16 +78,22 @@ class TrackBookingShipmentLogic
if (App::environment(['production'])) {
dd("Delete this line before push to production");
return redirect("https://izyim.cief-malaysia.com/?exchangeToken={$token}&orderId={$shippingOrder->shipping_order_id}");
} else if (App::environment(['local'])) {
return redirect("http://127.0.0.1:8001/?exchangeToken={$token}&orderId={$shippingOrder->shipping_order_id}");
} else {
return redirect("https://dev.portal.cief-malaysia.com/?exchangeToken={$token}&orderId={$shippingOrder->shipping_order_id}");
}
return redirect("http://127.0.0.1:8001/?exchangeToken={$token}&orderId={$shippingOrder->shipping_order_id}");
} else {
// else create the order for current booking by putting in booking id into token
$token = $this->generatesAuthenticationTokenWithBookingId->execute($user, $booking->id);
if (App::environment(['production'])) {
dd("Delete this line before push to production");
return redirect("https://izyim.cief-malaysia.com/?exchangeToken={$token}&orderId={$shippingOrder->shipping_order_id}");
return redirect("https://izyim.cief-malaysia.com/?exchangeToken={$token}");
} else if (App::environment(['local'])) {
return redirect("http://127.0.0.1:8001/?exchangeToken={$token}");
} else {
return redirect("https://dev.portal.cief-malaysia.com/?exchangeToken={$token}");
}
return redirect("http://127.0.0.1:8001/?exchangeToken={$token}");
}
}
@@ -19,9 +19,11 @@ class ApproveIdentificationDocumentOnShippingProcessor
if (App::environment(['production'])) {
dd("Delete this line before push to production");
$url = "https://izyim.cief-malaysia.com/api/v1/exchange/company/{$companyId}/identification/approval/{$status}";
} else {
} else if (App::environment(['local'])) {
$url = "http://127.0.0.1:8001/api/v1/exchange/company/{$companyId}/identification/approval/{$status}";
}
} else {
$url = "https://dev.portal.cief-malaysia.com/api/v1/exchange/company/{$companyId}/identification/approval/{$status}";
}
try {
$client = new \GuzzleHttp\Client(['verify' => false]);
$token = $request->bearerToken();
@@ -19,8 +19,10 @@ class CreateIdentificationDocumentOnShippingProcessor
if (App::environment(['production'])) {
dd("Delete this line before push to production");
$url = "https://izyim.cief-malaysia.com/api/v1/exchange/company/{$companyId}/identification/create";
} else {
} else if (App::environment(['local'])) {
$url = "http://127.0.0.1:8001/api/v1/exchange/company/{$companyId}/identification/create";
} else {
$url = "https://dev.portal.cief-malaysia.com/api/v1/exchange/company/{$companyId}/identification/create";
}
try {
$client = new \GuzzleHttp\Client(['verify' => false]);
@@ -20,8 +20,10 @@ class LinkShippingCompanyProcessor
if (App::environment(['production'])) {
dd("Delete this line before push to production");
$url = "https://izyim.cief-malaysia.com/api/v1/exchange/company/{$companyId}/connect";
} else {
} else if (App::environment(['local'])) {
$url = "http://127.0.0.1:8001/api/v1/exchange/company/{$companyId}/connect";
} else {
$url = "https://dev.portal.cief-malaysia.com/api/v1/exchange/company/{$companyId}/connect";
}
try {
$client = new \GuzzleHttp\Client(['verify' => false]);