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

边栏推荐
- Wechat applet exits the applet (navigator and api--wx.exitminiprogram)
- 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
- Day3 data type and Operator jobs
- [latex] error type summary (hold the change)
- C# 40. byte[]与16进制string互转
- A method of quickly transplanting library function code to register code by single chip microcomputer
- Numpy data input / output
- [quartz] read configuration from database to realize dynamic timing task
- LeetCode 19. 删除链表的倒数第 N 个结点
- Day4 branch and loop jobs
猜你喜欢

The first gift of the project, the flying oar contract!

【Unity3D】刚体组件Rigidbody

How can the intelligent transformation path of manufacturing enterprises be broken due to talent shortage and high cost?

0622 horse palm fell 9%

6.1 - 6.2 公钥密码学简介

PSIM software learning ---08 call of C program block

Mise en œuvre du routage dynamique par zuul

Rsync common error messages (common errors on the window)

Record a circular reference problem

Nabicat connection: local MySQL & cloud service MySQL and error reporting
随机推荐
Solution to back-off restarting failed container
Happy New Year!
Numpy index and slice
ThreadPoolExecutor实现文件上传批量插入数据
Multipass Chinese document - use packer to package multipass image
Difference between return and yield
Zuul 實現動態路由
Generalized linear model (logistic regression, Poisson regression)
微服务之间的Token传递之一@Feign的token传递
Introduction to classification data cotegory and properties and methods of common APIs
File upload and security dog
Illustration of ONEFLOW's learning rate adjustment strategy
Zuul implements dynamic routing
为什么许多shopify独立站卖家都在用聊天机器人?一分钟读懂行业秘密!
[ide (imagebed)]picgo+typora+aliyunoss deployment blog Gallery (2022.6)
PHP one sentence Trojan horse
ModuleNotFoundError: No module named ‘numpy‘
Multipass中文文档-使用Multipass服务授权客户端
Statsmodels Library -- linear regression model
Anti withdrawal test record