Follow these steps to ensure your integration matches our security protocol. Use the example request data:
Code Example
Reorder and Concatenate Example:
Javascript
const orderedString = Object.keys(data).sort().map(key => \`\${key}\${data[key]}\`).join('');
Php
$orderedString = '';
ksort($data);
foreach ($data as $key => $value) {
$orderedString .= $key . $value;
}
Python
orderedString = ''.join([f"{k}{v}" for k, v in sorted(data.items())])
Generate Signature:
Javascript
const signature = CryptoJS.MD5(orderedString + signatureKey).toString();
Php
$signature = md5($orderedString . $signatureKey);
Python
import hashlib
signature = hashlib.md5((orderedString + signatureKey).encode('utf-8')).hexdigest()
Encrypt Data:
Javascript
const encryptedData = CryptoJS.AES.encrypt(JSON.stringify(finalData), cryptKey).toString();
Php
$encryptedData = openssl_encrypt(json_encode($finalData), 'aes-256-cbc', $cryptKey);
Python
from Crypto.Cipher import AES
import base64
cipher = AES.new(cryptKey.encode('utf-8'), AES.MODE_CBC, iv)
encryptedData = base64.b64encode(cipher.encrypt(pad(json.dumps(finalData).encode('utf-8')))).decode('utf-8')