小程序支付增加app参数
This commit is contained in:
@@ -650,7 +650,7 @@ public class XChatApplication extends Application {
|
||||
Map<String, String> httpParams = new ArrayMap<>();
|
||||
httpParams.put("os", "android");
|
||||
httpParams.put("osVersion", Build.VERSION.RELEASE);
|
||||
httpParams.put("app", "yinyou");
|
||||
httpParams.put("app", XChatConstants.APP_MARK);
|
||||
httpParams.put("ispType", String.valueOf(SystemUtils.getIspType(context)));
|
||||
httpParams.put("netType", String.valueOf(SystemUtils.getNetworkType(context)));
|
||||
httpParams.put("model", SystemUtils.getPhoneModel());
|
||||
|
@@ -5,6 +5,7 @@ import android.os.Build;
|
||||
|
||||
import com.idlefish.flutterboost.FlutterBoost;
|
||||
import com.yizhuan.erban.application.XChatApplication;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
|
||||
@@ -42,7 +43,7 @@ public class XplanFlutterBoostCallback implements FlutterBoost.Callback {
|
||||
Map<String, String> httpParams = new HashMap<>();
|
||||
httpParams.put("os", "android");
|
||||
httpParams.put("osVersion", Build.VERSION.RELEASE);
|
||||
httpParams.put("app", "yinyou");
|
||||
httpParams.put("app", XChatConstants.APP_MARK);
|
||||
httpParams.put("ispType", String.valueOf(SystemUtils.getIspType(context)));
|
||||
httpParams.put("netType", String.valueOf(SystemUtils.getNetworkType(context)));
|
||||
httpParams.put("model", SystemUtils.getPhoneModel());
|
||||
|
@@ -33,6 +33,7 @@ import com.yizhuan.erban.ui.webview.event.H5NotifyClientEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.ShowNavEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.TaroPayResultEvent;
|
||||
import com.yizhuan.erban.ui.widget.ShareDialog;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.certification.event.CertificationResultEvent;
|
||||
import com.yizhuan.xchat_android_core.decoration.bean.DecorationStoreRouterType;
|
||||
@@ -409,7 +410,7 @@ public class JSInterface {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("os", "android");
|
||||
jsonObject.put("osVersion", Build.VERSION.RELEASE);
|
||||
jsonObject.put("app", "yinyou");
|
||||
jsonObject.put("app", XChatConstants.APP_MARK);
|
||||
jsonObject.put("ispType", String.valueOf(SystemUtils.getIspType(context)));
|
||||
jsonObject.put("netType", String.valueOf(SystemUtils.getNetworkType(context)));
|
||||
jsonObject.put("model", SystemUtils.getPhoneModel());
|
||||
|
@@ -309,4 +309,5 @@ public class XChatConstants {
|
||||
// 侧耳
|
||||
// public static final String QUICK_PASS_BUSINESS_ID = BuildConfig.DEBUG ? "cadbb4ed892549dab4d1adc9d62013bb" : "ba4a642810294561b9cd17034a448b49";
|
||||
|
||||
public static final String APP_MARK = "yinyou";
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ import com.tencent.mm.opensdk.modelpay.PayReq;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.BuildConfig;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
@@ -320,7 +321,10 @@ public class PaymentActivity extends Activity
|
||||
WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
|
||||
req.userName = wxPayType.getWxminiId(); // 填小程序原始id
|
||||
//拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
|
||||
req.path = "pages/index/index?ticket=" + AuthModel.get().getTicket() + "&chargeProductId=" + chargeProdId + "&uid=" + AuthModel.get().getCurrentUid();
|
||||
req.path = "pages/index/index?ticket=" + AuthModel.get().getTicket() +
|
||||
"&chargeProductId=" + chargeProdId +
|
||||
"&uid=" + AuthModel.get().getCurrentUid() +
|
||||
"&app=" + XChatConstants.APP_MARK;
|
||||
req.miniprogramType = BuildConfig.DEBUG ? WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_TEST : WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版
|
||||
api.sendReq(req);
|
||||
finish();
|
||||
@@ -347,7 +351,7 @@ public class PaymentActivity extends Activity
|
||||
Map<String, String> result = alipay.payV2(alipayInfo.getOrderData(), true);
|
||||
return Single.just(result);
|
||||
} else if ("h5".equals(alipayInfo.getPayType())) {
|
||||
EventBus.getDefault().post(new ShowCommonWebEvent(this,alipayInfo.getOrderData()));
|
||||
EventBus.getDefault().post(new ShowCommonWebEvent(this, alipayInfo.getOrderData()));
|
||||
return Single.error(new Throwable());
|
||||
} else {
|
||||
return Single.error(new Throwable());
|
||||
|
Reference in New Issue
Block a user