2

I created a pass via PHP and tried it on the iOS and on my iPhone and everything is working fine.

Now I've problem with the "update my pass" the problem is that I don't get any payloads back to my Server.

I have a SSL Cert. on my Server running. This is the my JSON file for the Pass generation.

{"description":"Your Booking @ XXXXXX","formatVersion":1,
 "organizationName":"xxx Pte Ltd",
 "passTypeIdentifier":"pass.com.xxx",
 "serialNumber":"R_TheTtSFAmc7U",
 "teamIdentifier":"3WZWSR88QK",
"locations":[{"longitude":-122.3748889,"latitude":37.6189722},

{"longitude":-122.03118,"latitude":37.33182}],
 "eventTicket":{"headerFields":[{"key":"booking","label":"Booking","value":"xxxxx"}],       
"primaryFields":[{"key":"date","label":"Booking date","value":"JAN 15"}],
  "secondaryFields":[{"key":"hour","label":"Booking    time","value":"19:00"}],

"auxiliaryFields":[{"key":"address","label":"Address","value":"90 Club Street"}],

"backFields":[{"key":"bookingname","label":"Booking","value":"XXXX"},   
 {"key":"member-code","label":"Spin Code","value":"xxxx"}]},
  "barcode":{"format":"PKBarcodeFormatQR",
  "message":"{\"membCode\":\"xxx\"}","messageEncoding":"iso88591"},"foregroundColor":" rgb(255, 255, 255)",
   "backgroundColor":"rgb(60, 65, 76)"
   "webServiceURL":"https://dev.xxx.com/passbook/passwallet.php","authenticationToken":"dnMua2FsYUB3ZWVsb3kuY29tOndlZWxveTAx"}

passwallet.php

 $request = explode("/", substr(@$_SERVER['REQUEST_URI'], 1));

   var_dump($request);
 $data1 = $passUpdate->snconnect($request);
    $inputJSON = file_get_contents('php://input');

$push_token = json_decode($inputJSON, TRUE);

$push_token = $push_token->pushToken;
//device token store in db
$data2 = $passUpdate->snconnect($push_token);

Any help will be appreciated, Thanks,

srivathi
  • 121
  • 1
  • 8
  • What is in your server and php logs. What does the device log show in Xcode when you refresh the pass? – PassKit Jan 14 '16 at 05:38

1 Answers1

2

Your webServiceURL is pointing to a file, when it should be pointing to the root of a RESTful service.

You get no response on the device because the forward slash following 'passwallet.php' makes your server treat passwallet.php as a folder and then tries to find the index file for the complete request path. This does not exist so the device receives a 404 back from your server.

Rename passwallet.php to index.php and configure your server to rewrite all requests to index.php (similar to how you would set up pretty URLs in Wordpress).

PassKit
  • 12,231
  • 5
  • 57
  • 75