From 85a5500224166fd4e7f2d1d44472563aaf26d40c Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:53:58 +0800 Subject: [PATCH] fix some bug about google pay --- app/src/com/jc/jcfw/google/PayClient.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 {