I have an app with in-app-purchase and I'm trying to validate the purchase with my server that is written in c#.
I've got google developer account + google play account with the app on it (in production)
I did activate the Google Play Android Developer API, generated p12 file (for the server) etc...
This is my server code:
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { "https://www.googleapis.com/auth/androidpublisher" },
}.FromCertificate(certificate));
// Create the service.
var service = new AndroidPublisherService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential
});
try
{
var data = service.Purchases.Get("package", "productid",
"token")
.Execute();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Getting 500 exception Backend Error
I ask myself where the hell can I bind the developer account to the google play app (I'm guessing this is the reason for the exception unless that anyone can make request at any app if he knows those params)
- running from localhost in console application (for testing)
If not can anyone tell me what I'm doing wrong or what I'm missing?