/// <summary> /// 统计用户的成功充值数据 /// </summary> /// <param name="data"></param> public void PaySucceess(PayInfo payInfo) { if (payInfo.GetPayInfoStr() == null) { Debug.LogError("ReYunSDKHelper PaySucceess() data == null!!!!"); return; } #if UNITY_ANDROID if (Application.platform != RuntimePlatform.Android) { return; } if (_SDKHelperPlugin == null) { Debug.LogError("ReYunSDKHelper PaySucceess() _SDKHelperPlugin == null!!!!"); return; } _SDKHelperPlugin.Call("paySuccess", payInfo.GetReYunPayStartStr()); #elif UNITY_IOS if (Application.platform != RuntimePlatform.IPhonePlayer) { return; } // ReYun_PaySuccess(jsonStr); #else #endif }
public static BigInteger[] getPayAmounts(byte[][] payIds, BigInteger lastPayResolveDeadline) { BasicMethods.assert(BasicMethods._isByte32s(payIds), "payIds invalid"); BasicMethods.assert(lastPayResolveDeadline >= 0, "lastPayResolveDeadline less than zero"); BigInteger[] amounts = new BigInteger[payIds.Length]; BigInteger now = Blockchain.GetHeight(); for (var i = 0; i < payIds.Length; i++) { byte[] payInfoBs = Storage.Get(Storage.CurrentContext, PayInfoPrefix.Concat(payIds[i])); PayInfo payInfo = new PayInfo(); if (payInfoBs.Length > 0) { payInfo = Helper.Deserialize(payInfoBs) as PayInfo; } if (payInfo.resolveDeadline == 0) { BasicMethods.assert(now > lastPayResolveDeadline, "payment is not finalized"); } else { BasicMethods.assert(now > payInfo.resolveDeadline, "payment is not finalized"); } amounts[i] = payInfo.amount; } return(amounts); }
public override void Pay(PayInfo info) { if (listener == null || listener.m_StoreController == null) { OnPayInfo payInfo = new OnPayInfo(); payInfo.isSuccess = false; payInfo.storeName = storeName; payInfo.goodsId = info.goodsID; payInfo.userID = info.userID; if (listener == null) { payInfo.error = "No Initialize"; } else { payInfo.error = "Initialize Failed"; } PayCallBack(payInfo); return; } if (Application.isEditor) { ConfirmPay(info.goodsID, info.tag, storeName.ToString()); } else { listener.PurchaseProduct(info.goodsID); } }
public virtual PayInfo GetPayByID(int ID) { PayInfo entity = null; string SqlList = "SELECT Sys_Pay_ID, Sys_Pay_Name, Sys_Pay_Sign, Sys_Pay_Picture, Sys_Pay_Sort"; SqlList += " FROM Sys_Pay WHERE Sys_Pay_ID = " + ID; SqlDataReader RdrList = null; try { RdrList = DBHelper.ExecuteReader(SqlList); if (RdrList.Read()) { entity = new PayInfo(); entity.Sys_Pay_ID = Tools.NullInt(RdrList["Sys_Pay_ID"]); entity.Sys_Pay_Name = Tools.NullStr(RdrList["Sys_Pay_Name"]); entity.Sys_Pay_Sign = Tools.NullStr(RdrList["Sys_Pay_Sign"]); entity.Sys_Pay_Picture = Tools.NullStr(RdrList["Sys_Pay_Picture"]); entity.Sys_Pay_Sort = Tools.NullInt(RdrList["Sys_Pay_Sort"]); } return(entity); } catch (Exception ex) { throw ex; } finally { RdrList.Close(); RdrList = null; } }
public static void GetSubjectAndBody(PayInfo info, out string subject, out string body) { if (info.BillType == BillType.VIP_BUY) { subject = string.Format("悦动力会员『{0}』充值", info.UserName); body = "会员充值"; } else if (info.BillType == BillType.VIP_USE) { subject = string.Format("悦动力会员『{0}』消费", info.UserName); body = "场地消费"; } else if (info.BillType == BillType.VIP_VENUE_BILL) { subject = string.Format("悦动力场馆『{0}』结算", info.UserName); body = "场馆结算"; } else if (info.BillType == BillType.VIP_REFUND) { subject = string.Format("悦动力会员『{0}』退款", info.UserName); body = "会员退款"; } else { subject = string.Empty; body = string.Empty; } }
/// <summary> /// 判断支付 限制的回调 /// </summary> /// <param name="e"></param> /// <param name="args"></param> private static void OnCheckPayLimitResult(CheckPayLimitResultEvent e, object[] args) { Debug.Log("OnCheckPayLimitResult SDK: " + e.payLimitType); if (e.payLimitType == PayLimitType.None) { PayInfo payInfo = new PayInfo(m_goodsInfo.goodsID, m_goodsInfo.localizedTitle, m_payPlatform.payPlatformTag, FrameWork.SDKManager.GoodsType.NORMAL, "", m_goodsInfo.localizedPrice, m_goodsInfo.isoCurrencyCode, user.userID, m_payPlatform.SDKName); if (Application.platform == RuntimePlatform.Android) { SDKManager.Pay(m_payPlatform.SDKName, payInfo); } else { SDKManager.Pay(payInfo); } } else if (e.payLimitType == PayLimitType.ChildLimit) { //未成年本日消费超出 OnVerificationResultCallBack(new PayResult(-21, m_goodsInfo.goodsID, "今日消费已超出未成年限制")); } else if (e.payLimitType == PayLimitType.NoRealName) { //未实名制,无法支付 OnVerificationResultCallBack(new PayResult(-22, m_goodsInfo.goodsID, "请完成实名制认证后重试")); } else { //错误,不应该会进来 } }
/** * 加载所有会员的方法 * */ private void LoadAllMember() { if(memberInfoDatas != null) for (int i = 0; i < memberInfoDatas.Count; i++) MemberList.Items.RemoveAt(0); memberInfoDatas = MemberInfoConnector.GetMembers(); foreach (MemberInfoData infoData in memberInfoDatas) { /* * 没有给它写专门的控件,把买单的拿来用了 * 对应关系: * DName --会员类型 * DPrice --姓名 * DNumber --余额 * DSum --手机号 * */ MemberTypeData memberTypeData = MemberInfoConnector.GetMemberType(infoData.MtId); ListBoxItem listBoxItem = new ListBoxItem(); PayInfo info = new PayInfo(); info.DName.Text = memberTypeData.MTitle; info.DPrice.Text = infoData.MbName; info.DNumber.Text = infoData.MbMoney.ToString(); info.DSum.Text = infoData.MbPhone; listBoxItem.Content = info; MemberList.Items.Add(listBoxItem); } }
private void DoOneTao(string Pid, PayInfo PayInfo) { OneyuanTaoParticipantInfo info = OneyuanTaoHelp.GetAddParticipant(0, Pid, ""); if (info == null) { base.Response.Write("success"); } else { info.PayTime = new DateTime?(DateTime.Now); info.PayWay = "weixin"; info.PayNum = Pid; info.Remark = "订单已支付:支付金额为¥" + PayInfo.TotalFee.ToString(); if (!info.IsPay && OneyuanTaoHelp.SetPayinfo(info)) { OneyuanTaoHelp.SetOneyuanTaoFinishedNum(info.ActivityId, 0); } else { Globals.Debuglog(JsonConvert.SerializeObject(PayInfo), "_Debuglog.txt"); } base.Response.Write("success"); } }
void onPay() { PayInfo payInfo = new PayInfo(); payInfo.PropID = "0001"; payInfo.PriceInCurrency = 100; payInfo.PropName = "10个钻石(1元)"; GSDK.Instance.StartPayAsync(payInfo, (payResult) => { if (payResult.Status == EPayResultStatus.Succeed) { // 支付成功后,可以向服务器验证此订单(也可以直接发货) // 建议此处将订单存入本地文件,若游戏闪退,可用验证接口自动补单 GSDK.Instance.StartCheckOrderAsync(payResult.OrderIDStr, checkOrderResult =>{ if (checkOrderResult.Status == GSDKUnityLib.Pay.CheckOrder.ECheckOrderResultStatus.Paid) Debug.Log("验证成功,发货: " + payInfo.PropID); else Debug.LogWarning(string.Format("验证失败 {0} {1}", checkOrderResult.Status, (int)checkOrderResult.Status)); }); } else if (payResult.Status == EPayResultStatus.Cancelled) { Debug.Log("玩家放弃支付了"); } else { Debug.Log(string.Format("支付失败 {0} {1} {2}", payResult.Status, payResult.InfoStr, payResult.InternalErrorStr)); } }); }
/** * 删除会员: * 判断是否选中,没有选中直接返回 * 对选中的值进行提取,删除数据库中的数据 * */ private void DeleteButton_Click(object sender, RoutedEventArgs e) { if(MemberList.SelectedIndex == -1) { MessageBox.Show("请先选中会员信息!"); return; } ListBoxItem listBoxItem = (ListBoxItem)MemberList.SelectedItem; PayInfo payInfo = (PayInfo)listBoxItem.Content; /*MemberTypes.SelectedIndex = MemberInfoConnector.GetMemberType(payInfo.DName.Text).MtId - 1; MemberName.Text = payInfo.DPrice.Text; MemberMoney.Text = payInfo.DNumber.Text; MemberPhone.Text = payInfo.DSum.Text;*/ int IsDeleted = MemberInfoConnector.DeleteMember(payInfo.DPrice.Text, payInfo.DSum.Text); if(IsDeleted != 1) { MessageBox.Show("删除失败"); return; } else { MessageBox.Show("删除成功"); MemberList.SelectedIndex = -1; MemberName.Text = ""; MemberPhone.Text = ""; MemberMoney.Text = ""; MemberTypes.SelectedIndex = 0; LoadAllMember(); } }
/// <summary> /// 请添加支付成功后的处理 /// </summary> private void DoSuccessProcess(AlipayF2FPayResult payResult) { //请添加支付成功后的处理 //System.Console.WriteLine("支付成功"); //result = payResult.response.Body; MessageBox.Show("支付成功!"); PayInfo obj = new PayInfo(); obj.Id = Guid.NewGuid().ToString(); obj.CreateTime = DateTime.Now; obj.UpdateTime = DateTime.Now; obj.PayAmount = WIDtotal_fee.Text.Trim(); obj.orderId = this.OrderNumber; obj.salesmanId = LoginUserInfo.id; obj.payDate = DateTime.Now; obj.PayMode = BranchPay.ZFBPay; //obj.MemberId = memberCardId; obj.BranchId = LoginUserInfo.branchId; //BranchPayInfoService service = new BranchPayInfoService(); //service.AddPayInfo(obj); ////上传支付信息 //PayInfoService masterPayInfoService = new PayInfoService(); //masterPayInfoService.AddPayInfo(obj); this.payForm.AddPayInfo(obj); payForm.AddPaidAmount(obj.PayAmount); this.Close(); }
/// <summary> /// 获取预交易二维码 /// </summary> /// <param name="info"></param> public string GetPayQrCode(PayInfo info) { IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", Com.Alipay.Config.APP_ID, Com.Alipay.Config.Private_key); AlipayAcquirePrecreateRequest request = new AlipayAcquirePrecreateRequest(); request.SellerId = info.AlipayId; request.SetNotifyUrl("https://www.gotopsports.com/service/NotifyAlipay.aspx"); request.OutTradeNo = info.BillId; string subject; string body; PayHelper.GetSubjectAndBody(info, out subject, out body); request.Subject = subject; request.Body = body; request.TotalFee = info.PayAmount.ToString(); request.ItBPay = "1d"; var response = client.Execute <AlipayAcquirePrecreateResponse>(request); //调用成功,则处理业务逻辑 if (response.IsSuccess == "T") { return(response.QrCode); } return(null); }
/// <summary> /// 获得预支付订单 /// </summary> /// <param name="e"></param> /// <param name="args"></param> private void OnPrePay(PrePay2Client e, object[] args) { if (e.storeName != StoreName.VIVO) { return; } Debug.LogWarning("OnPrePay=========:" + e.prepay_id + "=partnerId=="); OnPayInfo onPayInfo = new OnPayInfo(); onPayInfo.isSuccess = true; onPayInfo.goodsId = e.goodsID; onPayInfo.storeName = StoreName.VIVO; onPayInfo.receipt = e.mch_orderID; onPayInfo.price = price; PayReSend.Instance.AddPrePayID(onPayInfo); //IndentListener(e.goodsID,e.mch_orderID, e.prepay_id, onPayInfo.price); PayInfo payInfo = new PayInfo(e.goodsID, GetGoodsInfo(e.goodsID).localizedTitle, "", FrameWork.SDKManager.GoodsType.NORMAL, e.mch_orderID, price, GetGoodsInfo(goodsID).isoCurrencyCode, GetUserID(), e.storeName.ToString()); payInfo.prepay_id = e.prepay_id; SDKManagerNew.Pay(payInfo); }
/// <summary> /// 统计用户开始充值数据 /// </summary> /// <param name="data"></param> public void StartPay(PayInfo payInfo) { if (payInfo == null) { Debug.LogError("ReYunSDKHelper StartPay() data == null!!!!"); return; } // string jsonStr = MiNiJSON.Json.Serialize(data); #if UNITY_ANDROID if (Application.platform != RuntimePlatform.Android) { return; } if (_SDKHelperPlugin == null) { Debug.LogError("ReYunSDKHelper StartPay() _SDKHelperPlugin == null!!!!"); return; } _SDKHelperPlugin.Call("startPay", payInfo.GetReYunPayStartStr()); #elif UNITY_IOS if (Application.platform != RuntimePlatform.IPhonePlayer) { return; } // ReYun_StartPay(jsonStr); #else #endif }
public PayNotify GetPayNotify(string xml) { DataTable dt = this.ErrorTable("Notify"); DataRow row = dt.NewRow(); row["OperTime"] = DateTime.Now; try { if (string.IsNullOrEmpty(xml)) { row["Error"] = "InStream Null"; row["Param"] = "null"; dt.Rows.Add(row); this.WriteLog(dt); return(null); } PayNotify notifyObject = Utils.GetNotifyObject <PayNotify>(xml); WxPayData data = new WxPayData(); try { data.FromXml(xml, this._payAccount.PartnerKey); } catch (WxPayException exception) { Utils.WxPaylog("支付出错了:" + exception.Message, "_WxPaylog.txt"); } SortedDictionary <string, object> values = data.GetValues(); if (((((notifyObject == null) || (values == null)) || (values.Keys.Count == 0)) || (values.ContainsKey("return_code") && (values["return_code"].ToString() == "FAIL"))) || (values.ContainsKey("result_code") && (values["result_code"].ToString() == "FAIL"))) { Utils.WxPaylog(xml, "_WxPaylog.txt"); return(null); } PayInfo info = new PayInfo { SignType = "MD5", Sign = notifyObject.sign, TradeMode = 0, BankType = notifyObject.bank_type, BankBillNo = "", TotalFee = notifyObject.total_fee / 100M, FeeType = (notifyObject.fee_type == "CNY") ? 1 : 0, NotifyId = "", TransactionId = notifyObject.transaction_id, OutTradeNo = notifyObject.out_trade_no, TransportFee = 0M, ProductFee = 0M, Discount = 1M, BuyerAlias = "" }; notifyObject.PayInfo = info; return(notifyObject); } catch (Exception exception2) { row["Error"] = exception2.Message; row["Param"] = xml; dt.Rows.Add(row); this.WriteLog(dt); return(null); } }
public bool Pay(string quantity, string productId = "") { if (!ApolloConfig.payEnabled) { return(false); } if (!this.InitPay()) { return(false); } ApolloAccountInfo accountInfo = this.GetAccountInfo(false); PayInfo payInfo = new PayInfo(); string str = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString(); payInfo.coinIcon = 0x7f020001; payInfo.offerId = ApolloConfig.offerID; payInfo.unit = "ge"; payInfo.zoneId = str; payInfo.valueChangeable = 0; payInfo.saveValue = quantity; if (!this.payService.Pay(payInfo)) { Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Failed); return(false); } return(true); }
public ActionResult Pay(PayInfo payInfo) { var context = new AppContext() { UserId = new Guid("0D321367-C97F-46B0-81B7-4EDC5D7A2829"), UserName = "******" }; var bs = new ZzBS(context); var wx = new WXBS(context); var s = this.Request.InputStream; var count = 0; var buffer = new byte[1024]; var builder = new StringBuilder(); while ((count = s.Read(buffer, 0, 1024)) > 0) { builder.Append(Encoding.UTF8.GetString(buffer, 0, count)); } s.Flush(); s.Close(); s.Dispose(); var xml = builder.ToString(); payInfo = Utility.Deserialize <PayInfo>(xml); var result = wx.ConfirmPayment(payInfo); bs.ConfirmPayment(payInfo); return(Content(result ? "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>" : "<xml><return_code><![CDATA[FAILED]]></return_code><return_msg><![CDATA[ERROR]]></return_msg></xml>")); }
private string ConvertPayInfoToString(PayInfo payInfo) { var stringBuilder = new StringBuilder(); /*Сразу извиняюсь за подобное, с xml не работал, у нас все в JSON, что успел нахватать за 2 часа, то использовал) палкаи не бить) */ if (payInfo.Key != null) { stringBuilder.Append($"Key={payInfo.Key};"); } if (payInfo.Amount != null) { stringBuilder.Append($"Amount={payInfo.Amount};"); } if (payInfo.CardHolder != null) { stringBuilder.Append($"CardHolder={payInfo.CardHolder};"); } if (payInfo.OrderId != null) { stringBuilder.Append($"OrderId={payInfo.OrderId};"); } if (payInfo.PAN != null) { stringBuilder.Append($"PAN={payInfo.PAN};"); } stringBuilder.Append($"SecureCode={payInfo.SecureCode};EYear={payInfo.EYear};EMonth={payInfo.EMonth};CardHolder={payInfo.CardHolder};"); return(stringBuilder.ToString()); }
public PayResult Pay(PayInfo info) { string payurl = Pay(new PayRequest() { Amount = info.Amount, Ext = info.Attach, Name = info.Name, OrderNo = info.OrderNo, ReturnUrl = info.ReturnUrl }); var result = new PayResult(); if (!string.IsNullOrEmpty(payurl)) { result.ResultType = PayResultType.Url; result.ResultData = payurl; result.Status = ResultStatus.Succ; } else { result.Status = ResultStatus.Fail; } return(result); }
public override void Pay(PayInfo l_payInfo) { StartLongTimeNoResponse(); Debug.Log("DefaultIAPImplement.Pay :" + l_payInfo.goodsID); SDKManagerNew.Pay(StoreName.m4399.ToString(), l_payInfo); }
void onPay() { PayInfo payInfo = new PayInfo(); payInfo.PropID = "0001"; payInfo.PriceInCurrency = 100; payInfo.PropName = "10个钻石(1元)"; GSDK.Instance.StartPayAsync(payInfo, (payResult) => { if (payResult.Status == EPayResultStatus.Succeed) { // 支付成功后,可以向服务器验证此订单(也可以直接发货) // 建议此处将订单存入本地文件,若游戏闪退,可用验证接口自动补单 GSDK.Instance.StartCheckOrderAsync(payResult.OrderIDStr, checkOrderResult => { if (checkOrderResult.Status == GSDKUnityLib.Pay.CheckOrder.ECheckOrderResultStatus.Paid) { Debug.Log("验证成功,发货: " + payInfo.PropID); } else { Debug.LogWarning(string.Format("验证失败 {0} {1}", checkOrderResult.Status, (int)checkOrderResult.Status)); } }); } else if (payResult.Status == EPayResultStatus.Cancelled) { Debug.Log("玩家放弃支付了"); } else { Debug.Log(string.Format("支付失败 {0} {1} {2}", payResult.Status, payResult.InfoStr, payResult.InternalErrorStr)); } }); }
public PayResult Pay(PayInfo info) { var dict = new Dictionary <string, string>(); dict["pay_memberid"] = this.appid; dict["pay_orderid"] = info.OrderNo; dict["pay_amount"] = ((decimal)(info.Amount) * 0.01m).ToString("F2"); dict["pay_applydate"] = DateTime.Now.ToString(); dict["pay_bankcode"] = "Wxzf"; dict["pay_notifyurl"] = this.notifyUrl; dict["pay_callbackurl"] = info.ReturnUrl; dict["tongdao"] = this.tongdao; dict["pay_md5sign"] = GetSign(dict); var sb = new StringBuilder(); sb.Append(@"<!doctype html>\r\n"); sb.Append(@"<html>"); sb.Append(@"<head>"); sb.Append(@" <meta charset=""utf8"">"); sb.Append(@" <title>正在转到付款页</title>"); sb.Append(@"</head>"); sb.Append(@"<body onLoad=""document.pay.submit()"">"); sb.Append(@" <form name=""pay"" action=""http://www.linkillybb.cn/pay_Index.html"" method=""post"">"); foreach (var item in dict) { sb.Append(@" <input type=""hidden"" name=""" + item.Key + @""" value=""" + item.Value + @""">"); } sb.Append(@" </form>"); sb.Append(@"</body>"); sb.Append(@"</html>"); string payContent = sb.ToString(); var result = new PayResult(); if (!string.IsNullOrEmpty(payContent)) { result.ResultType = PayResultType.Html; result.ResultData = payContent; result.Status = ResultStatus.Succ; } else { result.Status = ResultStatus.Fail; } return(result); }
IEnumerator OnServerSign(PayInfo payInfo) { // 添加委托方法 AliPayEvent += AliPayLog; WWWForm form = new WWWForm(); form.AddField("body", payInfo.body); form.AddField("subject", payInfo.subject); form.AddField("out_trade_no", payInfo.out_trade_no); form.AddField("timeout_express", "30m"); form.AddField("total_amount", payInfo.total_amount); string url = "http://122.112.233.193:9090"; //在开发平台绑定服务端接口 WWW www = new WWW(url, form); yield return(www); if (!string.IsNullOrEmpty(www.error)) { Debug.Log(www.error); } Debug.Log(www.text); //服务器返回加签后的订单 string orderInfo = www.text; HookBridge.doAPPay(orderInfo); }
public void OnClickPay(string pay) { if (pay == null) { return; } ////string url = "http://192.168.11.14/api/wxpay/createOrder"; ////WWWForm form = new WWWForm(); ////form.AddField("id", "2"); ////form.AddField("study_coin", "0"); ////form.AddField("platform", "1"); if (pay.Equals("wechat")) { // HttpRequestUtils.Instance().HttpPost(url,form, PayBack); //微信支付包名需要与微信后台保持一致 PayAndroid.Instance.StartPay(PayAndroid.WECHAT, payJson, PayCallBack); } else { PayInfo info = new PayInfo(); info.code = 0; info.message = "支付"; info.data = payJsonAli; PayAndroid.Instance.StartPay(PayAndroid.ALI, JsonUtility.ToJson(info), PayCallBack); } }
/// <summary> /// 计算商家订单的付款详情 /// </summary> /// <param name="payInfo">订单的付款信息</param> /// <param name="storeOrderTotal">商家订单总额</param> private PayDetailInfo CalculateStoreOrderPayDetail(PayInfo payInfo, decimal storeOrderTotal, decimal storeTotal) { //计算分配到商家订单的购物券金额 var shopCash = Math.Round((storeOrderTotal / payInfo.Total) * payInfo.ShopCash, 2); return(new PayDetailInfo(storeOrderTotal, storeTotal, shopCash)); }
public ActionResult DeleteConfirmed(int id) { PayInfo payInfo = db.PayInfoes.Find(id); db.PayInfoes.Remove(payInfo); db.SaveChanges(); return(RedirectToAction("Index")); }
public PayInfoDb(PayInfo payInfo, int userId) { UserId = userId; CardId = payInfo.CardId; Sum = payInfo.Sum; Description = payInfo.Description; Id = payInfo.Id; }
public void Complete(PayInfo payInfo) { if (_state != PaymentState.Initiated) { throw new Exception("付款状态不正确"); } ApplyEvent(new PaymentCompletedEvent(_orderId, payInfo)); }
/// <summary> /// 消息1 的监听, 获得订单信息,然后调支付sdk /// </summary> private void IndentListener(string goodID, string mch_orderID, string prepay_id, float price) { this.mch_orderID = mch_orderID; PayInfo payInfo = new PayInfo(goodID, GetGoodsInfo(goodID).localizedTitle, prepay_id, FrameWork.SDKManager.GoodsType.NORMAL, mch_orderID, price, GetGoodsInfo(goodsID).isoCurrencyCode, GetUserID()); SDKManagerNew.Pay(StoreName.VIVO.ToString(), payInfo); }
/// <summary> /// 统一支付入口 /// </summary> /// <param name="goodsID"></param> /// <param name="tag"></param> /// <param name="goodsType"></param> /// <param name="orderID"></param> public override void Pay(PayInfo payInfo) { this.goodsID = payInfo.goodsID; price = payInfo.price; Debug.LogWarning("send vivopay----message-----" + goodsID); //给服务器发消息1 PrePay2Service.SendPrePayMsg(StoreName.VIVO, goodsID); }
private void Handle(StoreOrderDeletedEvent evnt) { _expressAddressInfo = null; _payInfo = null; _payDetailInfo = null; _orderGoodses = null; _info = null; }
private string DoReplaceCode(string code, Person p, PayInfo pi, EmailQueueTo emailqueueto) { switch (code.ToLower()) { case "{address}": return p.PrimaryAddress; case "{address2}": if (p.PrimaryAddress2.HasValue()) return "<br>" + p.PrimaryAddress2; return ""; case "{amtdue}": if (pi != null) return (pi.Amount - pi.AmountPaid).ToString2("c"); break; case "{barcode}": return string.Format("<img src='{0}' />", Util.URLCombine(db.CmsHost, "/Track/Barcode/" + emailqueueto.PeopleId)); case "{campus}": return p.CampusId != null ? p.Campu.Description : "No Campus Specified"; case "{cellphone}": return p.CellPhone.HasValue() ? p.CellPhone.FmtFone() : "no cellphone on record"; case "{city}": return p.PrimaryCity; case "{csz}": return Util.FormatCSZ(p.PrimaryCity, p.PrimaryState, p.PrimaryZip); case "{country}": return p.PrimaryCountry; case "{createaccount}": return CreateUserTag(emailqueueto); case "{cmshost}": return db.CmsHost.TrimEnd('/'); case "{emailhref}": return Util.URLCombine(db.CmsHost, "/EmailView/" + emailqueueto.Id); case "{first}": return p.PreferredName.Contains("?") || p.PreferredName.Contains("unknown", true) ? "" : p.PreferredName; case "{fromemail}": return from.Address; case "{last}": return p.LastName; case "{name}": return p.Name.Contains("?") || p.Name.Contains("unknown", true) ? "" : p.Name; case "{nextmeetingtime}": return NextMeetingDate(code, emailqueueto); case "{occupation}": return p.OccupationOther; case "{orgname}": return db.Organizations.Where(oo => oo.OrganizationId == db.CurrentOrgId) .Select(oo => oo.OrganizationName).SingleOrDefault(); case "{paylink}": if (pi != null && pi.PayLink.HasValue()) return "<a href=\"{0}\">payment link</a>".Fmt(pi.PayLink); break; case "{peopleid}": return p.PeopleId.ToString(); case "{saluation}": return db.GoerSupporters.Where(ee => ee.Id == emailqueueto.GoerSupportId).Select(ee => ee.Salutation).SingleOrDefault(); case "{state}": return p.PrimaryState; case "{toemail}": if (ListAddresses.Count > 0) return ListAddresses[0].Address; break; case "{today}": return DateTime.Today.ToShortDateString(); case "{track}": return emailqueueto.Guid.HasValue ? "<img src=\"{0}\" />".Fmt(Util.URLCombine(db.CmsHost, "/Track/Key/" + emailqueueto.Guid.Value.GuidToQuerystring())) : ""; case "{unsubscribe}": return UnSubscribeLink(emailqueueto); default: if (code.StartsWith("{addsmallgroup:", StringComparison.OrdinalIgnoreCase)) return AddSmallGroup(code, emailqueueto); if (code.StartsWith("{extra", StringComparison.OrdinalIgnoreCase)) return ExtraValue(code, emailqueueto); if (registerLinkRe.IsMatch(code)) return RegisterLink(code, emailqueueto); if (registerTagRe.IsMatch(code)) return RegisterTag(code, emailqueueto); if (rsvpLinkRe.IsMatch(code)) return RsvpLink(code, emailqueueto); if (sendLinkRe.IsMatch(code)) return SendLink(code, emailqueueto); if(code.StartsWith("{orgextra:", StringComparison.OrdinalIgnoreCase)) return OrgExtra(code, emailqueueto); if (code.StartsWith("{smallgroup:", StringComparison.OrdinalIgnoreCase)) return SmallGroup(code, emailqueueto); if (code.StartsWith("{smallgroups", StringComparison.OrdinalIgnoreCase)) return SmallGroups(code, emailqueueto); ; if (supportLinkRe.IsMatch(code)) return SupportLink(code, emailqueueto); if (volReqLinkRe.IsMatch(code)) return VolReqLink(code, emailqueueto); if (volSubLinkRe.IsMatch(code)) return VolSubLink(code, emailqueueto); if (voteLinkRe.IsMatch(code)) return VoteLink(code, emailqueueto); break; } return code; }
private string DoReplaceCode(string code, Person p, PayInfo pi = null, EmailQueueTo emailqueueto = null) { if (code.StartsWith("<style")) return code; switch (code.ToLower()) { case "{address}": return p.PrimaryAddress; case "{address2}": if (p.PrimaryAddress2.HasValue()) return "<br>" + p.PrimaryAddress2; return ""; case "{amtdue}": if (pi != null) return pi.AmountDue.ToString2("c"); break; case "{amtpaid}": if (pi != null) return pi.AmountPaid.ToString2("c"); break; case "{amount}": if (pi != null) return pi.Amount.ToString2("c"); break; case "{barcode}": return $"<img src='{db.ServerLink("/Track/Barcode/" + p.PeopleId)}' />"; case "{campus}": return p.CampusId != null ? p.Campu.Description : "No Campus Specified"; case "{cellphone}": return p.CellPhone.HasValue() ? p.CellPhone.FmtFone() : "no cellphone on record"; case "{city}": return p.PrimaryCity; case "{csz}": return Util.FormatCSZ(p.PrimaryCity, p.PrimaryState, p.PrimaryZip); case "{country}": return p.PrimaryCountry; case "{createaccount}": if (emailqueueto != null) return CreateUserTag(emailqueueto); break; case "{church}": return db.Setting("NameOfChurch", "Set this in NameOfChurch setting"); case "{cmshost}": return db.ServerLink(); case "{dob}": return p.DOB; case "{emailhref}": if (emailqueueto != null) return db.ServerLink("/EmailView/" + emailqueueto.Id); break; case "{first}": return p.PreferredName.Contains("?") || p.PreferredName.Contains("unknown", true) ? "" : p.PreferredName; case "{fromemail}": return from.Address; case "{homephone}": return p.HomePhone.HasValue() ? p.HomePhone.FmtFone() : "no homephone on record"; case "{last}": return p.LastName; case "{name}": return p.Name.Contains("?") || p.Name.Contains("unknown", true) ? "" : p.Name; case "{nextmeetingtime}": if (emailqueueto != null) return NextMeetingDate(code, emailqueueto); break; case "{nextmeetingtime0}": if (emailqueueto != null) return NextMeetingDate0(code, emailqueueto); break; case "{occupation}": return p.OccupationOther; case "{orgname}": case "{org}": return GetOrgInfo(emailqueueto).Name; case "{orgmembercount}": return GetOrgInfo(emailqueueto).Count; case "{paylink}": if (pi != null && pi.PayLink.HasValue()) return $"<a href=\"{pi.PayLink}\">Click this link to make a payment and view your balance.</a>"; break; case "{peopleid}": return p.PeopleId.ToString(); case "{salutation}": if (emailqueueto != null) return db.GoerSupporters.Where(ee => ee.Id == emailqueueto.GoerSupportId).Select(ee => ee.Salutation).SingleOrDefault(); break; case "{state}": return p.PrimaryState; case "{email}": case "{toemail}": if (ListAddresses.Count > 0) return ListAddresses[0].Address; break; case "{today}": return DateTime.Today.ToShortDateString(); case "{title}": if (p.TitleCode.HasValue()) return p.TitleCode; return p.ComputeTitle(); case "{track}": if (emailqueueto != null) return emailqueueto.Guid.HasValue ? $"<img src=\"{db.ServerLink("/Track/Key/" + emailqueueto.Guid.Value.GuidToQuerystring())}\" />" : ""; break; case "{unsubscribe}": if (emailqueueto != null) return UnSubscribeLink(emailqueueto); break; default: if (emailqueueto == null) emailqueueto = new EmailQueueTo() { PeopleId = p.PeopleId, OrgId = db.CurrentOrgId0 }; if (code.StartsWith("{addsmallgroup:", StringComparison.OrdinalIgnoreCase)) return AddSmallGroup(code, emailqueueto); if (code.StartsWith("{extra", StringComparison.OrdinalIgnoreCase)) return ExtraValue(code, emailqueueto); if (registerLinkRe.IsMatch(code)) return RegisterLink(code, emailqueueto); if (registerHrefRe.IsMatch(code)) return RegisterLinkHref(code, emailqueueto); if (registerTagRe.IsMatch(code)) return RegisterTag(code, emailqueueto); if (rsvpLinkRe.IsMatch(code)) return RsvpLink(code, emailqueueto); if (sendLinkRe.IsMatch(code)) return SendLink(code, emailqueueto); if (code.StartsWith("{orgextra:", StringComparison.OrdinalIgnoreCase)) return OrgExtra(code, emailqueueto); if (code.StartsWith("{orgmember:", StringComparison.OrdinalIgnoreCase)) return OrgMember(code, emailqueueto); if (code.StartsWith("{orgbarcode")) return OrgBarcode(code, emailqueueto); if (code.StartsWith("{smallgroup:", StringComparison.OrdinalIgnoreCase)) return SmallGroup(code, emailqueueto); if (regTextRe.IsMatch(code)) return RegText(code, emailqueueto); if (code.StartsWith("{smallgroups", StringComparison.OrdinalIgnoreCase)) return SmallGroups(code, emailqueueto); if (supportLinkRe.IsMatch(code)) return SupportLink(code, emailqueueto); if (masterLinkRe.IsMatch(code)) return MasterLink(code, emailqueueto); if (volReqLinkRe.IsMatch(code)) return VolReqLink(code, emailqueueto); if (volSubLinkRe.IsMatch(code)) return VolSubLink(code, emailqueueto); if (voteLinkRe.IsMatch(code)) return VoteLink(code, emailqueueto); break; } return code; }