Currently we are implementing IAP Validation through nakama on android and we are hitting problems with service account credentials.
I wouldn’t write if the case is well known, but i have tried using a different service and different language and different framework and verification went smoothly.
So using GitHub - dotpot/InAppPy: Python In-app purchase validator for Apple AppStore and GooglePlay. and a script in it I am able correctly to verify purchase using service account and verification when smoothly but what are differences.
- For configuration of python services we had to:
-
- Load account_service_json from file and send iit to its validator
- Define package name
-
- Its validator what it does next is checking validity of the service file and key using oauth2client.service_account module — oauth2client 4.1.2 documentation
- Send recepit to validation which then validates based on product_sku and purchase_token and some rest params.
And here in this api validation works smoothly.
Following Nakama in-app guide we did setup everything correctly although i am not 100% sure is key correctly being read as api always fails there, it reports invalid api key file for service.
In console it is shown as:
-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhki
Litterly with newlines through the key.
Now question is: Where could be mistake?
As all different third party services seams to work with service account and client email configured correctly?
Any help is appreciated
Runtime Info:
- Versions: Nakama {3.16.0}, {Docker}
- Server Framework Runtime language: Lua
{code or log snippet}