验签方法verify()在目录:/vendor/yansongda/pay/src/Gateways/Alipay.php里,方法里有一句
if (isset($data[‘fund_bill_list’])) {
d
a
t
a
[
′
f
u
n
d
b
i
l
l
l
i
s
t
′
]
=
h
t
m
l
s
p
e
c
i
a
l
c
h
a
r
s
d
e
c
o
d
e
(
data['fund_bill_list'] = htmlspecialchars_decode(
data[′fundbilllist′]=htmlspecialcharsdecode(data[‘fund_bill_list’]);
}
在这里打印$data[‘fund_bill_list’]发现里面的引号被转义了。
解决方法:使用stripslashes()方法移除转义:
if (isset($data[‘fund_bill_list’])) {
d
a
t
a
[
′
f
u
n
d
b
i
l
l
l
i
s
t
′
]
=
s
t
r
i
p
s
l
a
s
h
e
s
(
h
t
m
l
s
p
e
c
i
a
l
c
h
a
r
s
d
e
c
o
d
e
(
data['fund_bill_list'] = stripslashes( htmlspecialchars_decode(
data[′fundbilllist′]=stripslashes(htmlspecialcharsdecode(data[‘fund_bill_list’]) );
}
————————————————
版权声明:本文为CSDN博主「毕竟我是大神」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/sbchei/article/details/115636045