...
|
...
|
@@ -36,7 +36,7 @@ class BirdController extends HomeBaseController |
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
public function createOrder($indent_id = 132)
|
|
|
public function createOrder($indent_id = 133)
|
|
|
{
|
|
|
if(empty($indent_id)){
|
|
|
return "缺少必要参数";
|
...
|
...
|
@@ -58,12 +58,12 @@ class BirdController extends HomeBaseController |
|
|
$region = explode(' ',$address['region']);
|
|
|
|
|
|
//请求url,接口正式地址:http://api.kdniao.com/api/OOrderService 测试环境地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
|
|
|
defined('ReqURL') or define('ReqURL', 'http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json');
|
|
|
defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/api/EOrderService');
|
|
|
|
|
|
|
|
|
//构造在线下单提交信息
|
|
|
$eorder = [];
|
|
|
$eorder["ShipperCode"] = "SF";
|
|
|
$eorder["ShipperCode"] = "$indent[logistic_name]";
|
|
|
$eorder["OrderCode"] = $indent['order_number'];
|
|
|
$eorder["PayType"] = 1;
|
|
|
$eorder["ExpType"] = 1;
|
...
|
...
|
@@ -100,6 +100,7 @@ class BirdController extends HomeBaseController |
|
|
|
|
|
//解析在线下单返回结果
|
|
|
$result = json_decode($jsonResult, true);
|
|
|
cache('test',$result);
|
|
|
if ($result["ResultCode"] == "100") {
|
|
|
if(!empty($result['Order']['LogisticCode'])){
|
|
|
$indentModel->updateData(['id'=>$indent_id],['logistic_code'=>$result['Order']['LogisticCode']]);
|
...
|
...
|
|