You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/extend/suning-sdk-php/test/asmp/DispatchOrderAddTest.php

46 lines
1.7 KiB

8 months ago
<?php
/**
* 厂派订单接入
*
* @author suning
* @date 2016-5-27
*/
// 引入主文件
require_once(dirname(__FILE__).'/../../SuningSdk.php');
require_once(dirname(__FILE__).'/../../DefaultSuningClient.php');
require_once(dirname(__FILE__).'/../../request/asmp/DispatchOrderAddRequest.php');
$req = new DispatchOrderAddRequest();
//赋值……
$req->setOrderSource("5D21BD");
$req->setSourceOrderItemId("12016031801704");
$req->setOrderType("02");
$req->setOrderTime("20160504120000");
$req->setSaleQty("4");
$req->setCmmdtyQaType("0");
$req->setServiceTime("20160504120000");
$req->setExtdCmmdtyBand("000010254");
$req->setExtdCmmdtyCtgry("R0104001");
$req->setExtdCommodityName("AO史密斯电热水器EWH-60D10B");
$req->setConsignee("王小丫");
$req->setPhoneNum("025-26739840");
$req->setMobPhoneNum("18651665787");
$req->setSrvAddress("0;;上海市¨æµ¦åŒº;全区;;;;市光路工农三村72号301室");
$req->setStandardCode("1");
$req->setCityCode("025");
$req->setSrvAreaCode("0250103");
$req->setSrvMemo("无");
$req->setSaleDate("20160504120000");
$req->setServiceSource("SN");
$req->setSalesPerson("customer");
$req->setOrderChannel("PC");
$req->setFaultTypeCode("1");
$req->setCustomerProperty("0001");
//api入参校验逻辑开关,当测试稳定之后建议设置为 false 或者删除该行
$req -> setCheckParam('true');
$serverUrl = "http://openpre.cnsuning.com/api/http/sopRequest";
$appKey = "5c991b791c6e5c46f925c7c6171a22cc";
$appSecret = "911bc7ef82abc19f065f256d7afef2d9";
$client = new DefaultSuningClient($serverUrl,$appKey,$appSecret,'json');
$resp = $client -> execute($req);
print_r("返回响应报文:".$resp);
?>