在对接美团外卖,新手,怎么获取回掉地址中的数据,并返回给美团成功标识?一下方法可以获取数据,那怎么返回给美团 success呢??public function cancel_mt_address(){
header("Content-type:text/html; charset=utf8");
$demo = array(
'data' => 'success'
);
$demo_json = json_encode($demo);
$postStr = file_get_contents("php://input");
if($postStr != NULL){
$ps = print_r($postStr, 1);
//$this->writeLog("门店映射回调返回数据postStr:", $ps);
log::write('yangzl', log::EMERG);
log::write($ps, log::EMERG);
echo $demo_json;
}else{
echo $demo_json;
// $this->writeLog('门店映射回调返回数据data:', $demo_json);
log::write('yangzl2', log::EMERG);
log::write($demo_json, log::EMERG);
}
}
1 回答
- 1 回答
- 0 关注
- 846 浏览
添加回答
举报
0/150
提交
取消