(Scan the static link QR code) native payment mode provides several bug fixes in the demo file, nativedemo. (Scan the static link QR code) several bug fixes in the demo file officially provided by native payment mode, nativedemonative payment mode 1 demo (static link QR code scanned) several bug fixes in the demo file officially provided by native payment mode, nativedemo
Native payment mode 1 demo (scan the static link QR code) BUG fix, a total of 4 bugs
1. the code in the native_call_qrcode.php file cannot survive the short address paid by native
2. a code in WxPayPubHelper. php cannot obtain the constant CURL_TIMEOUT defined by the WxPayConf_pub class.
3. curl session in WxPayPubHelper. php cURL and abnormal resource release
4. incorrect payment long address translation address function
1. correct the problem that the payment QR code is not generated for the short address. the page address is native_call_qrcode.php.
Row 39th: because the official$ CodeUrlThe result is null.
Row 3:
var url = "
";
Obtain a long address
Change to short address:
var url = "
";
Scanning fails because the characters with long addresses are too informative.
2. a code in WxPayPubHelper. php cannot obtain the constant CURL_TIMEOUT defined by the WxPayConf_pub class.
WxPayPubHelper/WxPayPubHelper. php
155th rows
curl_setopt($ch, CURLOP_TIMEOUT, $second);
CURLOP_TIMEOUT cannot be obtained here
Should be changed
curl_setopt($ch, WxPayConf_pub::CURL_TIMEOUT, $second);
3. curl session in WxPayPubHelper. php cURL and abnormal resource release
The 176th rows return $ data; are superfluous, and an error is reported here, because the 171st rows:
curl_close($ch);
Stream disabled
4. incorrect payment long address translation address function
No short address can be obtained from getcursurl () in row 3,
function getShortUrl(){$this->postXml();$prepay_id = $this->result["short_url"];return $prepay_id;}
Modify as follows:
function getShortUrl(){$this->postXml();$postObj = simplexml_load_string($this->response, 'SimpleXMLElement', LIBXML_NOCDATA);$prepay_id = $postObj->short_url;return $prepay_id;}
QQ: 187395037 Tel: 15889726201
Http://www.bkjia.com/PHPjc/909746.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/909746.htmlTechArticle (with scan static link QR code) native payment mode provided by the official demo file in a few bug fixes, nativedemo native payment mode a demo (with scan static link QR code...