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); ?>