|
|
@@ -127,21 +127,24 @@ class Logistics
|
|
|
'sender_post_code' => '47620', // 发件人邮政编码
|
|
|
'sender_address' => '11, 2nd Floor, Jalan TP5, Taman Perindustrian UEP, Subang Jaya', // 发件人地址
|
|
|
'sender_telephone' => '0380210088', // 发件人电话号码
|
|
|
- 'products' => [
|
|
|
- [
|
|
|
- 'product_no' => $order['SKU_CODE'], // 客户系统中的产品编号
|
|
|
- 'product_name' => $order['GOODS_TITLE'], // 产品名称
|
|
|
- 'tracking_number' => Date::today('Ymd') . $this->_random(10, 1),
|
|
|
- 'quantity' => $order['BUY_NUMS'], // 产品数量
|
|
|
- 'total_price' => number_format(100, 2, '.', ''), // 订单总金额,Decimal 方便通关,固定100马币
|
|
|
- 'currency_code' => 'MYR', // 产品的货币代码. 如USD(美元),MYR(马来西亚林吉特),SGD(新加坡元),CNY(人民币)
|
|
|
- ],
|
|
|
- ],
|
|
|
];
|
|
|
|
|
|
+ $products = [];
|
|
|
+ foreach ($order as $item) {
|
|
|
+ $products[] = [
|
|
|
+ 'product_no' => $item['SKU_CODE'], // 客户系统中的产品编号
|
|
|
+ 'product_name' => $item['GOODS_TITLE'], // 产品名称
|
|
|
+ 'tracking_number' => Date::today('Ymd') . $this->_random(10, 1),
|
|
|
+ 'quantity' => $item['BUY_NUMS'], // 产品数量
|
|
|
+ 'total_price' => number_format(100, 2, '.', ''), // 订单总金额,Decimal 方便通关,固定100马币
|
|
|
+ 'currency_code' => 'MYR', // 产品的货币代码. 如USD(美元),MYR(马来西亚林吉特),SGD(新加坡元),CNY(人民币)
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ $request['products'] = $products;
|
|
|
+
|
|
|
LoggerTool::info(['actionLogisticsOrder', $request]);
|
|
|
|
|
|
- return $this->curl(self::createOrderUrl, $request);
|
|
|
+// return $this->curl(self::createOrderUrl, $request);
|
|
|
}
|
|
|
|
|
|
// 3.获取产品/包裹的重量和状态.
|