• SDK-PHP:下载
  • 引入文件:DDSdkClient.php


  • $ddHttpClient = new DDHttpClient();

    $ddHttpClient->setAppKey(Config::$appKey);
    $ddHttpClient->setAppSecret(Config::$appSecret);
    $ddHttpClient->setSession(Config::$session);
    $ddHttpClient->setVersion("2.0");
    $ddHttpClient->setFormat("xml");





  • $ordersListGetRequest = new OrdersListGetRequest();
    $ordersListGetRequest->setOrderId("111111");

    $result = $ddHttpClient->execute($ordersListGetRequest);


  • $resultObject = ConvertUtil::resultToObjChangeEncoding($result,$ddHttpClient->getFormat());
  • include_once("DDSdkClient.php");

    $ddHttpClient = new DDHttpClient();

    #获取订单详情
    #拼装参数
    $ordersListGetRequest = new OrdersListGetRequest();
    $ordersListGetRequest->setOrderId("11111");
    #调用
    $responseContent = $ddHttpClient->execute($ordersListGetRequest);
    #返回处理(供参考)
    $resultObject = ConvertUtil::resultToObjChangeEncoding($result,$ddHttpClient->getFormat());


    #设置商品公用栏目
    #拼装参数
    $itemsPubliccolumnsSetRequest = new ItemsPubliccolumnsSetRequest();
    $itemsList = array();
    $itemsPubliccolumnsSetUpadteInfoDto = new ItemsPubliccolumnsSetUpadteInfoDto;
    $itemsPubliccolumnsSetUpadteInfoDto->itemID = "1323810939";
    $itemsPubliccolumnsSetUpadteInfoDto->publicColumnsList = "栏目名称A>>显示顺序A;栏目名称B>>显示顺序B;";
    $itemsList[] = array("ItemUpadteInfo"=>$itemsPubliccolumnsSetUpadteInfoDto);
    $itemsPubliccolumnsSetDto = new ItemsPubliccolumnsSetDto;
    $itemsPubliccolumnsSetDto->functionID = $itemsPubliccolumnsSetRequest->getApiMethodName();
    $itemsPubliccolumnsSetDto->time = date("Y-m-d H:i:s");
    #参数对象转化成xml字符串
    $itemsPubliccolumnsSetRequest->setMultiItemsPublicColumns(ConvertUtil::arrayToXml($itemsPubliccolumnsSetDto,"request"));
    #调用
    $result = $ddHttpClient->execute($itemsPubliccolumnsSetRequest);
    #返回处理(供参考)
    $resultObject = ConvertUtil::resultToObjChangeEncoding($result,$ddHttpClient->getFormat());