public bool PayByWeiXinOrder(string partnerID, string prepayID, string nonceStr, string timestamp, string sign) { TheOriginalAccountDelegate.WeixinPrepayOrderInfo weixinPrepayOrderInfo = (base._accountDelegate as TheOriginalAccountDelegate).weixinPrepayOrderInfo; weixinPrepayOrderInfo.partnerID = partnerID; weixinPrepayOrderInfo.prepayID = prepayID; weixinPrepayOrderInfo.partnerID = partnerID; weixinPrepayOrderInfo.nonceStr = nonceStr; weixinPrepayOrderInfo.timestamp = timestamp; weixinPrepayOrderInfo.sign = sign; base._accountDelegate.pay(weixinPrepayOrderInfo.productID, weixinPrepayOrderInfo.productName, weixinPrepayOrderInfo.productPrice, string.Empty, Singleton <PlayerModule> .Instance.playerData.userId.ToString(), Singleton <NetworkManager> .Instance.DispatchSeverData.oaServerUrl + "/callback/weixin", string.Empty, string.Empty, null); return(true); }
public override bool Pay(string productID, string productName, float productPrice) { if (!base.Pay(productID, productName, productPrice)) { return(false); } switch (Singleton <AccountManager> .Instance.accountConfig.paymentBranch) { case ConfigAccount.PaymentBranch.APPSTORE_CN: base._accountDelegate.pay(productID, productName, productPrice, Guid.NewGuid().ToString("N"), Singleton <PlayerModule> .Instance.playerData.userId.ToString(), string.Empty, string.Empty, string.Empty, null); break; case ConfigAccount.PaymentBranch.ORIGINAL_ANDROID_PAY: switch (Singleton <ChannelPayModule> .Instance.GetPayMethodId()) { case ChannelPayModule.PayMethod.ALIPAY: base._accountDelegate.pay(productID, productName, productPrice, Guid.NewGuid().ToString("N"), Singleton <PlayerModule> .Instance.playerData.userId.ToString(), Singleton <NetworkManager> .Instance.DispatchSeverData.oaServerUrl + "/callback/alipay", string.Empty, string.Empty, null); break; case ChannelPayModule.PayMethod.WEIXIN_PAY: { TheOriginalAccountDelegate.WeixinPrepayOrderInfo info = new TheOriginalAccountDelegate.WeixinPrepayOrderInfo { productID = productID, productName = productName, productPrice = productPrice }; (base._accountDelegate as TheOriginalAccountDelegate).weixinPrepayOrderInfo = info; Singleton <NetworkManager> .Instance.RequestCreateWeiXinOrder(productID, productName, productPrice); break; } } break; } return(true); }