I am using NodeJs. and following the quick checkout Integration of Skrill Payment Gateway.
I am stuck at the time of success when we need to create msid and compare it with the provided one in the return success url for the authentication of request.
As per the docs (https://www.skrill.com/fileadmin/content/pdf/Skrill_Quick_Checkout_Guide.pdf) msid can be generated as The MD5 signature, with the following values:
• merchant_id, for example: 123456
• transaction_id, for example: A205220
• upper-case MD5 value of the ASCII
equivalent of your secret word, for
example:
F76538E261E8009140AF89E001341F17
and i am using the following code for the same.
var br = new Buffer.from('secret').join(' ').trim()
let sw = md5(br).toUpperCase()
let param_data = {
merchant_id: 'merchant-email@email.com',
transaction_id: "Ahjt786uy787",
secret_word: sw
}
let msid = crypto.createHash('md5').update(param_data.merchant_id+param_data.transaction_id+sw).digest('hex');