diff --git a/app/src/com/jc/jcfw/google/PayClient.java b/app/src/com/jc/jcfw/google/PayClient.java index 9114732..d205d85 100644 --- a/app/src/com/jc/jcfw/google/PayClient.java +++ b/app/src/com/jc/jcfw/google/PayClient.java @@ -63,6 +63,8 @@ public class PayClient extends Activity implements PurchasesUpdatedListener { if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) { // The BillingClient is ready. You can query purchases here. Log.i(TAG, "BillingClient is ready"); + } else { + Log.i(TAG, "error init BillingClient with error:: " +billingResult.getResponseCode()); } } @@ -125,9 +127,10 @@ public class PayClient extends Activity implements PurchasesUpdatedListener { } } private void purchaseUpdateCb(String funId, String error, String dataStr) { - if (funId == null) { + if (funId == null || funId.isEmpty()) { if (mFunId != null && !mFunId.isEmpty()) { - runOnUiThread(() -> JcSDK.nativeCb(mFunId, error, dataStr)); + final String _funId = mFunId; + runOnUiThread(() -> JcSDK.nativeCb(_funId, error, dataStr)); mFunId = null; } } else {