Signature verification
Concatenate
Firstly, the merchant obtains the following information from the response.
Reply timestamp in HTTP header tokenpay-Timestamp.
Reply to a random string in the HTTP header tokenpay-Nonce.
Response Body, check the interface according to the order returned by the interface. An incorrect order will cause the check failure.
The signature string has three lines, one parameter per action. The line ends with \n
(line break, The ASCII encoding value is 0x0A), and don't add \n
on the last line. If the parameter itself ends in \n
, you also need to attach an \n
.
For example, an HTTP reply message is as follows:
Then the signature string is
Reply
The tokenpay reply signature is transmitted through the HTTP header tokenpay-Signature. (Note: Example because typesetting may contain line breaks, the actual data should be on one line)
Judgment
Last updated