Beispiel #1
0
        public ActionResult Index(int tid)
        {
            string    orderNo = GenerateOutTradeNo();
            WxPayData wxOrder = new JsApiPay().UnifiedOrder(orderNo, "测试支付", "test", 10, "oIdbxw8WdYPauF_m1qR-tkSJk644");

            if (wxOrder.GetValue("return_code").ToString().ToUpper() == "SUCCESS" &&
                wxOrder.GetValue("result_code").ToString().ToUpper() == "SUCCESS")
            {
                wxOrder = new JsApiPay().GetJsApiParameters(wxOrder.GetValue("prepay_id").ToString());
            }

            return(View(wxOrder));
        }