Understanding the computation method of the signature
A key (or "certificate") is required to communicate with the payment gateway.
- one for TEST mode,
- one for PRODUCTION mode.
The key value is used to compute the alphanumeric signature.
- The Numeric type fields can't have a 0 to the left of the most significant digit.
- The bool type fields take the values 1 (true) or 0 (false)
- The unfilled string type fields will be empty
To simplify the signature calculation, all dateTime fields and the template field are ignored.
- Respect the order of the fields :
- Creation of a payment order :
shopId, offerId, reference, ctxMode, amount, currency, locale,message, recipients, subject, validationMode, validity, sendMail, expandedData
- Modification of a payment order :
- Make sure that all the fields are encoded in UTF-8.
- Concatenate the values of these fields separating them with the "+" character.
- Concatenate the result with the test or production key separating them with a "+".
- Apply the SHA-1 algorithm to obtain the signature value.
In TEST mode, n case of bad signature computation, the errorCode returned is "2" and the string used for signature on the server is then returned in the errorDetail field.