当前位置:网站首页>Reason why wechat payment wxpaypubhelper V3 callback XML is empty
Reason why wechat payment wxpaypubhelper V3 callback XML is empty
2022-06-30 23:06:00 【viqecel】
Find find , The reason is that the server is upgraded to php7 After version , For example, there is this code in the wechat payment callback , among x m l = xml = xml=GLOBALS[‘HTTP_RAW_POST_DATA’];// stay PHP7 in . This writing is disabled . It is amended as follows file_get_contents(‘php://input’); that will do
include_once("./log_.php");
include_once("../WxPayPubHelper/WxPayPubHelper.php");
// Use the common notification interface
$notify = new Notify_pub();
// Store the callback of wechat
$xml = file_get_contents('php://input'); // Change this to normal
//$xml =$GLOBALS['HTTP_RAW_POST_DATA'];// stay PHP7 in . This writing is disabled
$notify->saveData($xml);
// Verify the signature , And respond to wechat .
// When interacting with background notifications , If wechat does not receive the response from the merchant successfully or overtime , Wechat thinks notification failed ,
// Wechat will adopt certain strategies ( Such as 30 Minutes in total 8 Time ) Periodically re initiate notifications ,
// Maximize the success rate of notifications , But wechat does not guarantee that the notification will succeed in the end .
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 the return code
$oid=$notify->data["out_trade_no"];
// Here is the code to update the order status of the database
边栏推荐
- 电商秒杀系统
- How to change the win11 computer name? Win11 method of changing computer name
- Solve arm_ release_ ver of this libmali is ‘g2p0-01eac0‘,rk_ so_ Ver is' 4 ', libgl1 mesa dev will not be installed, and there are unsatisfied dependencies
- Ideal interface automation project
- Smart streetlights | cloud computing lights up the "spark" of smart cities
- Swift5.0 ----Swift FrameWork的创建及使用
- Fund managers' corporate governance and risk management
- Based on the open source stream batch integrated data synchronization engine Chunjun data restore DDL parsing module actual combat sharing
- 基于kubernetes平台微服务的部署
- Cloud games | cloud computing drives the game industry into a "new era"
猜你喜欢

Deployment of microservices based on kubernetes platform

Ride: get picture Base64

Braces on the left of latex braces in latex multiline formula

HP 惠普笔记本电脑 禁用触摸板 在插入鼠标后

"More Ford, more China" saw through the clouds, and the orders of Changan Ford's flagship products exceeded 10000

2022-06-30:以下golang代码输出什么?A:0;B:2;C:运行错误。 package main import “fmt“ func main() { ints := make

Jmeter跨线程参数关联无需脚本

Tencent has been conducting advanced automated functional testing for 3 years. It is a gift to you who are confused in manual testing

What if the taskbar is blank after win11 update? Solution to blank and stuck taskbar after win11 update

Ideal interface automation project
随机推荐
What does the &?
How to develop the exchange system? Mature technology case of digital currency exchange system development
How do I open a stock account on my mobile phone? In addition, is it safe to open a mobile account?
How to change the win11 computer name? Win11 method of changing computer name
[golang] golang实现截取字符串函数SubStr
基金管理人公司治理和风险管理
Meet the streamnational | yangzike: what made me give up Dachang offer
How does win11 optimize services? Win11 method of optimizing service
New trends of China's national tide development in 2022
Based on the open source stream batch integrated data synchronization engine Chunjun data restore DDL parsing module actual combat sharing
Meet the StreamNative | 杨子棵:是什么让我放弃了大厂 Offer
Cloud games | cloud computing drives the game industry into a "new era"
基于kubernetes平台微服务的部署
Wechat applet transmits parameters (data-) by clicking events
微信小程序中的数据双向绑定
Fastjson V2 简单使用手册
How to use dataant to monitor Apache APIs IX
CNN classic network model details -lenet-5 (pytorch Implementation)
一次革命、两股力量、三大环节:《工业能效提升行动计划》背后的“减碳”路线图
基金客户和销售机构