public object Pay(PayBuyerScanDynaRequest reqModel) { //(对应融合支付:主扫支付动态) var result = QctPayReturn.Fail(msg: "参数格式错误"); OrderBuilder <PayBuyerScanDynaRequest, PayBuyerScanDynaResponse> buyerOrder = new OrderBuilderForBuyerScanDyna(); result = buyerOrder.Build(reqModel); return(buyerOrder.Result(result)); }
public object SubmitQROrder(PayBuyerScanStaticRequest reqModel) { var errMsg = PayTradeHelper.TryValidateObject(reqModel); if (string.IsNullOrWhiteSpace(errMsg)) { //取得商户当前系统时间 var orderDate = DateTime.Now; //商户订单号 String orderId = OrderHelper.GetMaxOutOrderNo(); //商户订单日期 var reqObj = new PayBuyerScanDynaRequest(); reqObj.Mch_Id = reqModel.Mch_Id; reqObj.Store_Id = reqModel.Store_Id; reqObj.Device_Id = ""; reqObj.Method = PayConst.QCTTRADE_PAY_QRORDER; reqObj.Charset = PayConst.DEF_CHARSET; reqObj.Sign_Type = PayConst.DEF_SIGNTYPE; reqObj.Version = PayConst.DEF_VERSION; reqObj.Out_Trade_No = orderId; reqObj.Create_Date = orderDate; reqObj.Total_Amount = reqModel.Total_Amount; reqObj.Pay_Notify_Url = ""; reqObj.Buyer_Mobile = ""; reqObj.Goods_Name = "购物消费"; reqObj.Goods_Desc = reqModel.Goods_Desc; reqObj.Sign = "nosignrequest"; OrderBuilder <PayBuyerScanDynaRequest, PayBuyerScanDynaResponse> buyerOrder = new OrderBuilderForBuyerScanDyna(); var result = buyerOrder.Build(reqObj); if (!result.Successed) { return(View("PayError")); } else { Response.Redirect(buyerOrder.RspModel.Pay_Token); return(View()); //return Json(buyerOrder.RspModel.Pay_Token); } } else { return(View("PayError", QctPayReturn.Fail(msg: errMsg))); } }