WeChat payment php official demo blank

Source: Internet
Author: User
Tags blank page
Download is the latest official php payment demo directly modified the necessary configuration information when you pay, whether it is h5 payment or scan the code payment has been redirected to the blank page, there is no error, then I tried a lot of methods finally fixed the specific modification by modifying the WxPay file. api. php...

Download the latest official php payment demo and directly modify the necessary configuration information.
There is no error when you go to the blank page during the payment process, whether it is h5 payment or scanning payment.
Later, I tried a lot of methods and finally solved the problem.
This error is solved by modifying the WxPay. Api. php file, as follows:

537th rows
Curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, TRUE );
Curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, 2); // strict verification

To

Curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, FALSE );
Curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, FALSE); // strict verification

The demo directory structure downloaded officially is the domain name followed by a folder.
The content is as follows:

But is this a code error or an environment problem?

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.