tschoffelen / php-pkpass

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

Wallet Orders #136

Closed cjnewbs closed 9 months ago

cjnewbs commented 9 months ago

Summary

Not really an issue as such but thought this would be the best place to ask. I've been working on creating Wallet orders and got completely stuck with the signature generation. Thankfully I came across this stackoverflow post which pointed me in this direction and now am able to create files recognised by the wallet app.

It looks like Wallet Passes and Orders are quite similar with only some minor differences.

I was considering trying to create a backwards-compatible PR to upgrade this repo to support generation of orders too. Is this something you would be interested in or would you prefer to focus strictly on passes (in which case I will try create a new library to create distributable order packages)?

If you want to focus only on Passes feel free to close this issue.

tschoffelen commented 9 months ago

Hi Craig! Ah that's cool, I didn't realise that's how wallet orders worked! (if anyone else ends up reading this, see here)

We could certainly extend it, as long as we do it in a way that isn't confusing to devs wanting to create passes.

Maybe we should introduce a separate class called PKOrder or something similar for it? We could then create a base class that shares some of the signing logic.