HTML5¼¼Êõ

¡¾Ô­´´·ÖÏíÖ§¸¶±¦Ö§¸¶¡¿HBuilder´ò°üAPPµ÷ÓÃÖ§¸¶±¦¿Í»§¶ËÖ§¸¶ - ÄϹ¬Ïô³¾(3)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-01-06 11:00 ÎÒÒªÆÀÂÛ( )

sign= HttpUtility .UrlEncode(sign, Encoding .UTF8); string payInfo=GetOrderInfoWithEncode()+ "sign=" +sign; strJson=payInfo.Replace( "+" , "%20" ); //ÈÕÆÚÄÇÀï»áÓÐÒ»¸ö¿Õ¸ñ(2017-01-0511:11:11)ת»¯Îª+,

                sign = HttpUtility.UrlEncode(sign, Encoding.UTF8);

                string payInfo = GetOrderInfoWithEncode() + "&sign=" + sign;

                strJson = payInfo.Replace("+""%20");//ÈÕÆÚÄÇÀï»áÓÐÒ»¸ö¿Õ¸ñ(2017-01-05 11:11:11)ת»¯Îª+,ËùÒÔÕâÀïÒªÌæ»»Ò»ÏÂ

                FileLog.WriteLog("Ö§¸¶±¦´®:" + strJson);

            }

            catch (Exception ex)

            {

                FileLog.WriteLog(ex.ToString());

 

            }

            return strJson;

        }

        /// <summary>

        /// ²»°üº¬EncodeµÄ×Ö·û´®Æ´½Ó

        /// </summary>

        /// <param name="price"></param>

        /// <returns></returns>

        public string GetOrderInfoWithOutEncode(string price)

        {

            PayInfo.Add("app_id"Config.app_id);

            PayInfo.Add("biz_content", GetBizContent(price));

            PayInfo.Add("charset""utf-8");

            PayInfo.Add("format""json");

            PayInfo.Add("method""alipay.trade.app.pay");

            PayInfo.Add("notify_url""http://wxpay.lmx.ren/ResultNotify");

            PayInfo.Add("sign_type""RSA");

            PayInfo.Add("timestamp"DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

            PayInfo.Add("version""1.0");

            string strUrl = BuildQueryWithOutEncode(PayInfo);

            return strUrl;

        }

        /// <summary>

        /// °üº¬EncodeµÄ×Ö·û´®Æ´½Ó

        /// </summary>

        /// <param name="price"></param>

        /// <returns></returns>

        public string GetOrderInfoWithEncode()

        {

            string strUrl = BuildQuery(PayInfo, "utf-8");

            return strUrl;

        }

        /// <summary>

        /// »ñÈ¡Ö§¸¶ÄÚÈÝÏêÇé

        /// </summary>

        /// <param name="total_amount"></param>

        /// <returns></returns>

        public string GetBizContent(string total_amount)

        {

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • ¡¾¸É»õ·ÖÏí¡¿Í¨Óù¤¾ßÀà - Orson

    ¡¾¸É»õ·ÖÏí¡¿Í¨Óù¤¾ßÀà - Orson

    2016-12-23 13:00

  • ÈçºÎ¿ª·¢Ò»¿î¿°±ÈAPPµÄ΢ÐÅС³ÌÐò£¨ÌÚѶÄÚ²¿ÍŶӷÖÏí£© - ÌÚѶ¹¥³Çʦlee

    ÈçºÎ¿ª·¢Ò»¿î¿°±ÈAPPµÄ΢ÐÅС³ÌÐò£¨ÌÚѶÄÚ²¿ÍŶӷÖÏí£© - ÌÚѶ¹¥³Çʦ

    2016-12-22 17:01

  • ¡¾Ô­´´¡¿ReactʵÀýÈëÃŽ̳Ì(1)»ù´¡API,JSXÓï·¨--hello world - ëÈÞèè

    ¡¾Ô­´´¡¿ReactʵÀýÈëÃŽ̳Ì(1)»ù´¡API,JSXÓï·¨--hello world - ëÈÞ

    2016-11-08 13:00

  • ¡¶WePayUI×é¼þÉè¼ÆµÄÃØÃÜ¡·¡ª¡ª2016ÄêµÚÒ»½ìÇ°¶ËÌåÑé´ó»á·ÖÏí - °×Ê÷

    ¡¶WePayUI×é¼þÉè¼ÆµÄÃØÃÜ¡·¡ª¡ª2016ÄêµÚÒ»½ìÇ°¶ËÌåÑé´ó»á·ÖÏí - °×Ê÷

    2016-09-27 16:00

ÍøÓѵãÆÀ
ã