Closed klisiewicz closed 5 years ago
Can you create a PR for this? I can review it and commit it.
Thanks in advance!
Ive been investigating this and refunded issue. Best i can come up with is that that these things dont quite work as real purchases in these cases. This in addition to #163 could probably be solved by throwing JSONException when in app data is null. What do you think?
As @keesvandieren said, we are willing to review PRs on this.
Fixed with PR #188 and published with the latest 0.11.4-SNAPSHOT
Hi, I have encountered an error when testing a Google Play static response product
Basically in the
V3GoogleInAppBillingService.GdxPayAsyncOperationResultListener
the result code is = -1 which is considered as a valid response, but later inPurchaseResponseActivityResultConverter.convertToTransaction
the operationString purchaseDataString = responseData.getStringExtra("INAPP_PURCHASE_DATA");
results in anull
string.This is the full stack trace:
Caused by: java.lang.NullPointerException at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116) at org.json.JSONTokener.nextValue(JSONTokener.java:94) at org.json.JSONObject.<init>(JSONObject.java:155) at org.json.JSONObject.<init>(JSONObject.java:172) at com.badlogic.gdx.pay.android.googleplay.billing.converter.InAppPurchaseDataToTransactionConverter.convertJSONPurchaseToTransaction(InAppPurchaseDataToTransactionConverter.java:27) at com.badlogic.gdx.pay.android.googleplay.billing.converter.PurchaseResponseActivityResultConverter.convertToTransaction(PurchaseResponseActivityResultConverter.java:27) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.convertPurchaseResponseDataToTransaction(V3GoogleInAppBillingService.java:255) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.access$300(V3GoogleInAppBillingService.java:39) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$2.handleResultOk(V3GoogleInAppBillingService.java:240) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$2.onEvent(V3GoogleInAppBillingService.java:225) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.onGdxPayActivityEvent(V3GoogleInAppBillingService.java:393) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.access$800(V3GoogleInAppBillingService.java:39) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$V3GoogleInAppBillingServiceAndroidEventListener.onActivityResult(V3GoogleInAppBillingService.java:403) at com.badlogic.gdx.backends.android.AndroidApplication.onActivityResult(AndroidApplication.java:472)
Regards