From 8e860b80d48da1d1da37bae7167d5ade99a53c2f Mon Sep 17 00:00:00 2001 From: 18142669586 <1669783059@qq.com> Date: Wed, 11 Sep 2024 14:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E6=98=9F=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../android/sdk/iap/lib/SamsungUtil.java | 2 +- .../yunbao/main/activity/SamsungFragment.java | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/IAP6Helper/src/main/java/com/samsung/android/sdk/iap/lib/SamsungUtil.java b/IAP6Helper/src/main/java/com/samsung/android/sdk/iap/lib/SamsungUtil.java index 7a631dc00..6c4662490 100644 --- a/IAP6Helper/src/main/java/com/samsung/android/sdk/iap/lib/SamsungUtil.java +++ b/IAP6Helper/src/main/java/com/samsung/android/sdk/iap/lib/SamsungUtil.java @@ -40,7 +40,7 @@ public class SamsungUtil { public void init() { iapHelper = IapHelper.getInstance(mContext); //设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式 - iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION); + iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST); } public void dispose() { diff --git a/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java b/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java index 0b0f8e724..cf6428a5a 100644 --- a/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/SamsungFragment.java @@ -1,6 +1,8 @@ package com.yunbao.main.activity; +import static com.yunbao.main.activity.MyWalletActivity.dis; + import android.annotation.SuppressLint; import android.os.Bundle; import android.os.Handler; @@ -14,6 +16,8 @@ import android.webkit.WebView; import androidx.fragment.app.Fragment; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; import com.yunbao.common.pay.samsung.OnSamsungPaymentListener; import com.yunbao.common.pay.samsung.SamsungUtil; import com.yunbao.common.utils.StringUtil; @@ -103,15 +107,15 @@ public class SamsungFragment extends Fragment { payHandler.post(new Runnable() { @Override public void run() { -// CommonHttpUtil.notifySamsung(_purchaseVO.getPurchaseId(), mOrderid, new HttpCallback() { -// @Override -// public void onSuccess(int code, String msg, String[] info) { -// if (code == 0) { -// ToastUtil.show(getString(R.string.pay_suc)); -// dis(); -// } -// } -// }); + CommonHttpUtil.notifySamsung(purchaseVo, mOrderid, new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + ToastUtil.show(getString(R.string.pay_suc)); + dis(); + } + } + }); } }); }