当前位置:网站首页>关于支付接口回调地址参数字段是“notify_url”,签名过后的特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
关于支付接口回调地址参数字段是“notify_url”,签名过后的特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
2022-06-26 05:04:00 【你好骚啊】
今天对接支付接口,参数拼接完了,开始调用的时候,一直报错,签名错误。
但是我用第三方给的签名测试mode测试签名,返回的是true。
这就非常他娘的奇怪。
经过一个个参数对比,我发现,notify_url 参数有问题。
需要Url编码的原内容是 “¬ify_url=xxxx” 经过url编码以后再解码回来 “¬”的部分就变成了“¬”
变成了这样:“name=xxxx¬ify_url=xxxx&randomstr”
怪不得我调用的时候一直说签名错误,字段名字都给变了,不报错还奇了怪了。
然后百度查资料
有个老哥说:”把原文里面待url编码的&符号先替换成&,进行编码以后再转码回来就正常了。“
那这就简单了,用替换函数
$url = str_replace("&","&",'https:www.xxx.com?'.$str);这样返回的就是“name=xxxx¬ify_url=xxxx&randomstr”

边栏推荐
- Yolov5 super parameter setting and data enhancement analysis
- Happy New Year!
- AD教程系列 | 4 - 创建集成库文件
- pycharm 导包错误没有警告
- Rdkit chemical formula molecular formula search
- 2022.1.24
- 86.(cesium篇)cesium叠加面接收阴影效果(gltf模型)
- ModuleNotFoundError: No module named ‘numpy‘
- Is education important or ability important in software testing
- Datetime data type ---now() gets the current time, datetime() creation date, performs mathematical operations, and to_ Datetime() converts to date type and extracts various parts of date
猜你喜欢

A new paradigm for large model application: unified feature representation optimization (UFO)

2. < tag dynamic programming and conventional problems > lt.343 integer partition
![C# 39. string类型和byte[]类型相互转换(实测)](/img/33/046aef4e0c1d7c0c0d60c28e707546.png)
C# 39. string类型和byte[]类型相互转换(实测)

2.22.2.14

File upload and security dog

Zuul 實現動態路由

0622 horse palm fell 9%

ModuleNotFoundError: No module named ‘numpy‘

天才制造者:獨行俠、科技巨頭和AI|深度學習崛起十年

6.1 - 6.2 公鑰密碼學簡介
随机推荐
torchvision_transform(图像增强)
Schematic diagram of UWB ultra high precision positioning system
Interpretation of yolov5 training results
Difference between return and yield
Multipass Chinese document - remove instance
Nabicat connection: local MySQL & cloud service MySQL and error reporting
Zuul 實現動態路由
UWB超高精度定位系统架构图
Create a binary response variable using the cut sub box operation
A company crawling out of its grave
Modify the case of the string title(), upper(), lower()
图解OneFlow的学习率调整策略
广和通联合安提国际为基于英伟达 Jetson Xavier NX的AI边缘计算平台带来5G R16强大性能
Introduction to classification data cotegory and properties and methods of common APIs
Multipass中文文档-移除实例
【Unity3D】人机交互Input
Sentimentin tensorflow_ analysis_ cell
Multipass Chinese document - use packer to package multipass image
PHP之一句话木马
GD32F3x0 官方PWM驱动正频宽偏小(定时不准)的问题