Ö§¸¶±¦Payto½Ó¿ÚµÄ c#.netʵÏÖ_C/C++ÓïÑÔ_ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤»ùµØ--Powered by WWW.RONGSEN.COM.CN

Ö§¸¶±¦Payto½Ó¿ÚµÄ c#.netʵÏÖ

×÷ÕߣººÚ¿Í·ÀÏßÍø°²C/C++½Ì³Ì»ùµØ À´Ô´£ººÚ¿Í·ÀÏßÍø°²C/C++½Ì³Ì»ùµØ ä¯ÀÀ´ÎÊý£º0

±¾Æª¹Ø¼ü´Ê£ºÊµÏÖ½Ó¿ÚÖ§¸¶ 
ºÚ¿Í·ÀÏßÍø°²ÍøѶ£º¡¡¡¡ËüÏÖÔÚÕâÖÖÖ§¸¶·½Ê½±È½Ï¶àÏóÍøÒøÔÚÏßµÈʹÓõķ½·¨¶¼ÊÇurlÑéÖ¤£¬¾ÍÊÇͨ¹ýurl²ÎÊýºÍÒ»¸öÕâЩurl²ÎÊýµÄmd5±àÂëÀ´È·ÈÏÕâ¸öÁ¬½ÓµÄÕýÈ·ÐÔ£¬Ö§¸¶±¦ÔÚÄ㹺Âò³É¹¦ºóÌøת×Ô¶¨ÒåÁ¬½ÓµÄʱºò»á´«2´Î¹ý...
¡¡¡¡ËüÏÖÔÚÕâÖÖÖ§¸¶·½Ê½±È½Ï¶àÏóÍøÒøÔÚÏßµÈʹÓõķ½·¨¶¼ÊÇurlÑéÖ¤£¬¾ÍÊÇͨ¹ýurl²ÎÊýºÍÒ»¸öÕâЩurl²ÎÊýµÄmd5±àÂëÀ´È·ÈÏÕâ¸öÁ¬½ÓµÄÕýÈ·ÐÔ£¬Ö§¸¶±¦ÔÚÄ㹺Âò³É¹¦ºóÌøת×Ô¶¨ÒåÁ¬½ÓµÄʱºò»á´«2´Î¹ýÀ´£¬µÚÒ»´ÎÊÇÊý¾Ýµ×²ãÇëÇ󣬵ڶþ´ÎÊÇwebÇëÇ󣬶øÖ»ÓеÚÒ»´ÎÓÐÑéÖ¤Â룬Õâ¸öÖ»ÄÜͨ¹ý¼Ç¼ÏÂÀ´²Å¿´µÄµ½£¬ÒòΪÁ½´ÎÇëÇó¼ä¸ôºÜС£¬Èç¹û¹âÏÔʾµÄ»°×îºóµÄ½á¹ûÊDZ»µÚ¶þ´Î¸²¸ÇÁ˵ġ£ËùÒÔÔÚ½ÓÊÕµÄʱºò¾ÍÒªÉ趨½ÓÊÕÌõ¼þ£¬Ò»ÖÖÊÇûÓÐnotify_type²ÎÊýµÄ£¬Ò»ÖÖÊÇÓеġ£
¡¡¡¡ÎÒÃÇÏÈÀ´¿´Ò»Ï´´½¨Ò»¸öÁ¬½ÓµØÖ·
¡¡¡¡t1=ConfigurationSettings.AppSettings["interface"];//Ö§¸¶½Ó¿Ú£¬¾ÍÊǸøµÄÒ»¸öÁ¬½ÓµØÖ·
¡¡¡¡t2=ConfigurationSettings.AppSettings["account"];//Ö§¸¶±¦ÕÊ»§ÄãµÄÕÊ»§
¡¡¡¡t3=ConfigurationSettings.AppSettings["password"];//°²È«Ð£ÑéÂ룬ÉèÖõÄÉ̼ÒÑéÖ¤Âë
¡¡¡¡t4="images/logo_zfbsmall.gif";//°´Å¥Í¼Æ¬µØÖ·
¡¡¡¡t5="test";//Ðüͣ˵Ã÷
¡¡¡¡cmd="0001";//ĬÈÏ
¡¡¡¡subject="item";//ÉÌÆ·Ãû³Æ
¡¡¡¡body="decrip";//ÃèÊö
¡¡¡¡order_no=;//¶¨µ¥ºÅ£¬Óû§×Ô¼ºÉú³É£¬·½±ã×Ô¼º¹ÜÀí                prices=100;//¼Û¸ñ0.01¡«50000.00
¡¡¡¡rurl="http://www.xxx.com/";//ÉÌƷչʾÍøÖ·
¡¡¡¡types="1";//1£ºÉÌÆ·¹ºÂò2£º·þÎñ¹ºÂò3£ºÍøÂçÅÄÂô4£º¾èÔù
¡¡¡¡number="1";//¹ºÂòÊýÁ¿
¡¡¡¡transport="3";//1£ºÆ½ÓÊ2£º¿ìµÝ3£ºÐéÄâÎïÆ·
¡¡¡¡ordinary_fee="";//ƽÓÊÔË·Ñ
¡¡¡¡express_fee="";//¿ìµÝÔË·Ñ
¡¡¡¡readonlys="true";//½»Ò×ÐÅÏ¢ÊÇ·ñÖ»¶Á
¡¡¡¡buyer_msg="";//Âò¼Ò¸øÂô¼ÒµÄÁôÑÔ
¡¡¡¡buyer="";//Âò¼ÒEmail
¡¡¡¡buyer_name="";//Âò¼ÒÐÕÃû
¡¡¡¡buyer_address="";//Âò¼ÒµØÖ·
¡¡¡¡buyer_zipcode="";//Âò¼ÒÓʱà
¡¡¡¡buyer_tel="";//Âò¼Òµç»°ºÅÂë
¡¡¡¡buyer_mobile="";//Âò¼ÒÊÖ»úºÅÂë
¡¡¡¡partner=ConfigurationSettings.AppSettings["partenid"];//ºÏ×÷»ï°éID£¬Õâ¸öÊǹ̶¨µÄ
¡¡¡¡ÉÏÃæ¾ÍÊÇÒªÌṩµÃ»ù±¾ÐÅÏ¢£¬È»ºó¾ÍÊÇÉú³ÉÖ§¸¶±¦µÃÁ¬½Ó£¬Ò²¾ÍÊǸøÖ§¸¶±¦ÌṩһÌõ´øÑéÖ¤µÄ¹ºÂòÐÅÏ¢¡£
¡¡¡¡public string creatAlipayItemURL£¨string t1£¬string t2£¬string t3£¬string t4£¬string t5£¬string cmd£¬string subject£¬string body£¬string order_no£¬string prices£¬string rurl£¬string types£¬string number£¬string transport£¬string ordinary_fee£¬string express_fee£¬string readonlys£¬string buyer_msg£¬string buyer£¬string buyer_name£¬string buyer_address£¬string buyer_zipcode£¬string buyer_tel£¬string buyer_mobile£¬string partner£©
¡¡¡¡{
¡¡¡¡string itemURL£¬str2CreateAc£¬acCode;
¡¡¡¡string INTERFACE_URL£¬sellerEmail£¬keyCode£¬imgsrc£¬imgtitle£¬AlipayItemURL;
¡¡¡¡//³õʼ»¯¸÷±ØÒª±äÁ¿
¡¡¡¡INTERFACE_URL=t1+t2;//Ö§¸¶½Ó¿Ú
¡¡¡¡sellerEmail=t2;//ÉÌ»§Ö§¸¶±¦ÕË»§£¨¸Ä³ÉÄã×Ô¼ºµÄ£©
¡¡¡¡keyCode=t3;//°²È«Ð£ÑéÂ루¸Ä³ÉÄã×Ô¼ºµÄ£©
¡¡¡¡imgsrc=t4;//Ö§¸¶±¦°´Å¥Í¼Æ¬
¡¡¡¡imgtitle=t5;//°´Å¥Ðüͣ˵Ã÷
¡¡¡¡str2CreateAc="cmd" + cmd + "subject" + subject;
¡¡¡¡str2CreateAc=str2CreateAc + "body" + body;
¡¡¡¡str2CreateAc=str2CreateAc + "order_no" + order_no;
¡¡¡¡str2CreateAc=str2CreateAc + "price" + prices;
¡¡¡¡//str2CreateAc=str2CreateAc + "url" + rurl;
¡¡¡¡str2CreateAc=str2CreateAc + "type" + types;
¡¡¡¡str2CreateAc=str2CreateAc + "number" + number;
¡¡¡¡str2CreateAc=str2CreateAc + "transport" + transport;
¡¡¡¡/*str2CreateAc=str2CreateAc + "ordinary_fee" + ordinary_fee;
¡¡¡¡str2CreateAc=str2CreateAc + "express_fee" + express_fee;
¡¡¡¡str2CreateAc=str2CreateAc + "readonly" + readonlys;
¡¡¡¡str2CreateAc=str2CreateAc + "buyer_msg" + buyer_msg;*/
¡¡¡¡str2CreateAc=str2CreateAc + "seller" + sellerEmail;
¡¡¡¡/*str2CreateAc=str2CreateAc + "buyer" + buyer;
¡¡¡¡str2CreateAc=str2CreateAc + "buyer_name" + buyer_name;
¡¡¡¡str2CreateAc=str2CreateAc + "buyer_address" + buyer_address;
¡¡¡¡str2CreateAc=str2CreateAc + "buyer_zipcode" + buyer_zipcode;
¡¡¡¡str2CreateAc=str2CreateAc + "buyer_tel" + buyer_tel;
¡¡¡¡str2CreateAc=str2CreateAc + "buyer_mobile" + buyer_mobile;*/
¡¡¡¡str2CreateAc=str2CreateAc + "partner" + partner;
¡¡¡¡str2CreateAc=str2CreateAc + keyCode;
¡¡¡¡//acCode=FormsAuthentication.HashPasswordForStoringInConfigFile£¨str2CreateAc£¬"MD5"£©;
¡¡¡¡acCode=this.GetMD5£¨str2CreateAc£¬"gb2312"£©;
¡¡¡¡itemURL=INTERFACE_URL + "£¿cmd=" + cmd;
¡¡¡¡itemURL=itemURL + "&subject=" + HttpUtility.UrlEncode£¨subject£©;
¡¡¡¡itemURL=itemURL + "&body=" + HttpUtility.UrlEncode£¨body£©;
¡¡¡¡itemURL=itemURL + "&order_no=" + order_no;
¡¡¡¡itemURL=itemURL + "&price=" + prices;
¡¡¡¡//itemURL=itemURL + "&url=" + rurl;
¡¡¡¡itemURL=itemURL + "&type=" + types;
¡¡¡¡itemURL=itemURL + "&number=" + number;
¡¡¡¡itemURL=itemURL + "&transport=" + transport;
¡¡¡¡/*itemURL=itemURL + "&ordinary_fee=" + ordinary_fee;
¡¡¡¡itemURL=itemURL + "&express_fee=" + express_fee;
¡¡¡¡itemURL=itemURL + "&readonly=" + readonlys;
¡¡¡¡itemURL=itemURL + "&buyer_msg=" + HttpUtility.UrlEncode£¨buyer_msg£©;
¡¡¡¡itemURL=itemURL + "&buyer=" + HttpUtility.UrlEncode£¨buyer£©;
¡¡¡¡itemURL=itemURL + "&buyer_name=" + HttpUtility.UrlEncode£¨buyer_name£©;
¡¡¡¡itemURL=itemURL + "&buyer_address=" + HttpUtility.UrlEncode£¨buyer_address£©;
¡¡¡¡itemURL=itemURL + "&buyer_zipcode=" + buyer_zipcode;
¡¡¡¡itemURL=itemURL + "&buyer_tel=" + buyer_tel;
¡¡¡¡itemURL=itemURL + "&buyer_mobile=" + buyer_mobile;*/
¡¡¡¡itemURL=itemURL + "&partner=" + partner;
¡¡¡¡itemURL=itemURL + "&ac=" + acCode;
¡¡¡¡AlipayItemURL=itemURL;
¡¡¡¡return AlipayItemURL;
¡¡¡¡}
¡¡¡¡Õâ¸öº¯Êý¾ÍÊÇ·µ»ØÉú³ÉµÄµØÖ·£¬ÀïÃæ×¢Ê͵ôµÄ¿´Äã×Ô¼ºÐèÒª¿ÉÒÔÌí¼Ó½øÈ¥£¬È»ºó¾ÍÊÇmd5ÂëµÄÎÊÌ⣬ÏÖÔÚÓÃĬÈϵÄmd5Éú³É³ÌÐò¶ÔÖÐÎĵÄÖ§³ÖÖ»ÏÞÓÚGB2312£¬¶øÖ§¸¶±¦Ê¹ÓõÄÊÇGBK£¬ËäÈ»Á½¸ö±àÂëµÄÄÚÈÝGBK¼æÈÝGB2312µ«ÊDZϾ¹Á½¸ö±àÂ뷽ʽ²»Í¬£¬ËùÒÔ»á²úÉú´íÎó£¬Èç¹ûÓÃÓ¢ÎÄ»òÕßÊý×Ö²»»áÓÐÎÊÌâ¡£ÉÏÃæÏÂÔØÀïÃæ´øµÄÒ»¸ömd5.aspµÄËã·¨Ö§³ÖÖÐÎÄ¡£
¡¡¡¡ÏÖÔÚÒѾ­¿ÉÒÔÌøתµ½Ö§¸¶±¦µÄÒ³ÃæÁË£¬¶øÎÒÃÇÕâ±ß¾ÍÒª×Ô¼º¼Ç¼Óû§µÄÐÅÏ¢ÒѾ­Éú³ÉµÄ¶¨µ¥±àºÅ£¬ÕâÑùÔÚÖ§¸¶±¦·µ»ØÐÅÏ¢µÄʱºòÀ´²éѯ¡£ÔÚÉ趨ÁË·µ»ØµØÖ·ºó£¬ÎÒÃǾÍÒª¿´½ÓÊÕÒ³ÃæÁË¡£
¡¡¡¡string msg_id£¬order_no£¬gross£¬buyer_email£¬buyer_name£¬buyer_address£¬buyer_zipcode£¬buyer_tel£¬buyer_mobile£¬action£¬s_date£¬ac£¬notify_type;
¡¡¡¡string returnTxt;//·µ»Ø¸øÖ§¸¶±¦Í¨Öª½Ó¿ÚµÄ½á¹û
¡¡¡¡string alipayNotifyURL;//Ö§¸¶±¦²éѯ½Ó¿ÚURL
¡¡¡¡string myalipayEmail;//ÉÌ»§µÄÖ§¸¶±¦Email
¡¡¡¡string ResponseTxt="";
¡¡¡¡returnTxt            = "N";
¡¡¡¡alipayNotifyURL        = ConfigurationSettings.AppSettings["interfaceback"];//Ö§¸¶±¦²éѯ½Ó¿ÚµØÖ·
¡¡¡¡myalipayEmail        = ConfigurationSettings.AppSettings["account"];//ÌîдÄúµÄÖ§¸¶±¦ÕʺÅ
¡¡¡¡//¼ì²éÖ§¸¶±¦Í¨Öª½Ó¿Ú´«µÝ¹ýÀ´µÄ²ÎÊýÊÇ·ñºÏ·¨
¡¡¡¡msg_id            = newop.DelStr£¨Request["msg_id"]£©;
¡¡¡¡order_no        = newop.DelStr£¨Request["order_no"]£©;
¡¡¡¡gross            = newop.DelStr£¨Request["gross"]£©;
¡¡¡¡buyer_email        = newop.DelStr£¨Request["buyer_email"]£©;
¡¡¡¡buyer_name        = newop.DelStr£¨Request["buyer_name"]£©;
¡¡¡¡buyer_address    = newop.DelStr£¨Request["buyer_address"]£©;
¡¡¡¡buyer_zipcode    = newop.DelStr£¨Request["buyer_zipcode"]£©;
¡¡¡¡buyer_tel        = newop.DelStr£¨Request["buyer_tel"]£©;
¡¡¡¡buyer_mobile    = newop.DelStr£¨Request["buyer_mobile"]£©;
¡¡¡¡action            = newop.DelStr£¨Request["action"]£©;
¡¡¡¡s_date            = newop.DelStr£¨Request["date"]£©;
¡¡¡¡ac                = newop.DelStr£¨Request["ac"]£©;
¡¡¡¡notify_type     = newop.DelStr£¨Request["notify_type"]£©;
¡¡¡¡alipayNotifyURL    = alipayNotifyURL + "msg_id=" + msg_id + "&email=" + myalipayEmail + "&order_no=" + order_no;
¡¡¡¡System.Net.WebClient isClient= new System.Net.WebClient£¨£©;
¡¡¡¡Stream isStream = isClient.OpenRead£¨alipayNotifyURL£©;
¡¡¡¡StreamReader isReader = new StreamReader£¨isStream£¬System.Text.Encoding.GetEncoding£¨"GB2312"£©£©;
¡¡¡¡ResponseTxt = isReader.ReadToEnd£¨£©;
¡¡¡¡if£¨action == "test"£©//²âÊÔÉÌ»§ÍøÕ¾URLÊÇ·ñÕýÈ·°²×°
¡¡¡¡{
¡¡¡¡returnTxt    = "Y";
¡¡¡¡}
¡¡¡¡else if£¨£¨action=="sendOff"£©&&£¨msg_id£¡=""£©£©//·¢»õ֪ͨ
¡¡¡¡{
¡¡¡¡returnTxt        = "N";
¡¡¡¡if£¨£¨ResponseTxt == "true"£©||£¨ResponseTxt == "false"£©£©
¡¡¡¡{
¡¡¡¡//¸üÐÂÊý¾ÝÔÚÉÌ»§ÏµÍ³ÀïµÄ¶©µ¥Êý¾Ý;Èç¹ûÒѾ­·¢»õ£¬Ôò½«returnTxtÖÃΪY£¬·ñÔòΪN
¡¡¡¡}
¡¡¡¡else
¡¡¡¡{
¡¡¡¡//·Ç·¨Êý¾Ý£¬²»×ö¸üÐÂ
¡¡¡¡returnTxt="Error";
¡¡¡¡}
¡¡¡¡}
¡¡¡¡else if£¨£¨action=="sendOff"£©&&£¨notify_type=="web"£©£©
¡¡¡¡{
¡¡¡¡//¼ì²éÊÇ·ñÒѾ­¸¶ÕÊ£¬²¢¼Ç¼            }
¡¡¡¡else if£¨£¨action=="checkOut"£©&&£¨msg_id£¡=""£©£©//½»Ò×½áÊø֪ͨ
¡¡¡¡{
¡¡¡¡returnTxt    = "Y";
¡¡¡¡if£¨£¨ResponseTxt=="true"£©||£¨ResponseTxt == "false"£©£©
¡¡¡¡{
¡¡¡¡//¸üÐÂÊý¾ÝÔÚÉÌ»§ÏµÍ³ÀïµÄ¶©µ¥Êý¾Ý;Èç¹ûÊý¾Ý¸üгɹ¦£¬Ôò½«returnTxtÖÃΪY£¬·ñÔòΪN
¡¡¡¡//¸üÐÂÊý¾Ý
¡¡¡¡//ÄãµÄ´úÂ룬¸üÐÂÄãÕâ±ßÊý¾Ý
¡¡¡¡returnTxt= "Y";
¡¡¡¡}
¡¡¡¡else
¡¡¡¡{
¡¡¡¡//·Ç·¨Êý¾Ý£¬²»×ö¸üÐÂ
¡¡¡¡returnTxt    = "Error";
¡¡¡¡}
¡¡¡¡}
¡¡¡¡else
¡¡¡¡{
¡¡¡¡returnTxt="Error";
¡¡¡¡}
¡¡¡¡Response.Write£¨returnTxt£©;
    ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤·½°¸±¾ÆªÁ¬½Ó£ºhttp://www.rongsen.com.cn/show-15137-1.html
Íøվά»¤½Ì³Ì¸üÐÂʱ¼ä:2012-04-04 22:50:25  ¡¾´òÓ¡´ËÒ³¡¿  ¡¾¹Ø±Õ¡¿
ÎÒÒªÉêÇë±¾Õ¾£ºNµã | ºÚ¿Í·ÀÏß¹ÙÍø |  
רҵ·þÎñÆ÷ά»¤¼°Íøվά»¤ÊÖ¹¤°²È«´î½¨»·¾³£¬ÍøÕ¾°²È«¼Ó¹Ì·þÎñ¡£ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤»ùµØÕÐÉ̽øÐÐÖУ¡QQ:29769479

footer  footer  footer  footer