Closed 128keaton closed 12 years ago
This happens when the Pass is invalidated by Passbook.
Have you followed all the steps in README.md; added the correct certificates, passTypeIdentifier
and teamIndentifier
or modified the example in any way?
You can check your iPhone log (in Xcode) or use the PHP PKValidate class.
PS. Did you solve the issue with this commit? DS.
I have the same problem. The pass is loaded fine but not saved in passbook. Your example online has the same problem.
I may be able to help if you answer my questions above.
Solved, problem was in $pass->setWWDRcertPath('AppleWWDRCA.pem'); The version of PKPass.php that I had downloaded didn't have this property. Thanks
Great & good job! The method setWWDRcertPath
was recently added in a pull request.
@tschoffelen closing this one?
I'm referring to the starbucks_example and still facing the same problem. i given the reference to AppleWWDRCA.pem and generated the pass. when im trying to open it in my iphone, its not showing as pass. can you help me?
Hi newtoios,
The Starbucks sample lacks error output. Try edit index.php
and replace (line 65)
$pass->create(true); // Create and output the PKPass
with
if(!$pass->create(true)) { // Create and output the PKPass
echo 'Error: '.$pass->getError();
}
i have the same problem, too. I use the newest version of php-pkpass and did every step from the readme, but i can't add passes to passbook. In the console i see this warning: "Invalid data error reading card passTypeIdentifier / serialNumber. Manifest signature did not verify successfully" any ideas, how i can get it work?
@SimonWaldherr Are you referring to starbucks_sample/index.php
or example.php
?
Are you sure the passTypeIdentifier
and serialNumber
keys are entered correctly?
I have this warning on all examples full_sample
, starbucks_sample
and example.php
. passTypeIdentifier
is entered as in iOS Provisioning Portal / Pass Type IDs
overview.
I think, there was a misunderstanding, the console warning was: passd[6139] <Warning>: Invalid data error reading card pass.com.weventa.demo/980425-104-660. Manifest signature did not verify successfully
For test purposes, i deleted the $this->clean();
lines and discovered that the signature
file is empty.
Got a same problem here. Certificated and WWDR verified. and changed the passTypeIdentifier as well as teamIdentifier, but still not fix. Using PKValidate checking json file but it show no error. Here is sample of json. Where $passTypeIdentifier, $teamIdentifier, $authToken are variable
{ "description":"Business card, powered by Sirimedia Co,Ltd.", "formatVersion":1, "organizationName":"Sirimedia Co, Ltd.", "passTypeIdentifier": $passTypeIdentifier, "serialNumber":"50a5b7484ae9c", "teamIdentifier": $teamIdentifier, "generic":{ "headerFields":[], "primaryFields":[{ "key":"name", "label":"Name", "value":"Phakphum Visetnut", "textAlignment":"PKTextAlignmentLeft" }], "secondaryFields":[{ "key":"phone", "label":"", "value":"", "textAlignment":"PKTextAlignmentLeft" },{ "key":"position", "label":"", "value":"", "textAlignment":"PKTextAlignmentRight" }], "auxiliaryFields":[{ "key":"email", "label":"", "value":"", "textAlignment":"PKTextAlignmentLeft" }], "backFields":[{ "key":"address", "label":"", "value":"", "textAlignment":"PKTextAlignmentLeft" }] }, "barcode":{ "format":"PKBarcodeFormatQR", "message":"BEGIN:VCARD\nN:Phakphum Visetnut;\nADR:\nEMAIL:\nTEL:\nTITLE:\nEND:VCARD\n", "messageEncoding":"iso-8859-1", "altText":"" }, "backgroundColor":"rgb(240,240,240)", "logoText":"Sirimedia", "webServiceURL":"", "authenticationToken": $authToken }
Try the example at http://apps.tomttb.com/pkpass/example.php. Does that one work on your iPhone?
Hand-written JSON can be hard, I see several errors;
$passTypeIdentifier
, $teamIdentifier
, and $authToken
are strings. Wrap them with "".authenticationToken
which also needs a webServiceURL
to be valid data in PassbookPlease get the latest version of the example file. Using the PHP data format that then encodes into JSON is more fail-safe.
i got downloaded file but the file is not opened in IOS .....it display error (The pass “pass.pkpass” could not be opened.)
@kaurharpreet What do the logs tell you?
openssl_x509_read() [function.openssl-x509-read]: supplied parameter cannot be coerced into an X509 certificate! openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting cert in file_get_contents(/tmp/PKPass5371f96a521c41.79777861/signature) [function.file-get-contents]: failed to open stream: No such file or directory
this error is displayed in .pass file
@kaurharpreet Looks like a problem with the cert. Have it worked before?
no it didn't work..
@kaurharpreet Then please double check your certificate. Follow the instructions here: https://github.com/tschoffelen/PHP-PKPass#requesting-the-pass-certificate
i create the certificate again ..it works now...thank u for your help
used example.php and Pkpass.php from https://github.com/tschoffelen/PHP-PKPass and getting an error openssl_pkcs7_sign(): error opening the file, WWDR.pem in C:/xampp/htdocs/PkPass.php on line *** Please help resolve it
Hi! Sounds like that file is missing, have you downloaded it? See the instructions in the README of this repo, specifically concerning the WWDR intermediate certificate.
Sir i am sure that i have the file in there............downloaded the certificate from apple developer site and then extracted it from the keychain
moreover , an invalid pkpass file is also getting generated
unable to add this file cannot be added to passbook(wallet). above error is showing, how to solve this.
Hi i am getting this error: Warning: openssl_pkcs7_sign(): error opening the file, ../certificates/AppleWorldwideDeveloperRelationsCertificationAuthority.pem in E:\xampp\htdocs\passbox_1\PKPass\PKPass.php on line 317
please how to remove above error.
@rajud521 Did you overwrite the wwdrCertPath
? Because that's indeed not the correct filename. You shouldn't need to change that, since there's a version of that certificate shipped alongside the library: https://github.com/tschoffelen/php-pkpass/blob/master/src/PKPass.php#L104
Also, please open a new issue of this problem persists without your code customisation, since it's not related to this already-closed issue.
@tschoffelen, it is working fine in Android phone, but it is showing in Apple IPhone that "unable to add this file cannot be added to passbook" So, please how to remove this error.
@rajud521 That is because Android doesn’t check if the pass certificate is valid. See the Debugging section in the Readme to figure out what’s going wrong exactly.
again created the certificate, it is working fine now. Thank you!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Whenever I generate a pass and I tap add, it disappears instead of showing the adding animation. I checked my book and it doesn't show. I even tried your example online and that doesn't work either.