我通过 PHP 创建了一个通行证,并在 iOS 和我的 iPhone 上进行了尝试,一切正常。
现在我对“更新我的通行证”有疑问,问题是我没有将任何有效负载返回到我的服务器。
我有一个 SSL 证书。在我的服务器上运行。这是用于生成 Pass 的我的 JSON 文件。
{"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"}
密码钱包.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);
任何帮助将不胜感激,谢谢,