C# Purchases.Voidedpurchases.List返回空响应
我请求检查在我的申请中已作废的采购。问题是响应总是空的(代码为200)。我在30天内收到了一些退款。我尝试使用C#android publisher nuget软件包和手动使用postman发出此请求。结果是成功的,但是是空的C# Purchases.Voidedpurchases.List返回空响应,c#,google-api,google-play,google-api-dotnet-client,in-app,C#,Google Api,Google Play,Google Api Dotnet Client,In App,我请求检查在我的申请中已作废的采购。问题是响应总是空的(代码为200)。我在30天内收到了一些退款。我尝试使用C#android publisher nuget软件包和手动使用postman发出此请求。结果是成功的,但是是空的 string contents = await File.ReadAllTextAsync("D:/Projects/android-publisher-api-key.json"); Googl
string contents = await File.ReadAllTextAsync("D:/Projects/android-publisher-api-key.json");
GoogleCredential credential = GoogleCredential.FromJson(contents);
string[] scopes = { AndroidPublisherService.Scope.Androidpublisher };
credential = credential.CreateScoped(scopes);
BaseClientService.Initializer initializer = new BaseClientService.Initializer
{
HttpClientInitializer = credential,
ApplicationName = "Test App"
};
AndroidPublisherService androidPublisherService = new AndroidPublisherService(initializer);
var request = androidPublisherService.Purchases.Voidedpurchases.List("com.MyCompany.MyTestApp");
var response = await request.ExecuteAsync(); // In this response all fields are null
使用邮递员将请求发送至(与BealerToken一起):
https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.MyCompany.MyTestApp/purchases/voidedpurchases
响应为success 200,但正文仅包含
{}
。它至少应该具有中列出的结构。我解决了这个问题。如果您遇到这样的问题,并且您正在通过google play console退款,那么在退款表单中,您必须选中删除权利
复选框。否则,作废的采购将不包括在响应中