If you plan to run clickbank through voluum, here’s how to post back data.

1) Create a PHP file with this code. Be sure to change the following placeholders…

YOUR_CLICKBANK_SECRET_KEY Whatever Secret key you want. What’s most important is you don’t share this key with anyone.
FROM_EMAIL_ADDRESS_GOES_HERE The from email address for the email notification.
Name@Example.com The email address where you want to receive notifications of a postback. It’s important to have a back-up method of notification as there are some instances where a postback doesn’t populate voluum. This will give you the attempted voluum postback URL so you can try to postback again.

<?PHP

function GenerateVerification()
{
$secretKey=”YOUR_CLICKBANK_SECRET_KEY”;
$pop = “”;
$ipnFields = array();
foreach ($_POST as $key => $value)
{
if ($key == “cverify”)
{
continue;
}
$ipnFields = $key;
}
sort($ipnFields);
foreach ($ipnFields as $field)
{
// if Magic Quotes are enabled $_POST will need to be
// un-escaped before being appended to $pop
$pop = $pop . $_POST . “|”;
}
$pop = $pop . $secretKey;
$calcedVerify = sha1(mb_convert_encoding($pop, “UTF-8”));
$calcedVerify = strtoupper(substr($calcedVerify,0,8));

return $calcedVerify;
}

$_RESULT = GenerateVerification();

if($_RESULT == $_POST)
{
//Transaction is real
echo “Successful Transaction”;

//EMAIL FROM
$EMAIL_FRO ...

This thread has 26 more replies.
WANT TO SEE THE REST?

Join STM Forum