当前位置:网站首页>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
边栏推荐
- 手机上怎么开股票账户?另外,手机开户安全么?
- [golang] golang implements the string interception function substr
- leetcode:104. 二叉树的最大深度
- In depth analysis of Apache bookkeeper series: Part 4 - back pressure
- 电商秒杀系统
- AtCoder Beginner Contest 255
- How to open a stock account? Is it safe to open a mobile account
- D compile time count
- How to develop the exchange system? Mature technology case of digital currency exchange system development
- Prospects of world digitalization and machine intelligence in the next decade
猜你喜欢

Fastjson V2 简单使用手册

What is the experience of pairing with AI? Pilot vs alphacode, Codex, gpt-3
![[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview](/img/1d/62e55f1b5445d7349ec383879f4275.png)
[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview

公有云市场迈入深水区,冷静的亚马逊云还坐得住吗?

总结的一些内存问题

Doker的容器数据卷

KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明

未来十年世界数字化与机器智能展望

RIDE:获取图片base64

Zero sample and small sample learning
随机推荐
Redis' transaction and locking mechanism
Swift 5.0 - creation and use of swift framework
【Android,Kotlin,TFLite】移动设备集成深度学习轻模型TFlite(物体检测篇)
D compile time count
微信小程序中的数据双向绑定
Zero sample and small sample learning
Doker的容器数据卷
10 airbags are equipped as standard, and Chery arizer 8 has no dead corner for safety protection
[无线通信基础-13]:图解移动通信技术与应用发展-1-概述
How to open a stock account? Is it safe to open a mobile account
What does project management really manage?
云游戏| 云计算推动游戏行业进入“新纪元”
项目管理到底管的是什么?
Spark - understand partitioner in one article
Using Obsidian with Hugo, markdown's local editing software is seamlessly connected with online
Esp8266 becomes client and server
Redis' cache penetration, cache breakdown and cache avalanche
Kubevela 1.4: make application delivery safer, easier to use, and more transparent
CNN经典网络模型详解-LeNet-5(pytorch实现)
在线客服聊天系统源码_美观强大golang内核开发_二进制运行傻瓜式安装_附搭建教程...