谷歌支付失败处理

This commit is contained in:
guozhen 2025-05-27 09:47:40 +08:00
parent 194bd4bef4
commit e7fea6f3c4
16 changed files with 368 additions and 64 deletions

View File

@ -18,8 +18,8 @@ android {
applicationId "com.shortdrama.jelly.zyreotv"
minSdk 24
targetSdk 35
versionCode 6
versionName "1.0.5"
versionCode 7
versionName "1.0.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

View File

@ -60,6 +60,8 @@ public class ITItem {
public static final String Constants_FeedBackList_ID = "Constants_FeedBackList_ID";
public static final String Constants_DeepLinkData_URL = "Constants_DeepLinkData_URL";
public static final String Constants_RestorePay_key = "Constants_RestorePay_Key";
public static boolean isCanPlay = true;
public static boolean isLock = false;
@ -77,11 +79,11 @@ public class ITItem {
public static final String CONSTANTS_Language_Refresh_Event = "Constants_Language_Refresh";
public static final String CONSTANTS_Lang_key="Constants_language_key";
public static final String CONSTANTS_Lang_key_System="system_";
public static final String CONSTANTS_Translate_key="CONSTANTS_Translate_key";
public static final String CONSTANTS_NotifyTime_key="CONSTANTS_NotifyTime_key";
public static final String CONSTANTS_VipPurchaseTime_key="CONSTANTS_VipPurchaseTime_key";
public static final String CONSTANTS_Lang_key = "Constants_language_key";
public static final String CONSTANTS_Lang_key_System = "system_";
public static final String CONSTANTS_Translate_key = "CONSTANTS_Translate_key";
public static final String CONSTANTS_NotifyTime_key = "CONSTANTS_NotifyTime_key";
public static final String CONSTANTS_VipPurchaseTime_key = "CONSTANTS_VipPurchaseTime_key";
static String nextNoneFromTourist(int[] contents, int key, boolean hasEmoji) {

View File

@ -6,9 +6,14 @@ import static com.shortdrama.jelly.zyreotv.GPplicationLoadingdefault.AppContext;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
import java.util.ArrayList;
import java.util.List;
public class TIndicator {
volatile boolean has_VideohistoryButton = false;
@ -118,4 +123,32 @@ public class TIndicator {
public static boolean isTourist() {
return TIndicator.getBoolean(ITItem.Constants_Is_Tourist, true);
}
public static void savePayOrder(GSGooglePayInfo googlePayInfo) {
String string = TIndicator.getString(ITItem.Constants_RestorePay_key, "");
ArrayList<GSGooglePayInfo> orderInfoList = new ArrayList<GSGooglePayInfo>();
if (!TextUtils.isEmpty(string)) {
orderInfoList.addAll(REnterCircle.getListFromJSON(string, GSGooglePayInfo.class));
}else{
orderInfoList.add(orderInfoList.size(), googlePayInfo);
}
savePayOrderList(orderInfoList);
}
public static ArrayList<GSGooglePayInfo> getPayOrder() {
String string = TIndicator.getString(ITItem.Constants_RestorePay_key, "");
ArrayList<GSGooglePayInfo> orderInfoList = new ArrayList<GSGooglePayInfo>();
if (!TextUtils.isEmpty(string)) {
orderInfoList.addAll(REnterCircle.getListFromJSON(string, GSGooglePayInfo.class));
}
return orderInfoList;
}
public static void savePayOrderList(ArrayList<GSGooglePayInfo> list) {
TIndicator.saveString(ITItem.Constants_RestorePay_key, REnterCircle.beanToJSONString(list));
}
}

View File

@ -8,6 +8,7 @@ import java.util.HashMap;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.CFRewardsLoginBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.CWVIntentBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSDeepLinkResBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSLanguageBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ISeekbarBean;
@ -210,7 +211,7 @@ public interface KGZyreotv {
@POST("googlePaid")
Observable<IMACloseStroke> getGooglePay(@Body HashMap<String, Object> body);
Observable<IMACloseStroke> getGooglePay(@Body GSGooglePayInfo gsGooglePayInfo);
@FormUrlEncoded
@POST("get_customer/deeplink")

View File

@ -65,7 +65,7 @@ public class VZBack extends ZRFTablistAndroid {
HttpLoggingInterceptor ecyrpt = new HttpLoggingInterceptor(message -> {
try {
String ccount = URLDecoder.decode(message, "utf-8");
LogUtils.d("OKHttp111111-----", ccount);
LogUtils.d("OKHttp111111-----", ccount);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
LogUtils.d("OKHttp1111111-----", e.getMessage());

View File

@ -64,6 +64,7 @@ import com.shortdrama.jelly.zyreotv.topics.abslRwgt.web.ZYTRewardsFragment;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.web.ZYTWebViewIndexActivity;
import com.shortdrama.jelly.zyreotv.topics.dts.DOTObserverAndroid;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSDeepLinkResBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSMainEpisodeBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.LSQExampleCloseBean;
@ -115,6 +116,8 @@ public class AExtractionActivity extends IDDetailsRoundActivity<TManifestService
GSTranslatesBean.Translates translates;
private GSGooglePayInfo gsGooglePayInfoRestore;
@Override
public void init() {
userViewModel.getTransLates();
@ -213,6 +216,24 @@ public class AExtractionActivity extends IDDetailsRoundActivity<TManifestService
}
}, 700);
binding.getRoot().postDelayed(new Runnable() {
@Override
public void run() {
ArrayList<GSGooglePayInfo> list = TIndicator.getPayOrder();
if (!list.isEmpty()) {
for (GSGooglePayInfo googlePayInfoItem : list) {
gsGooglePayInfoRestore = googlePayInfoItem;
handler.postDelayed(new Runnable() {
@Override
public void run() {
userViewModel.restorePay(gsGooglePayInfoRestore);
}
}, 2000);
}
}
}
}, 3000);
}
@ -385,6 +406,25 @@ public class AExtractionActivity extends IDDetailsRoundActivity<TManifestService
getBottomData();
});
userViewModel.getRestorePayLiveData().observe(this, imaCloseStroke -> {
if (imaCloseStroke != null) {
int index =-1;
ArrayList<GSGooglePayInfo> list = TIndicator.getPayOrder();
for (int i=0;i<list.size();i++){
if(list.get(i).getOrder_code().equals(gsGooglePayInfoRestore.getOrder_code())){
index = i;
break;
}
}
if (index >= 0) {
list.remove(index);
}
TIndicator.savePayOrderList(list);
}
});
}
@ -523,7 +563,7 @@ public class AExtractionActivity extends IDDetailsRoundActivity<TManifestService
TIndicator.saveString(ITItem.Constants_DeepLinkData_URL, "");
needSave = true;
// w2aSelfAttribution(clipString);
if(!isRequestNotify){
if (!isRequestNotify) {
jumpDetails();
}
}

View File

@ -20,6 +20,7 @@ import com.shortdrama.jelly.zyreotv.dlsym.IMACloseStroke;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.IDDetailsRoundActivity;
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreGoldRechargeAdapter;
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreSubVipAdapter;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
@ -56,6 +57,7 @@ public class GSMyVipActivity extends IDDetailsRoundActivity<ActivityVipZytBindin
// private String productType = BillingClient.ProductType.SUBS;
private GSTranslatesBean.Translates translates;
private GSGooglePayInfo gsGooglePayInfo;
@Override
public void init() {
@ -88,15 +90,15 @@ public class GSMyVipActivity extends IDDetailsRoundActivity<ActivityVipZytBindin
}
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(this, purchase -> {
HashMap<String, Object> map = new HashMap<>();
map.put("order_code", current_order_code);
map.put("pay_setting_id", current_pay_setting_id);
map.put("pkg_name", GSMyVipActivity.this.getPackageName());
map.put("product_id", android_template_id);
map.put("purchases_token", purchase.getPurchaseToken());
map.put("transaction_id", purchase.getOrderId());
map.put("show_money", current_price);
userViewModel.getGooglePay(map);
gsGooglePayInfo = new GSGooglePayInfo();
gsGooglePayInfo.setOrder_code(current_order_code);
gsGooglePayInfo.setPay_setting_id(String.valueOf(current_pay_setting_id));
gsGooglePayInfo.setPkg_name(GSMyVipActivity.this.getPackageName());
gsGooglePayInfo.setProduct_id(String.valueOf(android_template_id));
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
gsGooglePayInfo.setShow_money(current_price);
userViewModel.getGooglePay(gsGooglePayInfo);
}, (purchase, str) -> {
PAYLoginHeaddefault.revealToast(str, 0);
});
@ -184,10 +186,15 @@ public class GSMyVipActivity extends IDDetailsRoundActivity<ActivityVipZytBindin
userViewModel.getGooglePayLiveData().observe(this, imaCloseStroke -> {
if (imaCloseStroke != null) {
PAYLoginHeaddefault.revealToast(translates!=null?translates.getGleestream_googlepay_success():getString(R.string.google_pay_success), 0);
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_googlepay_success() : getString(R.string.google_pay_success), 0);
EventBus.getDefault()
.post(ITItem.CONSTANTS_User_Refresh_Event);
userViewModel.getUserInfo();
} else {
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_network_error() : getString(R.string.beanFollowlist), 0);
if (gsGooglePayInfo != null) {
TIndicator.savePayOrder(gsGooglePayInfo);
}
}
});
userViewModel.getGetUserInfoLiveData().observe(this, tjEpisodeRoundBeanIMACloseStroke -> {

View File

@ -1,8 +1,13 @@
package com.shortdrama.jelly.zyreotv.topics.abslRwgt.decbn;
import android.os.Handler;
import android.os.Looper;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Random;
@ -20,6 +25,7 @@ import com.shortdrama.jelly.zyreotv.beginning.TIndicator;
import com.shortdrama.jelly.zyreotv.dlsym.IMACloseStroke;
import com.shortdrama.jelly.zyreotv.dlsym.RREStyles;
import com.shortdrama.jelly.zyreotv.dlsym.VZBack;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSLanguageBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ListBean;
@ -53,6 +59,7 @@ public class GXCProgressLogin extends ViewModel {
private final MutableLiveData<IMACloseStroke<ZYTCommonListBean<ZYTUserSendCoinsBean>>> userSendCoinsLiveData = new MutableLiveData<>();
private final MutableLiveData<IMACloseStroke<ZYTCreateOrderBean>> createOrderLiveData = new MutableLiveData<>();
private final MutableLiveData<IMACloseStroke> googlePayLiveData = new MutableLiveData<>();
private final MutableLiveData<IMACloseStroke> restorePayLiveData = new MutableLiveData<>();
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> registLiveData = new MutableLiveData<>();
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> loginLiveData = new MutableLiveData<>();
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> logoutLiveData = new MutableLiveData<>();
@ -121,6 +128,10 @@ public class GXCProgressLogin extends ViewModel {
return googlePayLiveData;
}
public MutableLiveData<IMACloseStroke> getRestorePayLiveData() {
return restorePayLiveData;
}
private float splashRefreshingSaltTitleTaskFollow() {
double controllerTips = 7516.0;
ArrayList<Float> allNine = new ArrayList();
@ -876,8 +887,8 @@ public class GXCProgressLogin extends ViewModel {
});
}
public void getGooglePay(HashMap<String, Object> body) {
VZBack.getInstance().getGooglePay(body)
public void getGooglePay(GSGooglePayInfo payInfo) {
VZBack.getInstance().getGooglePay(payInfo)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new RREStyles<>() {
@ -896,6 +907,28 @@ public class GXCProgressLogin extends ViewModel {
}
public void restorePay(GSGooglePayInfo restorePay){
VZBack.getInstance().getGooglePay(restorePay)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new RREStyles<>() {
@Override
public void onSuccess(IMACloseStroke o) {
restorePayLiveData.setValue(o);
}
@Override
public void onError(int code, String msg) {
restorePayLiveData.setValue(null);
}
});
}
public void doLogin(HashMap<String, Object> body) {
VZBack.getInstance().doLogin(body)
.subscribeOn(Schedulers.io())

View File

@ -56,6 +56,7 @@ import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.CommonSelectorDialog;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.VipPurchaseDialog;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.web.ZYTWebViewIndexActivity;
import com.shortdrama.jelly.zyreotv.topics.dts.KDZShareRound;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
@ -447,21 +448,23 @@ public class UBJPrivateOllowFragment extends Fragment {
private int current_pay_setting_id;
private String current_order_code;
private GSGooglePayInfo gsGooglePayInfo ;
@Override
public void onResume() {
super.onResume();
seenMarkView.getUserInfo();
if (!TIndicator.is_Vip() && TimeUtils.vipPurchaseIsOpen() && vipPurchaseDialog == null) {
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(getActivity(), purchase -> {
HashMap<String, Object> map = new HashMap<>();
map.put("order_code", current_order_code);
map.put("pay_setting_id", current_pay_setting_id);
map.put("pkg_name", getContext().getPackageName());
map.put("product_id", android_template_id);
map.put("purchases_token", purchase.getPurchaseToken());
map.put("transaction_id", purchase.getOrderId());
map.put("show_money", current_price);
seenMarkView.getGooglePay(map);
gsGooglePayInfo = new GSGooglePayInfo();
gsGooglePayInfo.setOrder_code(current_order_code);
gsGooglePayInfo.setPay_setting_id(String.valueOf(current_pay_setting_id));
gsGooglePayInfo.setPkg_name(getContext().getPackageName());
gsGooglePayInfo.setProduct_id(String.valueOf(android_template_id));
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
gsGooglePayInfo.setShow_money(current_price);
seenMarkView.getGooglePay(gsGooglePayInfo);
}, (purchase, str) -> {
PAYLoginHeaddefault.revealToast(str, 0);
@ -667,6 +670,11 @@ public class UBJPrivateOllowFragment extends Fragment {
if (imaCloseStroke != null) {
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_googlepay_success() : getString(R.string.google_pay_success), 0);
seenMarkView.getUserInfo();
}else{
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_network_error() : getString(R.string.beanFollowlist), 0);
if (gsGooglePayInfo != null) {
TIndicator.savePayOrder(gsGooglePayInfo);
}
}
});
}

View File

@ -1,5 +1,9 @@
package com.shortdrama.jelly.zyreotv.topics.abslRwgt.decbn;
import static android.view.View.VISIBLE;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import androidx.annotation.NonNull;
@ -23,12 +27,14 @@ import com.shortdrama.jelly.zyreotv.beginning.ITItem;
import com.shortdrama.jelly.zyreotv.beginning.LogUtils;
import com.shortdrama.jelly.zyreotv.beginning.PAYLoginHeaddefault;
import com.shortdrama.jelly.zyreotv.beginning.TIndicator;
import com.shortdrama.jelly.zyreotv.beginning.WCenterVideo;
import com.shortdrama.jelly.zyreotv.beginning.ZYTGooglePayUtils;
import com.shortdrama.jelly.zyreotv.databinding.ActivityStoreBinding;
import com.shortdrama.jelly.zyreotv.dlsym.IMACloseStroke;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.IDDetailsRoundActivity;
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreGoldRechargeAdapter;
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreSubVipAdapter;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
@ -37,7 +43,9 @@ import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBinding> {
@ -61,6 +69,9 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
private GSTranslatesBean.Translates translates;
private GSGooglePayInfo gsGooglePayInfo;
private GSGooglePayInfo gsGooglePayInfoRestore;
// private BillingClient billingClient;
@ -69,6 +80,8 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
// private String productType = BillingClient.ProductType.SUBS;
private Handler handler = new Handler();
@Override
public void init() {
vtUserViewModel = new ViewModelProvider(this).get(GXCProgressLogin.class);
@ -83,6 +96,7 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
translates = AppUtils.getTranslates();
if (translates != null) {
binding.layoutStoreActionbar.tvToptitle.setText(translates.getGleestream_store());
binding.layoutStoreActionbar.tvToptitleRight.setText(translates.getGleestream_restore());
binding.layoutStoreRoot.tvStoreCoinsepisode.setText(translates.getGleestream_coins());
binding.layoutStoreRoot.tvStoreMembership.setText(translates.getGleestream_membership());
binding.layoutStoreRoot.layoutVipIntroduct.tvMembershipIntroduce01.setText(translates.getGleestream_vip_introduct1());
@ -95,7 +109,9 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
binding.layoutStoreRoot.layoutVipIntroduct.tvMembershipIntroduce08.setText(translates.getGleestream_vip_introduct8());
} else {
binding.layoutStoreActionbar.tvToptitle.setText(getString(R.string.store_txt));
binding.layoutStoreActionbar.tvToptitleRight.setText(getString(R.string.restore_txt));
}
binding.layoutStoreActionbar.tvToptitleRight.setVisibility(VISIBLE);
// billingClient = BillingClient.newBuilder(this)
// .setListener(new PurchasesUpdatedListener() {
// @Override
@ -145,16 +161,15 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
// });
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(this, purchase -> {
HashMap<String, Object> map = new HashMap<>();
map.put("order_code", current_order_code);
map.put("pay_setting_id", current_pay_setting_id);
map.put("pkg_name", ZYTStoreActivity.this.getPackageName());
map.put("product_id", android_template_id);
map.put("purchases_token", purchase.getPurchaseToken());
map.put("transaction_id", purchase.getOrderId());
map.put("show_money", current_price);
vtUserViewModel.getGooglePay(map);
gsGooglePayInfo = new GSGooglePayInfo();
gsGooglePayInfo.setOrder_code(current_order_code);
gsGooglePayInfo.setPay_setting_id(String.valueOf(current_pay_setting_id));
gsGooglePayInfo.setPkg_name(ZYTStoreActivity.this.getPackageName());
gsGooglePayInfo.setProduct_id(String.valueOf(android_template_id));
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
gsGooglePayInfo.setShow_money(current_price);
vtUserViewModel.getGooglePay(gsGooglePayInfo);
}, (purchase, str) -> {
binding.loading.hide();
PAYLoginHeaddefault.revealToast(str, 0);
@ -216,9 +231,33 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
vtUserViewModel.createOrder(vip.getId(), 0, 0, 0, BillingClient.ProductType.SUBS);
});
binding.layoutStoreActionbar.tvToptitleRight.setOnClickListener(v -> {
WCenterVideo.singleClick(new Runnable() {
@Override
public void run() {
ArrayList<GSGooglePayInfo> list = TIndicator.getPayOrder();
if (!list.isEmpty()) {
for (GSGooglePayInfo googlePayInfoItem : list) {
gsGooglePayInfoRestore = googlePayInfoItem;
handler.postDelayed(new Runnable() {
@Override
public void run() {
binding.loading.smoothToShow();
userViewModel.restorePay(gsGooglePayInfoRestore);
}
}, 2000);
}
} else {
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_no_restored() : getString(R.string.toast_norestore_txt), 0);
}
}
});
});
}
// private void queryAvailableCoinsProducts(List<ZYTPaySettingBean.Coins> list) {
// List<QueryProductDetailsParams.Product> products = new ArrayList<>();
//
@ -386,11 +425,39 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
vtUserViewModel.getGooglePayLiveData().observe(this, imaCloseStroke -> {
binding.loading.hide();
if (imaCloseStroke != null) {
PAYLoginHeaddefault.revealToast(translates!=null?translates.getGleestream_googlepay_success():getString(R.string.google_pay_success), 0);
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_googlepay_success() : getString(R.string.google_pay_success), 0);
EventBus.getDefault()
.post(ITItem.CONSTANTS_User_Refresh_Event);
} else {
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_network_error() : getString(R.string.beanFollowlist), 0);
if (gsGooglePayInfo != null) {
TIndicator.savePayOrder(gsGooglePayInfo);
}
}
});
vtUserViewModel.getRestorePayLiveData().observe(this, imaCloseStroke -> {
if (imaCloseStroke != null) {
int index = -1;
ArrayList<GSGooglePayInfo> list = TIndicator.getPayOrder();
for (int i = 0; i < list.size(); i++) {
if (list.get(i).getOrder_code().equals(gsGooglePayInfoRestore.getOrder_code())) {
index = i;
break;
}
}
if (index >= 0) {
list.remove(index);
}
TIndicator.savePayOrderList(list);
if (list.isEmpty()) {
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_googlepay_success() : getString(R.string.google_pay_success), 0);
EventBus.getDefault()
.post(ITItem.CONSTANTS_User_Refresh_Event);
}
}
binding.loading.hide();
});
}
@Override

View File

@ -47,12 +47,14 @@ import com.shortdrama.jelly.zyreotv.beginning.TimeUtils;
import com.shortdrama.jelly.zyreotv.beginning.WCenterVideo;
import com.shortdrama.jelly.zyreotv.beginning.ZYTGooglePayUtils;
import com.shortdrama.jelly.zyreotv.databinding.MchDimensHeaderBinding;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.decbn.GSMyVipActivity;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.IDDetailsRoundActivity;
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.ZEpisodeEpisode;
import com.shortdrama.jelly.zyreotv.topics.amera.BVXHeadView;
import com.shortdrama.jelly.zyreotv.topics.dts.WVideoplay;
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTRecommondVideoAdapter;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.DBeanUnselectBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSMainEpisodeBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.LSQExampleCloseBean;
@ -97,6 +99,8 @@ public class ZYTVideoPlayerDetailsActivity extends IDDetailsRoundActivity<MchDim
private GSTranslatesBean.Translates translates;
private GSGooglePayInfo gsGooglePayInfo;
@Override
public void init() {
getWindow().setFlags(
@ -220,15 +224,15 @@ public class ZYTVideoPlayerDetailsActivity extends IDDetailsRoundActivity<MchDim
{
if (currentItem != null) {
HashMap<String, Object> map = new HashMap<>();
map.put("order_code", currentItem.getCurrent_order_code());
map.put("pay_setting_id", currentItem.getCurrent_pay_setting_id());
map.put("pkg_name", getPackageName());
map.put("product_id", currentItem.getAndroid_template_id());
map.put("purchases_token", purchase.getPurchaseToken());
map.put("transaction_id", purchase.getOrderId());
map.put("show_money", currentItem.getCurrent_price());
userViewModel.getGooglePay(map);
gsGooglePayInfo = new GSGooglePayInfo();
gsGooglePayInfo.setOrder_code(currentItem.getCurrent_order_code());
gsGooglePayInfo.setPay_setting_id(String.valueOf(currentItem.getCurrent_pay_setting_id()));
gsGooglePayInfo.setPkg_name(getPackageName());
gsGooglePayInfo.setProduct_id(currentItem.getAndroid_template_id());
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
gsGooglePayInfo.setShow_money(currentItem.getCurrent_price());
userViewModel.getGooglePay(gsGooglePayInfo);
}
}, (purchase, str) ->
@ -535,6 +539,11 @@ public class ZYTVideoPlayerDetailsActivity extends IDDetailsRoundActivity<MchDim
userViewModel.getUserInfo();
// LSQExampleCloseBean.YPZTestUnselect item = vtGooglePlayerAdapter.getItems().get(currentPosition);
// vtViewModel.getVideoDetails(item.getShort_play_id(), item.getShort_play_video_id(),activity_id);
} else {
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_network_error() : getString(R.string.beanFollowlist), 0);
if (gsGooglePayInfo != null) {
TIndicator.savePayOrder(gsGooglePayInfo);
}
}
});

View File

@ -0,0 +1,69 @@
package com.shortdrama.jelly.zyreotv.unconfirmedPiecewise;
public class GSGooglePayInfo {
String order_code;
String pay_setting_id;
String pkg_name;
String product_id;
String purchases_token;
String transaction_id;
String show_money;
public String getOrder_code() {
return order_code;
}
public void setOrder_code(String order_code) {
this.order_code = order_code;
}
public String getPay_setting_id() {
return pay_setting_id;
}
public void setPay_setting_id(String pay_setting_id) {
this.pay_setting_id = pay_setting_id;
}
public String getPkg_name() {
return pkg_name;
}
public void setPkg_name(String pkg_name) {
this.pkg_name = pkg_name;
}
public String getProduct_id() {
return product_id;
}
public void setProduct_id(String product_id) {
this.product_id = product_id;
}
public String getPurchases_token() {
return purchases_token;
}
public void setPurchases_token(String purchases_token) {
this.purchases_token = purchases_token;
}
public String getTransaction_id() {
return transaction_id;
}
public void setTransaction_id(String transaction_id) {
this.transaction_id = transaction_id;
}
public String getShow_money() {
return show_money;
}
public void setShow_money(String show_money) {
this.show_money = show_money;
}
}

View File

@ -147,6 +147,25 @@ public class GSTranslatesBean {
private String gleestream_earlier;
private String gleestream_clearcahe;
private String gleestream_restore;
private String gleestream_no_restored;
public String getGleestream_no_restored() {
return gleestream_no_restored;
}
public void setGleestream_no_restored(String gleestream_no_restored) {
this.gleestream_no_restored = gleestream_no_restored;
}
public String getGleestream_restore() {
return gleestream_restore;
}
public void setGleestream_restore(String gleestream_restore) {
this.gleestream_restore = gleestream_restore;
}
public String getGleestream_clearcahe() {
return gleestream_clearcahe;
}

View File

@ -1,27 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_topback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/iv_topback"
android:padding="@dimen/followHistoryOllow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="@dimen/followHistoryOllow"
app:tint="@android:color/white"
app:srcCompat="@mipmap/bottom_agreement_google" />
app:srcCompat="@mipmap/bottom_agreement_google"
app:tint="@android:color/white" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_toptitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/appnameOmmonClose"
android:textColor="@android:color/white"
app:layout_constraintTop_toTopOf="parent"
android:textSize="@dimen/appnameOmmonClose"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/tv_toptitle"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_toptitle_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:textSize="@dimen/appnameOmmonClose"
android:visibility="gone"
android:gravity="center_vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -122,6 +122,8 @@
<string name="successed_txt">Success</string>
<string name="feedback_index">FeedBack</string>
<string name="store_txt">Store</string>
<string name="restore_txt">Restore</string>
<string name="toast_norestore_txt">There are no orders to restore</string>
<string name="vip_txt">Vip</string>
<string name="setting_txt">Setting</string>
<string name="deleteaccount_txt">Account Deletion</string>

View File

@ -22,7 +22,7 @@ android.nonTransitiveRClass=true
#org.gradle.internal.http.connectionTimeout=600000
#org.gradle.internal.http.socketTimeout=600000
# uploadCrashlyticsMappingFile
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7890
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7890
#systemProp.http.proxyHost=127.0.0.1
#systemProp.http.proxyPort=7890
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=7890