WeChat payment successful how do I jump to the information tip page I specified?

Source: Internet
Author: User
I use the official website of the demo, after the successful payment of the scan, or stay in this page, how to pay the success of how to jump to my designated information tip page? Where should I handle it?


Reply to discussion (solution)

There is no callback function after the successful payment, in that function, jump to your page.

There is a callback address set.

There is a callback address set.


Callback Address settings


My notify_url.php code is as follows

/** * General Notification Interface Demo * ==================================================== * After payment is completed, the relevant payment and user information will be sent to the merchant's notification URL, * after the merchant receives the callback information, Set the appropriate processing flow as required. * * Here is an example of logging callback information using the log file. */include_once ("./log_.php"); Include_once ("..    /wxpaypubhelper/wxpaypubhelper.php "); Use the generic notification interface $notify = new Notify_pub ();//stored callback $xml = $GLOBALS [' Http_raw_post_data ']; $notify->savedata ($xml); if ($ Notify->checksign () = = FALSE) {$notify->setreturnparameter ("Return_code", "FAIL");//Return Status code $notify-> Setreturnparameter ("Return_msg", "Signature failed");//return information}else{$notify->setreturnparameter ("Return_code", "SUCCESS");// Set return code} $RETURNXML = $notify->returnxml (); Echo $returnXml;//== Merchant Sets the appropriate processing flow according to the actual situation, here only for example =======//log callback information as a log file $ Log_ = new Log_ (); $log _name= "./notify_url.log";//log file path $log_->log_result ($log _name, "" Notify notification Received: \ n ". $xml." \ n "), if ($notify->checksign () = = TRUE) {if ($notify->data[" return_code "] = =" FAIL ") {///here should update order status, Merchant's own additions and deletions $log _->log_result ($log _name, "Communication error: \ n". $xml. " \ n ");} ElseIf ($notify->data["Result_code"] = = "FAIL") {//Here should update the status of the order, the merchant added or deleted operation $log_->log_result ($log _name, "" Business error: \ n ". $xml." \ n ");} else{//here should update the status of the order, the merchant to delete the operation $log_->log_result ($log _name, "" Payment success: \ n ". $xml." \ n ");} $myfile = fopen ("Sfq.txt", "w") or Die ("Unable to open file!"); Fwrite ($myfile, $returnXml); Fclose ($myfile); Header ("location:http://www.bjp51.net/"); Merchants to increase their own processing processes,//For example: Database operations}

Why can't the above code jump to http://www.bjp51.net/home?

I don't know, I understand, right?

There is a callback address set.



Have replied, trouble moderator to help look under

PC End with sweep code payment ... After success.

PC-side web pages will definitely not jump naturally.

After the payment is successful, you will be notified of the server and said the payment was successful. Then your server, make the corresponding data changes

Your PC-side payment page. Make a JS Ajax request, the query whether the payment is successful. Once every 10 seconds, after the success, jump.

PC End with sweep code payment ... After success.

PC-side web pages will definitely not jump naturally.

After the payment is successful, you will be notified of the server and said the payment was successful. Then your server, make the corresponding data changes

Your PC-side payment page. Make a JS Ajax request, the query whether the payment is successful. Once every 10 seconds, after the success, jump.



Thank you, I did it the way you did it.
But another question comes again, is jsasp method with UC browser how to pay success?

Everybody can see me another payment question http://bbs.csdn.net/topics/391926831
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.