I am implement inApp purchase in my application and add product as "Manage Product". After purchase I want to do receipt validation.For that I configure in Developer console like
The Steps are
- Developer Console -> Settings -> API access
- Create Server account
Google Developer console -> Add a credential in Service account and put it as JSON
After adding I got a file from developer console it contains
{ "type": "service_account", "project_id": "api-xxxxx-xxx", "private_key_id": "xxxxxxxxxxxxxxxxxxxxxx", "private_key": "-----BEGIN PRIVATE KEY-----\ixxxxxxxxxxxxxxxx=\n-----END PRIVATE KEY-----\n", "client_email": "test-in-app-receipt-validation@api-xxxxxxx.iam.gserviceaccount.com", "client_id": "xxxxxxxxxxxxxxx", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-in-app-receipt-validation%40api-9129873511008807687-564452.iam.gserviceaccount.com" }
But I don't know how to do the next step. How to use this file Receipt validation
After purchasing am getting the reponse as
{
"orderId":"12999763169054705758.1371079406387615",
"packageName":"com.example.app",
"productId":"exampleSku",
"purchaseTime":1345678900000,
"purchaseState":0,
"developerPayload":"bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ",
"purchaseToken":"rojeslcdyyiapnqcynkjyyjh"
}
Can anyone please help me how to handle the next step for Receipt validation for the make use of downloaded file that contain JSON value