Craig-Ronald / capacitor-subscriptions

12 stars 4 forks source link

Guide on how to set up server (Google verification) #19

Open socialmedialabs opened 2 weeks ago

socialmedialabs commented 2 weeks ago

The README.md states the following:

To help make this as painless as can be, a method is available which will perform the request upon passing in your server’s verification endpoint and app bundle details. A guide on how to set up your server to connect to your app can be found here

However, the link is just an non existent anchor. It would be nice to have at least a pointer what the answer of the server would look like and how the server would identify the user and its purchase only based on the subscription id.

I can set up a server logic myself by altering the plugin code, but still it would‘ve been great to at least know how it was meant to be initially.

Unfortunately this project seems abandoned, which is sad as it really is a lean and straight forward Capacitor plugin.

nesha14586 commented 2 weeks ago

@socialmedialabs I think you are looking for this: https://github.com/Craig-Ronald/capacitor-subscriptions?tab=readme-ov-file#initial-android-setup-server-validation

socialmedialabs commented 2 weeks ago

@nesha14586, thank you for your answer.

I guess my question is this: isn't there something missing in the docs/readme? I am assuming the server the GET request is sent to should use something like the e. g. Google Cloud Billing for PHP to validate the receipt that is sent with the request. However, although I can connect the dots, I find the information on this a bit meager and would wish there was a bit more on this topic.

I ended up forking the plugin and tailoring it a lot more to my needs, for instance changing the GET to a POST request, and sending along e. g. the uuid i created in my app for the user with the request. I am using imdhemy/laravel-in-app-purchases for server side validation and they are playingn nicely together now.

While I'm totally fine with what I have now, it's a bit of a shame, I think, that this plugin - although it imho has great potential, because it is so lean and straight forward - obviously lacks more documentation and further development (took me a while to get that the current version on master branch doesn't support Capacitor 6.

Anyway, that's all whining at a high level. I am thankful that someone did all the hard initial work for this, enabling others to realize their projects.