|
|
@@ -27,11 +27,11 @@ class MtController extends PublicController
|
|
|
public function actionNewOrder()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
- if(empty($post)) { // 无数据过来时,是美团对接口进行存活试探
|
|
|
+ if(empty($post)) { // 无数据过来时,是美团对接口进行存活试探,请保留此段代码,好让请求在此被中断返回
|
|
|
return Json::encode(['data' => 'ok']);
|
|
|
}
|
|
|
|
|
|
- //2022-07-09 22:37:23 [101.236.11.53][-][-][warning][application] model validate errors: {"orderId":["Order Id cannot be blank."],"orderPhoneNumber":["Order Phone Number cannot be blank."],"recipientName":["Recipient Name cannot be blank."],"recipientPhone":["Recipient Phone cannot be blank."],"recipientAddress":["Recipient Address cannot be blank."],"updated_at":["Updated At cannot be blank."]}
|
|
|
+ $post = urldecode($post); // 美团传入的订单数据,中文是 URL_encode 的,执行下解密
|
|
|
$data = arrayUtil::humpUnderlineConversion($post, 1);
|
|
|
$mtOrder = MtOrderClass::add($data);
|
|
|
return Json::encode(['data' => 'ok']);
|
|
|
@@ -40,7 +40,6 @@ class MtController extends PublicController
|
|
|
|
|
|
$params = ['order_id' => '27061900338318741', 'is_mt_logistics' => 1];
|
|
|
$orderDetail = $app->order->getOrderDetail($params);
|
|
|
-
|
|
|
print_r(json_decode($orderDetail, true));
|
|
|
|
|
|
// 商品类、活动类接口支持异步队列
|