tschoffelen / php-pkpass

💳 PHP class for creating passes for Wallet on iOS.
https://includable.com
MIT License
916 stars 186 forks source link

Cannot read the cerficate #65

Closed Cafnio closed 7 years ago

Cafnio commented 7 years ago

Hi there.

First of all, thanks for the plugin and all the work.

I'm trying to put the example working, so I'm accessing the following url: http://localhost:8080/examples/example.php

Here's the folder configuration: https://i.gyazo.com/943a8d0c7326c2046e7063c62b79f260.png

Accessing that url, it returns to me: Error: Could not read the certificate

Any help?

Thanks

tschoffelen commented 7 years ago

Seems like Certificate.p12 is in the same directory as example.php, so the path in line 8 should simply be Certificate.p12. If that doesn't work, make sure the script has read permissions for the Certificate.p12 file.

Cafnio commented 7 years ago

Hello!

Thanks for the help.

I'll have to check the permissions anyway :)

I've editted the code to allow it to work with urls (want to load the file from cdn), I got it working, it creates the file but I can't open the pkpass, it says "the pass pass.pkpass" cannot be opened. Is there any way I can debug it to see what i'm doing wrong?

tschoffelen commented 7 years ago

Try using the Console app on your mac. That should show detailed debugging errors. Most likely, either the JSON string you are passing isn't valid, or doesn't comply with Apple's scheme.

Cafnio commented 7 years ago

Well, i'm using the example.php json, I haven't changed anything from there (only url's).

Will try to get an Iphone to see if I can get the debugging working. Thanks

lock[bot] commented 6 years ago

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.