Home>Article>Backend Development> Alipay APP payment asynchronous callback signature verification failure case analysis
This article mainly shares with you the analysis of the failure case of Alipay APP payment asynchronous callback signature verification. Recently, I have cooperated with IOS to make APP payments. The payment process has been very smooth. According to the official documents, it passed in one go, as shown in the picture:
After IOS requests the string, it directly calls the sdk to initiate the payment request.
But there was a problem when processing the asynchronous callback signature verification, -_-||, according to the official method, the signature verification kept failing, as shown in the picture:
$flag kept returning false. Later, I found the Alipay technical support center (the service is really good). With the same payment callback, the customer service side could verify the signature successfully. . . , by comparing the customer service callback data with my local callback data, as shown in the figure:
It is found that PHP automatically adds an escape character before the special characters in fund_bill_list (magic_quotes_gpc in php.ini is on when requesting, and ' "\, etc. will be automatically escaped)... After removing the escape character, the signature verification is successful.
Recently, I have been working with IOS for APP payment, and the payment process has been very smooth. According to the official document
, it is passed in one go, as shown in the picture:
IOS request to string Then directly call the sdk to initiate the payment request
But there is a problem when processing the asynchronous callback signature verification, -_-||, according to the official method, the signature verification continues to fail, as shown in the figure:
$flag kept returning false. Later, I found the Alipay technical support center (the service is really good). With the same payment callback, the customer service side could verify the signature successfully. . . , by comparing the customer service callback data with my local callback data, as shown in the figure:
It is found that PHP automatically adds an escape character before the special characters in fund_bill_list (magic_quotes_gpc in php.ini is on when requesting, and ' "\, etc. will be automatically escaped)... After removing the escape character, the signature verification is successful.
Related recommendations:
In-depth analysis of koa's asynchronous callback processing
An exception when operating redis in asynchronous callback
Promise mode encapsulation example of JavaScript asynchronous callback_javascript skills
The above is the detailed content of Alipay APP payment asynchronous callback signature verification failure case analysis. For more information, please follow other related articles on the PHP Chinese website!