RSA Signature Verification
The section describes how the RSA signature sent in the callback header or redirect query data can be verified. For verification to succeed, the public key is required.
Last updated
The section describes how the RSA signature sent in the callback header or redirect query data can be verified. For verification to succeed, the public key is required.
Last updated
Download the public key file by clicking the link below and store it somewhere on your server
Obtain the value of the rsa-signature
header (if callback) OR the value of the rsa_signature
query parameter (if redirect).
Form the string payload to be used in signature verification. This is obtained by concatenating values of the callback/redirect data in the format; event:merchant_reference:internal_reference:transaction_type:transaction_status
and these values are obtained from the callback/redirect data. The string payload would therefore be transaction.failed:MCTREFYDPE9LMZ34S8HM:GOVBILGHQ6ZDXFK7C7NJ:COLLECTION:FAILED
Use the public key obtained above to verify the signature as described in the sample source codes below;
Below is an example of a generated RSA signature on the sandbox environment
Below is the sample callback data for this demonstration (sample redirect data is available );