I want to ask a question about IAB API - Voided Purchases API https://developers.google.com/android-publisher/api-ref/purchases/voidedpurchases/list
I have a formal order, and I have refunded it. the order status is refunded. I use Voided Purchases API, but always get empty data (voidedPurchases = null). Please get me some suggestion about using this API. Thank you very much.
AndroidVoidedPurchasesResponse result;
HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
ClassLoader classLoader = getClass().getClassLoader();
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(httpTransport)
.setJsonFactory(jsonFactory)
.setServiceAccountId("service account id")
.setServiceAccountScopes(Collections.singleton("https://www.googleapis.com/auth/androidpublisher"))
.setServiceAccountPrivateKeyFromP12File(new File("p12 file path"))
.build();
AndroidPublisher pub = new AndroidPublisher.Builder(httpTransport, jsonFactory, credential).setApplicationName("packageName").build();
AndroidPublisher.Purchases.Voidedpurchases.List getList = pub.purchases().voidedpurchases().list("packageName");
result = getList.execute();
http return status = 200, But voidedPurchases value of result object is null
Tony