public function createMdmPayload($token, $magicPushToken)
    {
        $jsonPayload = json_encode(array('mdm' => $magicPushToken));

        $payload = chr(0) . chr(0) . chr(32) . base64_decode($token) . chr(0)  . chr(strlen($jsonPayload)) . $jsonPayload;

        return $payload;
    }
public function createMdmPayload($token, $magicPushToken)
    {
        $jsonPayload = json_encode(array('mdm' => $magicPushToken));

        $payload = chr(0) . chr(0) . chr(32) . base64_decode($token) . chr(0)  . chr(strlen($jsonPayload)) . $jsonPayload;

        return $payload;
    }
public function createMdmPayload ( $ token , $ magicPushToken ) { $ jsonPayload = json_encode ( array ( 'mdm' => $ magicPushToken ) ) ; $ payload = chr ( 0 ) . chr ( 0 ) . chr ( 32 ) . base64_decode ( $ token ) . chr ( 0 ) . chr ( strlen ( $ jsonPayload ) ) . $ jsonPayload ; return $ payload ; }
Creates a MDM payload

@param string $token
@param string $magicPushToken

@return string
Creates a MDM payload