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.
Download the Public Key File
Download the public key file by clicking the link below and store it somewhere on your server
Next Steps
Below is the sample callback data for this demonstration (sample redirect data is available here);
Obtain the value of the
rsa-signatureheader (if callback) OR the value of thersa_signaturequery 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_statusand these values are obtained from the callback/redirect data. The string payload would therefore betransaction.failed:MCTREFYDPE9LMZ34S8HM:GOVBILGHQ6ZDXFK7C7NJ:COLLECTION:FAILEDUse 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
Last updated