当前位置:网站首页>关于支付接口回调地址参数字段是“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”

边栏推荐
- Solution to back-off restarting failed container
- [unity3d] rigid body component
- Second day of deep learning and tensorfow
- Computer Vision Tools Chain
- Multipass Chinese document - setup driver
- PowerShell runtime system IO exceptions
- Computer Vision Tools Chain
- 6.1 - 6.2 introduction to public key cryptography
- A ZABBIX self discovery script (shell Basics)
- Basic query
猜你喜欢

Happy New Year!

2. < tag dynamic programming and conventional problems > lt.343 integer partition

Genius makers: lone Rangers, technology giants and AI | ten years of the rise of in-depth learning

Nabicat connection: local MySQL & cloud service MySQL and error reporting

2022.1.24

UWB超高精度定位系统原理图
![[unity3d] rigid body component](/img/57/344aae65e4ac6a7d44b235584f95d1.png)
[unity3d] rigid body component

6.1 - 6.2 introduction to public key cryptography

Rsync common error messages (common errors on the window)

Stm8 MCU ADC sampling function is triggered by timer
随机推荐
【Latex】错误类型总结(持更)
Differences between TCP and UDP
微信小程序保存圖片的方法
-Discrete Mathematics - Analysis of final exercises
PSIM software learning ---08 call of C program block
Transport layer TCP protocol and UDP protocol
Collections and dictionaries
天才制造者:獨行俠、科技巨頭和AI|深度學習崛起十年
6.1 - 6.2 公鑰密碼學簡介
How can the intelligent transformation path of manufacturing enterprises be broken due to talent shortage and high cost?
Day3 data type and Operator jobs
Sort query
Use to_ Numeric to numeric type
tensorlow:cifar100_ train
【Unity3D】碰撞体组件Collider
Mise en œuvre du routage dynamique par zuul
Selection of programming language
Multipass中文文档-与实例共享数据
Interpretation of yolov5 training results
Sklearn Library -- linear regression model