Home > Article > Backend Development > ThinkPHP integrated Alipay ILLEGAL_SIGN error_PHP tutorial
Today when ThinkPHP integrated Alipay, an error always occurred: error code ILLEGAL_SIGN.
After investigation, it was found that there is an additional parameter after the generated payment URL: &__hash__=fd859fc9a96d36e0c4a75b036bbda88f_688da907d6c415fd12a1f4324a2110f3
This parameter is automatically added after ThinkPHP's token verification is turned on.
You can use C ( 'TOKEN_ON', false ); in Action to turn on or off token verification.
It is worth noting that if token verification is not turned off and the payment interface is integrated, this parameter will appear after the jump URL generated by the payment interface. However, the Alipay interface does not have this parameter, so the above error will occur. .