Computing the signature
The signature is computed by following the same procedure as for creating the payment form.
To compute the signature:
||The data submitted by the payment gateway is encoded in UTF-8.
Any alteration of received data will result in signature computation error.
- Take all the fields starting with vads_.
- Sort these fields alphabetically.
- Concatenate the values of these fields separating them with the "+" character.
- Concatenate the result with the test or production key separating them with a "+".
- According to the signature algorithm defined in your shop configuration:
- if your shop is configured to use "SHA-1", apply the SHA-1 hash function on the chain obtained at the previous step.
- if your shop is configured to use "HMAC-SHA-256", compute and encode in Base64 format the message signature using the HMAC-SHA-256 algorithm with the following parameters:
- the SHA-256 hash function,
- the test or production key (depending on the value of the vads_ctx_mode field) as a shared key,
- the result of the previous step as the message to authenticate.