欧美专业色无码图网站|日韩av亚洲色情|国产色在线观看欧美性爱色|视频黄色无码欧美人人爱超碰|自拍偷拍国产精品|a片在线不卡91AV地址|日韩精品中出内射|99精品久久一二三四|国产在线性爱视频|AV网站在线免费看

華磊物流接口,php語言開發(fā)實(shí)例

電子商務(wù) admin 發(fā)布時(shí)間:2025-12-30 09:14:57 瀏覽: 次
有些電商平臺(tái)需要對(duì)接物流接口,這樣可以在會(huì)員下單后自動(dòng)對(duì)接物流接口,給第三方物流自動(dòng)下單,會(huì)員也可以在訂單詳情中查看物流單號(hào),進(jìn)一步跟蹤物流信息。
公司最近對(duì)接一個(gè)華磊物流接口,用php語言開發(fā),閑話不說,直接上代碼和截圖。

//配置信息:淼信荷蘭小包
        $product_id = 4901;  //產(chǎn)品id
        $format = 'lbl_NL_XIN.frx';   //打印類型
        $printType = 1;  //打印類型
        $customer_id = '18081';
        $customer_userid = '14581';

        $order_customerinvoicecode=$_POST['order_customerinvoicecode'];
        $amount=sprintf("%.2f",$_POST['amount']);
        $consignee_name=$_POST['consignee_name'];
        $consignee_city=$_POST['consignee_city'];
        $consignee_mobile=$_POST['consignee_mobile'];
        $consignee_postcode=$_POST['consignee_postcode'];
        $consignee_state=$_POST['consignee_state'];
        $country=$_POST['country'];
        $consignee_address=$_POST['consignee_address'];
        $invoice_title=$_POST['invoice_title'];
        $invoice_weight=$_POST['invoice_weight'];

        $data = Array(
                'buyerid' => '',
                'consignee_address' => $consignee_address,
                'consignee_city' => $consignee_city,
                'consignee_mobile' => $consignee_mobile,
                'consignee_name' => $consignee_name,
                'trade_type' => 'ZYXT',
                'consignee_postcode' => $consignee_postcode,
                'consignee_state' => $consignee_state,
                'consignee_telephone' => $consignee_mobile,
                'country' => $country,
                'customer_id' => $customer_id,
                'customer_userid' => $customer_userid,
                'orderInvoiceParam' => Array(
                        '0' => Array
                        (
                                'invoice_amount' => $amount,
                                'invoice_pcs' => 1,
                                'invoice_title' => $invoice_title,
                                'invoice_weight' => $invoice_weight,
                                'item_id' => '',
                                'item_transactionid' => '',
                                'sku' => $invoice_title,
                                'sku_code' => 'HL'.rand(100,999),
                        ),

                ),
                'order_customerinvoicecode' => $order_customerinvoicecode,
                'product_id' => $product_id,
                'weight' => $invoice_weight,
                'product_imagepath' => '',
        );
        $this->WriteLog($this->FileName,"data:".urldecode(json_encode($data)));
        $result = $this->curlRequest('http://146.56.219.238:8082/createOrderApi.htm', "param=" . json_encode($data));
        $this->WriteLog($this->FileName,"result:".urldecode($result['result']));        

截圖如下:


如果需要開發(fā)相關(guān)的物流接口,請(qǐng)聯(lián)系我們:QQ 804752009
 

在線咨詢

點(diǎn)擊這里給我發(fā)消息售前咨詢專員

點(diǎn)擊這里給我發(fā)消息售后服務(wù)專員

在線咨詢

免費(fèi)通話

24h咨詢:0475-2793529


如您有問題,可以咨詢我們的24H咨詢電話!

免費(fèi)通話

微信掃一掃

微信聯(lián)系
返回頂部