Home > Article > Backend Development > Solution to Alipay APP payment asynchronous callback signature verification failure
Recently, I have been working with IOS to make APP payments, and the payment process has been very smooth. This article mainly shares with you the solution to the asynchronous callback verification failure of Alipay APP payment. I hope it can help everyone.
To pass it all at once, as shown in the figure:
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 was found that PHP automatically added an escape character before the special characters in fund_bill_list (when requesting, magic_quotes_gpc in php.ini is on, it will automatically escape ' "\, etc.)..., after removing the escape character , the signature verification is successful.
I have been working with IOS to make APP payments recently, and the payment process has been very smooth. I passed it in one go according to the official document
, as shown in the picture:
IOS directly calls the sdk to initiate the payment request after requesting the string.
But there is a problem when processing the asynchronous callback signature verification, -_-||, according to the official method, the signature verification always fails, such as 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 was 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 , signature verification successful
Related recommendations:
Alipay APP payment asynchronous callback signature verification failure case analysis
The above is the detailed content of Solution to Alipay APP payment asynchronous callback signature verification failure. For more information, please follow other related articles on the PHP Chinese website!