Add native Google Wallet support
Why?
- because according to the latest worldwide stats, Android has 70.16% market share while iOS has 29.14%.
- Google relaunched their old Google Pay app as Google Wallet, with a focus on catching up on new pass types and features.
- Digital / mobile wallets are on a steep rise in popularity because of contactless payment integration in native Wallet apps.
- Alternative Google Play WalletPasses app was not updated for some time, push implementation is custom and it is very inconvenient for the Android user to install an app from the store to add the pass.
- User adoption will be accelerated for any product with support for both platforms.
How?
- We will get inspiration from the concepts in the recently launched google-wallet pass converter.
- We will integrate the Google Wallet API Client library.
- We will generate the google wallet pass types (when required configured is provided) by using the unified Factory & Pass classes, given the multiple similarities -- suggestions welcome here.
- Examples are pretty self-explanatory in google-wallet-rest-samples or maybe even in (now deprecated) google-pay-rest-samples.
Downsides?
- Review and new tests (both unit & human)
- Breaking changes will bump the major version.
- PHP 8.0 will become the minimum supported version.
- Issuer ID for Google Wallet APIs + Google service account token JSON file
When?
- End of ~January~ February 2024
@razvanphp when do you plan to support Google Wallet?
I’m actually working on this in a separate branch, should be ready in around 2 weeks. Are you willing to test an alpha version or are you just looking for ideas for your library? :)
I would like to test the google wallet version :)
While doing the groundwork for this I realised some things are better placed in the Google Wallet PHP SDK itself, so I pushed some changes there so the whole community can benefit:
https://github.com/googleapis/google-api-php-client/pull/2606
https://github.com/googleapis/google-auth-library-php/pull/557
https://github.com/google-wallet/rest-samples/pull/110
https://github.com/googleapis/google-api-php-client-services/pull/6295
It would still be great if we would have a common Interface for Class and Object types from Google namespace, looking if we can do that there too, otherwise we would need to wrap the objects in own own interfaces. This currently blocks my new architecture code.
If interested, please follow google-wallet-support branch, ideas on how to structure the classes and Factories are welcomed.