正在显示
2 个修改的文件
包含
5 行增加
和
4 行删除
@@ -36,7 +36,7 @@ class BirdController extends HomeBaseController | @@ -36,7 +36,7 @@ class BirdController extends HomeBaseController | ||
36 | * @throws \think\db\exception\ModelNotFoundException | 36 | * @throws \think\db\exception\ModelNotFoundException |
37 | * @throws \think\exception\DbException | 37 | * @throws \think\exception\DbException |
38 | */ | 38 | */ |
39 | - public function createOrder($indent_id = 132) | 39 | + public function createOrder($indent_id = 133) |
40 | { | 40 | { |
41 | if(empty($indent_id)){ | 41 | if(empty($indent_id)){ |
42 | return "缺少必要参数"; | 42 | return "缺少必要参数"; |
@@ -58,12 +58,12 @@ class BirdController extends HomeBaseController | @@ -58,12 +58,12 @@ class BirdController extends HomeBaseController | ||
58 | $region = explode(' ',$address['region']); | 58 | $region = explode(' ',$address['region']); |
59 | 59 | ||
60 | //请求url,接口正式地址:http://api.kdniao.com/api/OOrderService 测试环境地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json | 60 | //请求url,接口正式地址:http://api.kdniao.com/api/OOrderService 测试环境地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json |
61 | - defined('ReqURL') or define('ReqURL', 'http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json'); | 61 | + defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/api/EOrderService'); |
62 | 62 | ||
63 | 63 | ||
64 | //构造在线下单提交信息 | 64 | //构造在线下单提交信息 |
65 | $eorder = []; | 65 | $eorder = []; |
66 | - $eorder["ShipperCode"] = "SF"; | 66 | + $eorder["ShipperCode"] = "$indent[logistic_name]"; |
67 | $eorder["OrderCode"] = $indent['order_number']; | 67 | $eorder["OrderCode"] = $indent['order_number']; |
68 | $eorder["PayType"] = 1; | 68 | $eorder["PayType"] = 1; |
69 | $eorder["ExpType"] = 1; | 69 | $eorder["ExpType"] = 1; |
@@ -100,6 +100,7 @@ class BirdController extends HomeBaseController | @@ -100,6 +100,7 @@ class BirdController extends HomeBaseController | ||
100 | 100 | ||
101 | //解析在线下单返回结果 | 101 | //解析在线下单返回结果 |
102 | $result = json_decode($jsonResult, true); | 102 | $result = json_decode($jsonResult, true); |
103 | + cache('test',$result); | ||
103 | if ($result["ResultCode"] == "100") { | 104 | if ($result["ResultCode"] == "100") { |
104 | if(!empty($result['Order']['LogisticCode'])){ | 105 | if(!empty($result['Order']['LogisticCode'])){ |
105 | $indentModel->updateData(['id'=>$indent_id],['logistic_code'=>$result['Order']['LogisticCode']]); | 106 | $indentModel->updateData(['id'=>$indent_id],['logistic_code'=>$result['Order']['LogisticCode']]); |
-
请 注册 或 登录 后发表评论