我想問一個關於IAB API的問題 - 作廢購買API https://developers.google.com/android-publisher/api-ref/purchases/voidedpurchases/list谷歌Play開發API - 作廢購買API這麼想的工作
我有一個正式的秩序,我已經退還了。 退貨訂單狀態。 我使用Voided Purchases API,但總是獲取空數據(voidedPurchases = null)。 請給我一些關於使用這個API的建議。 非常感謝。
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返回狀態= 200, 但結果對象的voidedPurchases值爲null
託尼
這是我的示例代碼。 –
我有同樣的問題。你有沒有找到解決方案? – jboo