This commit is contained in:
18142669586 2022-08-31 20:33:23 +08:00
parent ba4de13cc3
commit 07ce36e549
3 changed files with 23 additions and 3 deletions

View File

@ -16,6 +16,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
/**
* 直播网络请求整合
*/

View File

@ -62,7 +62,7 @@ public class GoogleFragment extends Fragment {
private View view;
private String mOrderid,mProductId,MoneyUsds;
public static String mOrderid,mProductId,MoneyUsds;
private WebView rlWebview;
private String url;

View File

@ -26,14 +26,21 @@ import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.viewpager.widget.ViewPager;
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustEvent;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.android.billingclient.api.BillingResult;
import com.android.billingclient.api.Purchase;
import com.android.billingclient.api.PurchaseHistoryRecord;
import com.android.billingclient.api.PurchaseHistoryResponseListener;
import com.android.billingclient.api.SkuDetails;
import com.facebook.appevents.AppEventsConstants;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.messaging.FirebaseMessaging;
@ -65,6 +72,7 @@ import com.yunbao.common.event.NoviceInstructorEvent;
import com.yunbao.common.event.RongIMConnectionStatusEvent;
import com.yunbao.common.event.UpdateTablePointMe;
import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.main.MainNetManager;
import com.yunbao.common.interfaces.CommonCallback;
@ -135,6 +143,8 @@ import io.rong.imlib.RongIMClient;
import kotlin.Unit;
import static com.yunbao.common.CommonAppContext.isReady;
import static com.yunbao.common.CommonAppContext.logger;
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
import static com.yunbao.live.activity.SystemMessageActivity.type;
import io.rong.imlib.model.Message;
@ -204,6 +214,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override
public void onQuerySuccess(@NonNull String skuType, @NonNull List<SkuDetails> list, boolean isSelf) {
Log.d(TAG, "1111");
}
@ -218,8 +229,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
return false;
}
googleBillingUtil.consumeAsync(MainActivity.this, purchase.getPurchaseToken());
} else {
tempBuffer.append("暂未支付:");
@ -233,6 +242,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override
public boolean onRecheck(@NonNull String skuType, @NonNull Purchase purchase, boolean isSelf) {
Log.e(TAG,purchase.getSku()+"s"+purchase.getOrderId()+"sds"+purchase.getPurchaseToken());
//谷歌掉单处理
CommonHttpUtil.Google_sec_pay(purchase.getPurchaseToken(),purchase.getOrderId(),purchase.getSku(),new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
}
});
StringBuffer tempBuffer = new StringBuffer();
tempBuffer.append("检测到未处理的订单($skuType):${purchase.sku}()");
Log.d(TAG, tempBuffer.toString());
@ -310,6 +328,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
.addOnGoogleBillingListener(MainActivity.this, mOnMyGoogleBillingListener)
.build(MainActivity.this);
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
v_table_redpoint = findViewById(R.id.v_table_redpoint);
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);