Home >Backend Development >PHP Tutorial >WeChat payment php official demo blank problem

WeChat payment php official demo blank problem

WBOY
WBOYOriginal
2016-09-13 08:46:03927browse

I downloaded the latest official php payment demo and directly modified the necessary configuration information.
When paying, whether it is h5 payment or scan code payment, it always jumps to a blank page without any errors. Later, I tried many methods and finally solved the specific modifications. What is
This error is solved by modifying the file WxPay.Api.php, as follows:

Line 537

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 directory structure of the officially downloaded demo is used. A folder is added after the domain name.

The content is as follows:

WeChat payment php official demo blank problem

But is this a coding error or an environmental problem?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn