mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
yd api to fetch 30 days
This commit is contained in:
+13
-9
@@ -236,17 +236,21 @@ class FetchOrderListsFromYdPortalProcessor
|
|||||||
|
|
||||||
$client = new \GuzzleHttp\Client(['cookies' => true, 'headers' => ['Cookie' => 'utc_offset=480']]);
|
$client = new \GuzzleHttp\Client(['cookies' => true, 'headers' => ['Cookie' => 'utc_offset=480']]);
|
||||||
|
|
||||||
$request = $client->request('get', 'https://main.universe.com.my/Tracking/User/Paging?sEcho=1&sTrackingNo='.$row->expressno.'&sOrgId=sti');
|
try {
|
||||||
$deliveryTracking = json_decode($request->getBody()->getContents());
|
$request = $client->request('get', 'https://main.universe.com.my/Tracking/User/Paging?sEcho=1&sTrackingNo='.$row->expressno.'&sOrgId=sti');
|
||||||
foreach (array_reverse($deliveryTracking->aaData) as $trackingRow) {
|
$deliveryTracking = json_decode($request->getBody()->getContents());
|
||||||
$trackingDate = Carbon::createFromFormat('d/m/y H:i', $trackingRow->LocalDateTime);
|
foreach (array_reverse($deliveryTracking->aaData) as $trackingRow) {
|
||||||
if (Str::contains($trackingRow->PublicDescription, ['accepted/picked'])){
|
$trackingDate = Carbon::createFromFormat('d/m/y H:i', $trackingRow->LocalDateTime);
|
||||||
$unstuffingDate = $trackingDate;
|
if (Str::contains($trackingRow->PublicDescription, ['accepted/picked'])){
|
||||||
}
|
$unstuffingDate = $trackingDate;
|
||||||
|
}
|
||||||
|
|
||||||
if (Str::contains($trackingRow->PublicDescription, ['delivered'])) {
|
if (Str::contains($trackingRow->PublicDescription, ['delivered'])) {
|
||||||
$deliveryDate = $trackingDate;
|
$deliveryDate = $trackingDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (\Exception $exception){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$customerno = preg_split('(-|\(|\)|\/)', $row->customerno);
|
$customerno = preg_split('(-|\(|\)|\/)', $row->customerno);
|
||||||
|
|||||||
Reference in New Issue
Block a user