Comparing signatures

To ensure the integrity of the response, you must compare the value of the signature field received in the response with the one computed previously.

If the signatures match,
  • you may consider the response as safe and proceed with the analysis.
  • If they don't, the script will have to throw an exception and warn the merchant

The signatures may not match because of :

  • an implementation error (error in your calculation, problem with UTF-8 encoding, etc.),
  • an error in the value of the key or in the vads_ctx_mode field value (frequent issue when going to live mode),
  • a data corruption attempt.