diff --git a/app/Classes/Modules/Accounts/Processors/RegisterOnShippingProcessor.php b/app/Classes/Modules/Accounts/Processors/RegisterOnShippingProcessor.php index 0a87fed3..82a4a92c 100644 --- a/app/Classes/Modules/Accounts/Processors/RegisterOnShippingProcessor.php +++ b/app/Classes/Modules/Accounts/Processors/RegisterOnShippingProcessor.php @@ -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(); diff --git a/app/Classes/Modules/Bookings/ControllersLogic/TrackBookingShipmentLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/TrackBookingShipmentLogic.php index 3370c804..9ca895f5 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/TrackBookingShipmentLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/TrackBookingShipmentLogic.php @@ -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}"); } } diff --git a/app/Classes/Modules/Companies/Processors/ApproveIdentificationDocumentOnShippingProcessor.php b/app/Classes/Modules/Companies/Processors/ApproveIdentificationDocumentOnShippingProcessor.php index f1f39714..41d7229a 100644 --- a/app/Classes/Modules/Companies/Processors/ApproveIdentificationDocumentOnShippingProcessor.php +++ b/app/Classes/Modules/Companies/Processors/ApproveIdentificationDocumentOnShippingProcessor.php @@ -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(); diff --git a/app/Classes/Modules/Companies/Processors/CreateIdentificationDocumentOnShippingProcessor.php b/app/Classes/Modules/Companies/Processors/CreateIdentificationDocumentOnShippingProcessor.php index 37b0ba31..7b3510e8 100644 --- a/app/Classes/Modules/Companies/Processors/CreateIdentificationDocumentOnShippingProcessor.php +++ b/app/Classes/Modules/Companies/Processors/CreateIdentificationDocumentOnShippingProcessor.php @@ -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]); diff --git a/app/Classes/Modules/Companies/Processors/LinkShippingCompanyProcessor.php b/app/Classes/Modules/Companies/Processors/LinkShippingCompanyProcessor.php index 8c5a13d4..f47f2824 100644 --- a/app/Classes/Modules/Companies/Processors/LinkShippingCompanyProcessor.php +++ b/app/Classes/Modules/Companies/Processors/LinkShippingCompanyProcessor.php @@ -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]);