Postback Security
You should verify the signature received in the postback to ensure that the call comes from our servers.
Signature parameter should match MD5 of subId
transactionId
reward
secret key
. You can find your secret
of your placement settings. Here is a detailed page for getting your API and Secret Key.
Postback Examples (GET):
<?php
$secret = "SECRET_KEY"; // Get your secret from placement settings
$subId = isset($_GET['subId']) ? $_GET['subId'] : null;
$transId = isset($_GET['transId']) ? $_GET['transId'] : null;
$reward = isset($_GET['reward']) ? $_GET['reward'] : null;
$signature = isset($_GET['signature']) ? $_GET['signature'] : null;
// Validate Signature
if(md5($subId . $transId . $reward . $secret) != $signature)
{
echo "ERROR: Signature doesn't match";
return;
}
// Further processing can be done here
echo "Signature is valid. Process the postback.";
?>
Our servers wait for a response for a maximum time of 30 seconds before the timeout. In this case, postback will be marked as failed. Please, check if the transaction ID sent to you was already entered in your database, this will prevent to give twice the same amount of virtual currency to the user.
IPs to whitelist
We will be sending the postbacks from any of the following IP address(es). Please make sure they are whitelisted if needed to be in your server.
Respond to Postback
Our servers will expect your website to respond with "ok". If your postback doesn't return "ok" as response, postback will be marked as failed (even if postback was successfully called) and you will be able to resend it manually from Revtoo.
Last updated