FROM CACHE - zh-cn_header

Fulfillment Order 问题, 上传的shipping carrier 发生了改变, 我想上传的是Amazon Logistics UK

Fulfillment Order 问题, 上传的shipping carrier 发生了改变, 我想上传的是Amazon Logistics UK

asdgf234dasd123
访客
2 0 0

When I upload company=Amazon Logistics UK, the shipping carrier becomes Wrong . Isn't the shipping carrier filled in company

我在Fulfillment Order上, 填写的shipping carrier(company) 是Amazon Logistics UK,结果变成了其他 carrier

QQ图片20221130141546.pngqq2.png

1 条回复1

asdgf234dasd123
访客
2 0 0

 

 
  /**
     * package:  use PHPShopify\ShopifySDK;
     */
    
    /**
     *  step_1: create
     */
    public function create_fulfillment_order($order_id)
    {
        $order = $this->client->Order($order_id)->FulfillmentOrder->get();

        if (empty($order)) {
            "create fail";
        }
        return $order[0]['id'];
    }
    

    
    /**
     * step_2
     * */
    public function fulfillment_order($fulfillment_order_id, $track_number, $company, $track_url)
    {
        $data = [
            'message' => 'The package was shipped',
            'notify_customer' => false,
            'tracking_info' => [
                'number' => $track_number,
                "company" => $company,
                "url" => $track_url, 
            ],
            'line_items_by_fulfillment_order' => [
                [
                    'fulfillment_order_id' => $fulfillment_order_id,
                ]
            ],
        ];
        if ($track_url) {
            $data['line_items_by_fulfillment_order'][0]['url'] = $track_url;
        }
        
        $res = $this->client->Fulfillment->post($data);
        return $res;
    }