当前位置:网站首页>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
边栏推荐
- Redis' transaction and locking mechanism
- AtCoder Beginner Contest 255
- "Paddle + camera" has become a "prefabricated dish" in the AI world, and it is easier to implement industrial AI quality inspection
- HDFS centralized cache management
- CTFSHOW权限维持篇
- “飞桨+辨影相机”成为AI界的“预制菜”,工业AI质检落地更简单
- 股票开户要如何办理呢?办理手机开户安全吗
- 软件测试报告包含哪些内容?如何获取高质量软件测试报告?
- How to develop the exchange system? Mature technology case of digital currency exchange system development
- 在线客服聊天系统源码_美观强大golang内核开发_二进制运行傻瓜式安装_附搭建教程...
猜你喜欢

Prospects of world digitalization and machine intelligence in the next decade

如何使用 DataAnt 监控 Apache APISIX

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

As the public cloud market enters the deep water, can the calm Amazon cloud still sit still?

What is the experience of pairing with AI? Pilot vs alphacode, Codex, gpt-3

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

MIT doctoral dissertation optimization theory and machine learning practice

Fastjson V2 简单使用手册

微信小程序中的数据双向绑定

10 airbags are equipped as standard, and Chery arizer 8 has no dead corner for safety protection
随机推荐
远程办公期间,项目小组微信群打卡 | 社区征文
Smart streetlights | cloud computing lights up the "spark" of smart cities
股票开户要如何办理呢?办理手机开户安全吗
leetcode:104. 二叉树的最大深度
E-commerce seckill system
微信小程序通过点击事件传参(data-)
[450. delete nodes in binary search tree]
Kubevela 1.4: make application delivery safer, easier to use, and more transparent
D compile time count
基金客户服务
基金客户和销售机构
ESP8266 成为客户端和服务器
KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明
In depth analysis of Apache bookkeeper series: Part 4 - back pressure
How to design test cases
图纸加密如何保障我们的核心图纸安全
Cloud games | cloud computing drives the game industry into a "new era"
Architecture of IM integrated messaging system sharing 100000 TPS
flutter - sort List排序
leetcode:104. Maximum depth of binary tree