Reputation: 603
We're integrating Google Play Billing in our application. We handle the backend part of the system whereas the android app is maintained by some other team. Currently we're testing the integration by configuring the app in the Google Play Console and creating a topic in Google Cloud Pub/Sub. The topic id is then set in the monetization setup of the app. On backend side, we have created a RTDN listener which will pull the RTDN in the pub/sub topic and process them. Currently this is being tested in UAT environment. We need to move this to production. While I think the same pub/sub topic can work for production as well, I am not sure how do we handle it if we want to perform UAT again after some change.
We can not have 2 different Google Play Accounts. Kindly suggest a better alternative or best practice on how to handle this situation as I do not have deep knowledge of android development. There is no one in the organization who has worked on Google Play Billing, so no help from within.
First I had the idea of keeping the RTDN topic as same, however when I thought of the scenario where UAT testing might be required again, I dropped that idea. We could not think of a way to distinguish between prod RTDN and UAT RTDN
We thought of keeping the RTDN topics separate, one for UAT and one for Prod, however we can't change the topic id in Play Console's monetisation setup over and over again. Also, I think changing it to UAT after production deployment will result in loss prod RTDNs.
ObfuscatedExternalId and ObfuscatedProfileId are already being used. We can't use these fields to populate the environment information.
Upvotes: 0
Views: 238
Reputation: 11
I used the delivery type Push to solve this issue.
You can have the same topic but create multiple subscriptions under that. In each subscription, you have an option for audience field. You can check this field for distinguishing between UAT or PROD environment.
For my requirement, I enabled authentication and verified the token at the destination server and checked audience from the JWT.
For authentication, you need to create a service account with Service Account Token Creator Role.
Upvotes: 1