欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

怎么捕获passbook 注册pass时候的 push token

程序员文章站 2022-06-14 10:13:20
...
服务器环境 nginx php mysql
iphone 7.0 /8.1
push token
  if($_SERVER['REQUEST_METHOD']=="POST"){

//            判断是否注册
//            MailModel::getFirst()
            $payload = json_decode($_POST);

//            $payload->pushToken;

            $data['pushtoken']="";
            $data['Devicelibraryidentifier']= $urlsegment[5];
            $data['Authenticationtoken']=$_SERVER['HTTP_AUTHORIZATION'];
            $data['serialnumber']=$urlsegment[8];
            $data['typeId']=$urlsegment[7];
            $data['Update_tag']="";
            $result=DevicesModel::create($data);
            if($result){
                header("HTTP/1.0 201");
            }
            MailModel::send('945627077@qq.com', 'passupdate', '注册pass'. json_decode($data));

            DevicesModel::create($data);
            return;
        }


回复内容:

服务器环境 nginx php mysql
iphone 7.0 /8.1
push token

  if($_SERVER['REQUEST_METHOD']=="POST"){

//            判断是否注册
//            MailModel::getFirst()
            $payload = json_decode($_POST);

//            $payload->pushToken;

            $data['pushtoken']="";
            $data['Devicelibraryidentifier']= $urlsegment[5];
            $data['Authenticationtoken']=$_SERVER['HTTP_AUTHORIZATION'];
            $data['serialnumber']=$urlsegment[8];
            $data['typeId']=$urlsegment[7];
            $data['Update_tag']="";
            $result=DevicesModel::create($data);
            if($result){
                header("HTTP/1.0 201");
            }
            MailModel::send('945627077@qq.com', 'passupdate', '注册pass'. json_decode($data));

            DevicesModel::create($data);
            return;
        }


相关标签: php passbook