{
"code":"SIGN_ERROR",
"detail":
{
"detail":{"issue":"sign not match"},
"field":"signature",
"location":"authorization",
"sign_information":{
"method":"POST",
"sign_message_length":290,
"truncated_sign_message":"POST\n/v3/pay/transactions/app\n1554208460\n593BEC0C930BF1AFEB40B4A08C8FB242\n{\"amount\n",
"url":"/v3/pay/transactions/app"
}
},
"message":"签名错误,请检查后再试"
}
什么情况?
签名错误的话建议检查如下几个问题
1.键名大小写
2.键名按ASCII字典升序排序,PHP的话用ksort()方法
3.键值不要有空格,不要为空,不要是URL 字符串,除非要求
4.签名类型要符合要求,比如是MD5还是HMAC-SHA256ha或是其他
5.签名结果是否需要大写处理
签名过程建议打印,方便排查