0

I created a pass and web service. Now I can add this pass to device and also can register device to my server. I save data such as deviceID, passTypeIdentifier, pushToken, serialNo and authenticationToken, but I not yet return http status such as 201, 200, 401,... How do I response these http status to device ?

malinchhan
  • 767
  • 2
  • 8
  • 28

1 Answers1

0

Before you send any content back to the device, add the following code:

If using PHP 5.4 or later:

$response_code = 201; // replace with required response code
http_response_code($response_code);

If using <= PHP 5.3:

$response_code = 201; // replace with required response code
header('X-PHP-Response-Code: ' . $response_code, true, $response_code);

In the console log, you should see the response code returned for each request that the device sends.

..... got response with code 201
PassKit
  • 12,231
  • 5
  • 57
  • 75