Signature Verification

It is strongly recommended to use a signature mechanism to verify the contents of a request or redirection made to your servers. This prevents customers from tampering with the data in the data exchanges between your servers and our payment system.

A unique signature is sent each time HiPay contacts any merchant’s URL, notification or redirection.

Setup

First of all, you need to set a secret passphrase in your HiPay Enterprise back office under “Integration -> Security Settings -> Secret Passphrase”.

Secret passphrase: The secret passphrase is used to generate a unique character string (signature) hashed with SHA algorithm. The security level of the password depends on its length. A long password is more secure.

Verification

Notification URL: For the notification URL, the signature is sent on the HTTP header under the HTTP_X_ALLOPASS_SIGNATURE parameter. To check this point, you just need to concatenate the passphrase with the POST content of the query.

Algorithm: SHA signature = SHA1(Raw POST Data + Secret Passphrase)

Redirection URL: For each redirection page (accept page, decline page, etc.), the signature is sent under the “hash” parameter. To check this point, you must concatenate the parameters, the values of each of them and the passphrase under the following conditions:

The parameter must be predefined,

The value can’t be empty,

The parameter must be sorted in alphabetical order.

Please note: you must remove any personal parameter from the query to only include the HiPay parameters.