谷歌支付失败处理
This commit is contained in:
parent
194bd4bef4
commit
e7fea6f3c4
@ -18,8 +18,8 @@ android {
|
|||||||
applicationId "com.shortdrama.jelly.zyreotv"
|
applicationId "com.shortdrama.jelly.zyreotv"
|
||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 35
|
targetSdk 35
|
||||||
versionCode 6
|
versionCode 7
|
||||||
versionName "1.0.5"
|
versionName "1.0.6"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
@ -60,6 +60,8 @@ public class ITItem {
|
|||||||
public static final String Constants_FeedBackList_ID = "Constants_FeedBackList_ID";
|
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_DeepLinkData_URL = "Constants_DeepLinkData_URL";
|
||||||
|
|
||||||
|
public static final String Constants_RestorePay_key = "Constants_RestorePay_Key";
|
||||||
|
|
||||||
public static boolean isCanPlay = true;
|
public static boolean isCanPlay = true;
|
||||||
public static boolean isLock = false;
|
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_Language_Refresh_Event = "Constants_Language_Refresh";
|
||||||
|
|
||||||
|
|
||||||
public static final String CONSTANTS_Lang_key="Constants_language_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_Lang_key_System = "system_";
|
||||||
public static final String CONSTANTS_Translate_key="CONSTANTS_Translate_key";
|
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_NotifyTime_key = "CONSTANTS_NotifyTime_key";
|
||||||
public static final String CONSTANTS_VipPurchaseTime_key="CONSTANTS_VipPurchaseTime_key";
|
public static final String CONSTANTS_VipPurchaseTime_key = "CONSTANTS_VipPurchaseTime_key";
|
||||||
|
|
||||||
|
|
||||||
static String nextNoneFromTourist(int[] contents, int key, boolean hasEmoji) {
|
static String nextNoneFromTourist(int[] contents, int key, boolean hasEmoji) {
|
||||||
|
@ -6,9 +6,14 @@ import static com.shortdrama.jelly.zyreotv.GPplicationLoadingdefault.AppContext;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSGooglePayInfo;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
public class TIndicator {
|
public class TIndicator {
|
||||||
volatile boolean has_VideohistoryButton = false;
|
volatile boolean has_VideohistoryButton = false;
|
||||||
@ -118,4 +123,32 @@ public class TIndicator {
|
|||||||
public static boolean isTourist() {
|
public static boolean isTourist() {
|
||||||
return TIndicator.getBoolean(ITItem.Constants_Is_Tourist, true);
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import java.util.HashMap;
|
|||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.CFRewardsLoginBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.CFRewardsLoginBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.CWVIntentBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.CWVIntentBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSDeepLinkResBean;
|
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.GSLanguageBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ISeekbarBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ISeekbarBean;
|
||||||
@ -210,7 +211,7 @@ public interface KGZyreotv {
|
|||||||
|
|
||||||
|
|
||||||
@POST("googlePaid")
|
@POST("googlePaid")
|
||||||
Observable<IMACloseStroke> getGooglePay(@Body HashMap<String, Object> body);
|
Observable<IMACloseStroke> getGooglePay(@Body GSGooglePayInfo gsGooglePayInfo);
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST("get_customer/deeplink")
|
@POST("get_customer/deeplink")
|
||||||
|
@ -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.abslRwgt.web.ZYTWebViewIndexActivity;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.DOTObserverAndroid;
|
import com.shortdrama.jelly.zyreotv.topics.dts.DOTObserverAndroid;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSDeepLinkResBean;
|
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.GSMainEpisodeBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.LSQExampleCloseBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.LSQExampleCloseBean;
|
||||||
@ -115,6 +116,8 @@ public class AExtractionActivity extends IDDetailsRoundActivity<TManifestService
|
|||||||
|
|
||||||
GSTranslatesBean.Translates translates;
|
GSTranslatesBean.Translates translates;
|
||||||
|
|
||||||
|
private GSGooglePayInfo gsGooglePayInfoRestore;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
userViewModel.getTransLates();
|
userViewModel.getTransLates();
|
||||||
@ -213,6 +216,24 @@ public class AExtractionActivity extends IDDetailsRoundActivity<TManifestService
|
|||||||
}
|
}
|
||||||
}, 700);
|
}, 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();
|
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, "");
|
TIndicator.saveString(ITItem.Constants_DeepLinkData_URL, "");
|
||||||
needSave = true;
|
needSave = true;
|
||||||
// w2aSelfAttribution(clipString);
|
// w2aSelfAttribution(clipString);
|
||||||
if(!isRequestNotify){
|
if (!isRequestNotify) {
|
||||||
jumpDetails();
|
jumpDetails();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.abslRwgt.pragma.IDDetailsRoundActivity;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreGoldRechargeAdapter;
|
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreGoldRechargeAdapter;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreSubVipAdapter;
|
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.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
|
||||||
@ -56,6 +57,7 @@ public class GSMyVipActivity extends IDDetailsRoundActivity<ActivityVipZytBindin
|
|||||||
// private String productType = BillingClient.ProductType.SUBS;
|
// private String productType = BillingClient.ProductType.SUBS;
|
||||||
private GSTranslatesBean.Translates translates;
|
private GSTranslatesBean.Translates translates;
|
||||||
|
|
||||||
|
private GSGooglePayInfo gsGooglePayInfo;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
@ -88,15 +90,15 @@ public class GSMyVipActivity extends IDDetailsRoundActivity<ActivityVipZytBindin
|
|||||||
}
|
}
|
||||||
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(this, purchase -> {
|
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(this, purchase -> {
|
||||||
|
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
gsGooglePayInfo = new GSGooglePayInfo();
|
||||||
map.put("order_code", current_order_code);
|
gsGooglePayInfo.setOrder_code(current_order_code);
|
||||||
map.put("pay_setting_id", current_pay_setting_id);
|
gsGooglePayInfo.setPay_setting_id(String.valueOf(current_pay_setting_id));
|
||||||
map.put("pkg_name", GSMyVipActivity.this.getPackageName());
|
gsGooglePayInfo.setPkg_name(GSMyVipActivity.this.getPackageName());
|
||||||
map.put("product_id", android_template_id);
|
gsGooglePayInfo.setProduct_id(String.valueOf(android_template_id));
|
||||||
map.put("purchases_token", purchase.getPurchaseToken());
|
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
|
||||||
map.put("transaction_id", purchase.getOrderId());
|
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
|
||||||
map.put("show_money", current_price);
|
gsGooglePayInfo.setShow_money(current_price);
|
||||||
userViewModel.getGooglePay(map);
|
userViewModel.getGooglePay(gsGooglePayInfo);
|
||||||
}, (purchase, str) -> {
|
}, (purchase, str) -> {
|
||||||
PAYLoginHeaddefault.revealToast(str, 0);
|
PAYLoginHeaddefault.revealToast(str, 0);
|
||||||
});
|
});
|
||||||
@ -184,10 +186,15 @@ public class GSMyVipActivity extends IDDetailsRoundActivity<ActivityVipZytBindin
|
|||||||
|
|
||||||
userViewModel.getGooglePayLiveData().observe(this, imaCloseStroke -> {
|
userViewModel.getGooglePayLiveData().observe(this, imaCloseStroke -> {
|
||||||
if (imaCloseStroke != null) {
|
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()
|
EventBus.getDefault()
|
||||||
.post(ITItem.CONSTANTS_User_Refresh_Event);
|
.post(ITItem.CONSTANTS_User_Refresh_Event);
|
||||||
userViewModel.getUserInfo();
|
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 -> {
|
userViewModel.getGetUserInfoLiveData().observe(this, tjEpisodeRoundBeanIMACloseStroke -> {
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
package com.shortdrama.jelly.zyreotv.topics.abslRwgt.decbn;
|
package com.shortdrama.jelly.zyreotv.topics.abslRwgt.decbn;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.Queue;
|
||||||
import java.util.Random;
|
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.IMACloseStroke;
|
||||||
import com.shortdrama.jelly.zyreotv.dlsym.RREStyles;
|
import com.shortdrama.jelly.zyreotv.dlsym.RREStyles;
|
||||||
import com.shortdrama.jelly.zyreotv.dlsym.VZBack;
|
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.GSLanguageBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ListBean;
|
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<ZYTCommonListBean<ZYTUserSendCoinsBean>>> userSendCoinsLiveData = new MutableLiveData<>();
|
||||||
private final MutableLiveData<IMACloseStroke<ZYTCreateOrderBean>> createOrderLiveData = new MutableLiveData<>();
|
private final MutableLiveData<IMACloseStroke<ZYTCreateOrderBean>> createOrderLiveData = new MutableLiveData<>();
|
||||||
private final MutableLiveData<IMACloseStroke> googlePayLiveData = 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>> registLiveData = new MutableLiveData<>();
|
||||||
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> loginLiveData = new MutableLiveData<>();
|
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> loginLiveData = new MutableLiveData<>();
|
||||||
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> logoutLiveData = new MutableLiveData<>();
|
private final MutableLiveData<IMACloseStroke<VPisodesAppnameBean>> logoutLiveData = new MutableLiveData<>();
|
||||||
@ -121,6 +128,10 @@ public class GXCProgressLogin extends ViewModel {
|
|||||||
return googlePayLiveData;
|
return googlePayLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MutableLiveData<IMACloseStroke> getRestorePayLiveData() {
|
||||||
|
return restorePayLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
private float splashRefreshingSaltTitleTaskFollow() {
|
private float splashRefreshingSaltTitleTaskFollow() {
|
||||||
double controllerTips = 7516.0;
|
double controllerTips = 7516.0;
|
||||||
ArrayList<Float> allNine = new ArrayList();
|
ArrayList<Float> allNine = new ArrayList();
|
||||||
@ -876,8 +887,8 @@ public class GXCProgressLogin extends ViewModel {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGooglePay(HashMap<String, Object> body) {
|
public void getGooglePay(GSGooglePayInfo payInfo) {
|
||||||
VZBack.getInstance().getGooglePay(body)
|
VZBack.getInstance().getGooglePay(payInfo)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new RREStyles<>() {
|
.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) {
|
public void doLogin(HashMap<String, Object> body) {
|
||||||
VZBack.getInstance().doLogin(body)
|
VZBack.getInstance().doLogin(body)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
|
@ -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.pragma.VipPurchaseDialog;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.web.ZYTWebViewIndexActivity;
|
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.web.ZYTWebViewIndexActivity;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.KDZShareRound;
|
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.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.TJEpisodeRoundBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
|
||||||
@ -447,21 +448,23 @@ public class UBJPrivateOllowFragment extends Fragment {
|
|||||||
private int current_pay_setting_id;
|
private int current_pay_setting_id;
|
||||||
private String current_order_code;
|
private String current_order_code;
|
||||||
|
|
||||||
|
private GSGooglePayInfo gsGooglePayInfo ;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
seenMarkView.getUserInfo();
|
seenMarkView.getUserInfo();
|
||||||
if (!TIndicator.is_Vip() && TimeUtils.vipPurchaseIsOpen() && vipPurchaseDialog == null) {
|
if (!TIndicator.is_Vip() && TimeUtils.vipPurchaseIsOpen() && vipPurchaseDialog == null) {
|
||||||
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(getActivity(), purchase -> {
|
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(getActivity(), purchase -> {
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
gsGooglePayInfo = new GSGooglePayInfo();
|
||||||
map.put("order_code", current_order_code);
|
gsGooglePayInfo.setOrder_code(current_order_code);
|
||||||
map.put("pay_setting_id", current_pay_setting_id);
|
gsGooglePayInfo.setPay_setting_id(String.valueOf(current_pay_setting_id));
|
||||||
map.put("pkg_name", getContext().getPackageName());
|
gsGooglePayInfo.setPkg_name(getContext().getPackageName());
|
||||||
map.put("product_id", android_template_id);
|
gsGooglePayInfo.setProduct_id(String.valueOf(android_template_id));
|
||||||
map.put("purchases_token", purchase.getPurchaseToken());
|
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
|
||||||
map.put("transaction_id", purchase.getOrderId());
|
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
|
||||||
map.put("show_money", current_price);
|
gsGooglePayInfo.setShow_money(current_price);
|
||||||
seenMarkView.getGooglePay(map);
|
seenMarkView.getGooglePay(gsGooglePayInfo);
|
||||||
}, (purchase, str) -> {
|
}, (purchase, str) -> {
|
||||||
|
|
||||||
PAYLoginHeaddefault.revealToast(str, 0);
|
PAYLoginHeaddefault.revealToast(str, 0);
|
||||||
@ -667,6 +670,11 @@ public class UBJPrivateOllowFragment extends Fragment {
|
|||||||
if (imaCloseStroke != null) {
|
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);
|
||||||
seenMarkView.getUserInfo();
|
seenMarkView.getUserInfo();
|
||||||
|
}else{
|
||||||
|
PAYLoginHeaddefault.revealToast(translates != null ? translates.getGleestream_network_error() : getString(R.string.beanFollowlist), 0);
|
||||||
|
if (gsGooglePayInfo != null) {
|
||||||
|
TIndicator.savePayOrder(gsGooglePayInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package com.shortdrama.jelly.zyreotv.topics.abslRwgt.decbn;
|
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 android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
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.LogUtils;
|
||||||
import com.shortdrama.jelly.zyreotv.beginning.PAYLoginHeaddefault;
|
import com.shortdrama.jelly.zyreotv.beginning.PAYLoginHeaddefault;
|
||||||
import com.shortdrama.jelly.zyreotv.beginning.TIndicator;
|
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.beginning.ZYTGooglePayUtils;
|
||||||
import com.shortdrama.jelly.zyreotv.databinding.ActivityStoreBinding;
|
import com.shortdrama.jelly.zyreotv.databinding.ActivityStoreBinding;
|
||||||
import com.shortdrama.jelly.zyreotv.dlsym.IMACloseStroke;
|
import com.shortdrama.jelly.zyreotv.dlsym.IMACloseStroke;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.IDDetailsRoundActivity;
|
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.IDDetailsRoundActivity;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreGoldRechargeAdapter;
|
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreGoldRechargeAdapter;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTStoreSubVipAdapter;
|
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.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.ZYTPaySettingBean;
|
||||||
|
|
||||||
@ -37,7 +43,9 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Queue;
|
||||||
|
|
||||||
|
|
||||||
public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBinding> {
|
public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBinding> {
|
||||||
@ -61,6 +69,9 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
|
|||||||
|
|
||||||
private GSTranslatesBean.Translates translates;
|
private GSTranslatesBean.Translates translates;
|
||||||
|
|
||||||
|
private GSGooglePayInfo gsGooglePayInfo;
|
||||||
|
private GSGooglePayInfo gsGooglePayInfoRestore;
|
||||||
|
|
||||||
|
|
||||||
// private BillingClient billingClient;
|
// private BillingClient billingClient;
|
||||||
|
|
||||||
@ -69,6 +80,8 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
|
|||||||
// private String productType = BillingClient.ProductType.SUBS;
|
// private String productType = BillingClient.ProductType.SUBS;
|
||||||
|
|
||||||
|
|
||||||
|
private Handler handler = new Handler();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
vtUserViewModel = new ViewModelProvider(this).get(GXCProgressLogin.class);
|
vtUserViewModel = new ViewModelProvider(this).get(GXCProgressLogin.class);
|
||||||
@ -83,6 +96,7 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
|
|||||||
translates = AppUtils.getTranslates();
|
translates = AppUtils.getTranslates();
|
||||||
if (translates != null) {
|
if (translates != null) {
|
||||||
binding.layoutStoreActionbar.tvToptitle.setText(translates.getGleestream_store());
|
binding.layoutStoreActionbar.tvToptitle.setText(translates.getGleestream_store());
|
||||||
|
binding.layoutStoreActionbar.tvToptitleRight.setText(translates.getGleestream_restore());
|
||||||
binding.layoutStoreRoot.tvStoreCoinsepisode.setText(translates.getGleestream_coins());
|
binding.layoutStoreRoot.tvStoreCoinsepisode.setText(translates.getGleestream_coins());
|
||||||
binding.layoutStoreRoot.tvStoreMembership.setText(translates.getGleestream_membership());
|
binding.layoutStoreRoot.tvStoreMembership.setText(translates.getGleestream_membership());
|
||||||
binding.layoutStoreRoot.layoutVipIntroduct.tvMembershipIntroduce01.setText(translates.getGleestream_vip_introduct1());
|
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());
|
binding.layoutStoreRoot.layoutVipIntroduct.tvMembershipIntroduce08.setText(translates.getGleestream_vip_introduct8());
|
||||||
} else {
|
} else {
|
||||||
binding.layoutStoreActionbar.tvToptitle.setText(getString(R.string.store_txt));
|
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)
|
// billingClient = BillingClient.newBuilder(this)
|
||||||
// .setListener(new PurchasesUpdatedListener() {
|
// .setListener(new PurchasesUpdatedListener() {
|
||||||
// @Override
|
// @Override
|
||||||
@ -145,16 +161,15 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(this, purchase -> {
|
zytGooglePayUtils = ZYTGooglePayUtils.getInstance(this, purchase -> {
|
||||||
|
gsGooglePayInfo = new GSGooglePayInfo();
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
gsGooglePayInfo.setOrder_code(current_order_code);
|
||||||
map.put("order_code", current_order_code);
|
gsGooglePayInfo.setPay_setting_id(String.valueOf(current_pay_setting_id));
|
||||||
map.put("pay_setting_id", current_pay_setting_id);
|
gsGooglePayInfo.setPkg_name(ZYTStoreActivity.this.getPackageName());
|
||||||
map.put("pkg_name", ZYTStoreActivity.this.getPackageName());
|
gsGooglePayInfo.setProduct_id(String.valueOf(android_template_id));
|
||||||
map.put("product_id", android_template_id);
|
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
|
||||||
map.put("purchases_token", purchase.getPurchaseToken());
|
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
|
||||||
map.put("transaction_id", purchase.getOrderId());
|
gsGooglePayInfo.setShow_money(current_price);
|
||||||
map.put("show_money", current_price);
|
vtUserViewModel.getGooglePay(gsGooglePayInfo);
|
||||||
vtUserViewModel.getGooglePay(map);
|
|
||||||
}, (purchase, str) -> {
|
}, (purchase, str) -> {
|
||||||
binding.loading.hide();
|
binding.loading.hide();
|
||||||
PAYLoginHeaddefault.revealToast(str, 0);
|
PAYLoginHeaddefault.revealToast(str, 0);
|
||||||
@ -216,9 +231,33 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
|
|||||||
vtUserViewModel.createOrder(vip.getId(), 0, 0, 0, BillingClient.ProductType.SUBS);
|
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) {
|
// private void queryAvailableCoinsProducts(List<ZYTPaySettingBean.Coins> list) {
|
||||||
// List<QueryProductDetailsParams.Product> products = new ArrayList<>();
|
// List<QueryProductDetailsParams.Product> products = new ArrayList<>();
|
||||||
//
|
//
|
||||||
@ -386,10 +425,38 @@ public class ZYTStoreActivity extends IDDetailsRoundActivity<ActivityStoreBindin
|
|||||||
vtUserViewModel.getGooglePayLiveData().observe(this, imaCloseStroke -> {
|
vtUserViewModel.getGooglePayLiveData().observe(this, imaCloseStroke -> {
|
||||||
binding.loading.hide();
|
binding.loading.hide();
|
||||||
if (imaCloseStroke != null) {
|
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()
|
EventBus.getDefault()
|
||||||
.post(ITItem.CONSTANTS_User_Refresh_Event);
|
.post(ITItem.CONSTANTS_User_Refresh_Event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
binding.loading.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,12 +47,14 @@ import com.shortdrama.jelly.zyreotv.beginning.TimeUtils;
|
|||||||
import com.shortdrama.jelly.zyreotv.beginning.WCenterVideo;
|
import com.shortdrama.jelly.zyreotv.beginning.WCenterVideo;
|
||||||
import com.shortdrama.jelly.zyreotv.beginning.ZYTGooglePayUtils;
|
import com.shortdrama.jelly.zyreotv.beginning.ZYTGooglePayUtils;
|
||||||
import com.shortdrama.jelly.zyreotv.databinding.MchDimensHeaderBinding;
|
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.IDDetailsRoundActivity;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.ZEpisodeEpisode;
|
import com.shortdrama.jelly.zyreotv.topics.abslRwgt.pragma.ZEpisodeEpisode;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.amera.BVXHeadView;
|
import com.shortdrama.jelly.zyreotv.topics.amera.BVXHeadView;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.WVideoplay;
|
import com.shortdrama.jelly.zyreotv.topics.dts.WVideoplay;
|
||||||
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTRecommondVideoAdapter;
|
import com.shortdrama.jelly.zyreotv.topics.dts.ZYTRecommondVideoAdapter;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.DBeanUnselectBean;
|
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.GSMainEpisodeBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.GSTranslatesBean;
|
||||||
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.LSQExampleCloseBean;
|
import com.shortdrama.jelly.zyreotv.unconfirmedPiecewise.LSQExampleCloseBean;
|
||||||
@ -97,6 +99,8 @@ public class ZYTVideoPlayerDetailsActivity extends IDDetailsRoundActivity<MchDim
|
|||||||
|
|
||||||
private GSTranslatesBean.Translates translates;
|
private GSTranslatesBean.Translates translates;
|
||||||
|
|
||||||
|
private GSGooglePayInfo gsGooglePayInfo;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
getWindow().setFlags(
|
getWindow().setFlags(
|
||||||
@ -220,15 +224,15 @@ public class ZYTVideoPlayerDetailsActivity extends IDDetailsRoundActivity<MchDim
|
|||||||
|
|
||||||
{
|
{
|
||||||
if (currentItem != null) {
|
if (currentItem != null) {
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
gsGooglePayInfo = new GSGooglePayInfo();
|
||||||
map.put("order_code", currentItem.getCurrent_order_code());
|
gsGooglePayInfo.setOrder_code(currentItem.getCurrent_order_code());
|
||||||
map.put("pay_setting_id", currentItem.getCurrent_pay_setting_id());
|
gsGooglePayInfo.setPay_setting_id(String.valueOf(currentItem.getCurrent_pay_setting_id()));
|
||||||
map.put("pkg_name", getPackageName());
|
gsGooglePayInfo.setPkg_name(getPackageName());
|
||||||
map.put("product_id", currentItem.getAndroid_template_id());
|
gsGooglePayInfo.setProduct_id(currentItem.getAndroid_template_id());
|
||||||
map.put("purchases_token", purchase.getPurchaseToken());
|
gsGooglePayInfo.setPurchases_token(purchase.getPurchaseToken());
|
||||||
map.put("transaction_id", purchase.getOrderId());
|
gsGooglePayInfo.setTransaction_id(purchase.getOrderId());
|
||||||
map.put("show_money", currentItem.getCurrent_price());
|
gsGooglePayInfo.setShow_money(currentItem.getCurrent_price());
|
||||||
userViewModel.getGooglePay(map);
|
userViewModel.getGooglePay(gsGooglePayInfo);
|
||||||
}
|
}
|
||||||
}, (purchase, str) ->
|
}, (purchase, str) ->
|
||||||
|
|
||||||
@ -535,6 +539,11 @@ public class ZYTVideoPlayerDetailsActivity extends IDDetailsRoundActivity<MchDim
|
|||||||
userViewModel.getUserInfo();
|
userViewModel.getUserInfo();
|
||||||
// LSQExampleCloseBean.YPZTestUnselect item = vtGooglePlayerAdapter.getItems().get(currentPosition);
|
// LSQExampleCloseBean.YPZTestUnselect item = vtGooglePlayerAdapter.getItems().get(currentPosition);
|
||||||
// vtViewModel.getVideoDetails(item.getShort_play_id(), item.getShort_play_video_id(),activity_id);
|
// 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -147,6 +147,25 @@ public class GSTranslatesBean {
|
|||||||
private String gleestream_earlier;
|
private String gleestream_earlier;
|
||||||
private String gleestream_clearcahe;
|
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() {
|
public String getGleestream_clearcahe() {
|
||||||
return gleestream_clearcahe;
|
return gleestream_clearcahe;
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,41 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_topback"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/iv_topback"
|
android:padding="@dimen/followHistoryOllow"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:padding="@dimen/followHistoryOllow"
|
app:srcCompat="@mipmap/bottom_agreement_google"
|
||||||
app:tint="@android:color/white"
|
app:tint="@android:color/white" />
|
||||||
app:srcCompat="@mipmap/bottom_agreement_google" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_toptitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/appnameOmmonClose"
|
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:textSize="@dimen/appnameOmmonClose"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -122,6 +122,8 @@
|
|||||||
<string name="successed_txt">Success</string>
|
<string name="successed_txt">Success</string>
|
||||||
<string name="feedback_index">FeedBack</string>
|
<string name="feedback_index">FeedBack</string>
|
||||||
<string name="store_txt">Store</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="vip_txt">Vip</string>
|
||||||
<string name="setting_txt">Setting</string>
|
<string name="setting_txt">Setting</string>
|
||||||
<string name="deleteaccount_txt">Account Deletion</string>
|
<string name="deleteaccount_txt">Account Deletion</string>
|
||||||
|
@ -22,7 +22,7 @@ android.nonTransitiveRClass=true
|
|||||||
#org.gradle.internal.http.connectionTimeout=600000
|
#org.gradle.internal.http.connectionTimeout=600000
|
||||||
#org.gradle.internal.http.socketTimeout=600000
|
#org.gradle.internal.http.socketTimeout=600000
|
||||||
# uploadCrashlyticsMappingFile
|
# uploadCrashlyticsMappingFile
|
||||||
systemProp.http.proxyHost=127.0.0.1
|
#systemProp.http.proxyHost=127.0.0.1
|
||||||
systemProp.http.proxyPort=7890
|
#systemProp.http.proxyPort=7890
|
||||||
systemProp.https.proxyHost=127.0.0.1
|
#systemProp.https.proxyHost=127.0.0.1
|
||||||
systemProp.https.proxyPort=7890
|
#systemProp.https.proxyPort=7890
|
Loading…
x
Reference in New Issue
Block a user