mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-21 05:24:09 +00:00
fix yd delivery address update api
This commit is contained in:
@@ -42,12 +42,11 @@ class UpdateDoFromYDPortalProcessor
|
||||
->where('status', '!=', ApprovalStatus::SUSPENDED)
|
||||
->orderBy('id', 'desc')->get();
|
||||
|
||||
Log::error($packing_lists);
|
||||
|
||||
dd($packing_lists);
|
||||
foreach ($packing_lists as $key => $row) {
|
||||
|
||||
if ($row->status === ApprovalStatus::SUSPENDED) {
|
||||
$yd_do_update = $this->fetchesDataFRomYDPortal->clientRequest(
|
||||
$this->fetchesDataFRomYDPortal->clientRequest(
|
||||
'http://www.yd-wl.com/api/UpdateOrderAddress.ashx',
|
||||
'POST',
|
||||
[
|
||||
@@ -58,7 +57,6 @@ class UpdateDoFromYDPortalProcessor
|
||||
'streetAddress' => ''
|
||||
]);
|
||||
|
||||
$this->fetchesDataFRomYDPortal->getResponseBody($yd_do_update);
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -68,7 +66,7 @@ class UpdateDoFromYDPortalProcessor
|
||||
$phone = $contact ? $contact->phone : null;
|
||||
$reference = $contact ? $contact->reference : null;
|
||||
|
||||
$yd_do_update = $this->fetchesDataFRomYDPortal->clientRequest(
|
||||
$this->fetchesDataFRomYDPortal->clientRequest(
|
||||
'http://www.yd-wl.com/api/UpdateOrderAddress.ashx',
|
||||
'POST',
|
||||
[
|
||||
@@ -80,12 +78,10 @@ class UpdateDoFromYDPortalProcessor
|
||||
|
||||
]);
|
||||
|
||||
Log::error($this->fetchesDataFRomYDPortal->getResponseBody($yd_do_update));
|
||||
|
||||
}
|
||||
|
||||
} catch (\Exception $exception){
|
||||
Log::error($exception);
|
||||
throw new InternalServerErrorException('failed to approve address due to an error related to YD portal');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user