Call back URL Not sure what to do

Hello,

I also need to create a call back url that will give a glacierbux to my members once they watched a video. In order for this to work. I need to do a call back url. I am not really sure how to do this. I have created a php file
[php]<?php
include(‘inc/config.php’);
$con = mysql_connect($dbhost,$dbuser,$dbpass);
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
mysql_select_db($dbname);

session_start();

$usrid = $_SESSION[“userid”];

mysql_query($sql);

{
$sql=“Update oto_members set glacierbux=glacierbux+10 where Id=$usrid limit 1”;
mysql_query($sql);
}
?>[/php]

then i put the call back url as http://domain.com/phpfile.php and that didn’t work. I know i am doing this wrong just not sure what I need to do to fix this.

here is info for structure for the call back url

URL can contain the following placeholders:
[USER_ID], [TRACKING_ID], [REWARD], [REWARD_USD], [TIMESTAMP], [SIGNATURE]

I believe it needs those to work.

Thanks in advance

I never heard of glacierbux, what is it I’m curious?

But most call back URL sends information as QueryString parameters with and you’ll need to collect the information.

If these are the Parameters…

[USER_ID], [TRACKING_ID], [REWARD], [REWARD_USD], [TIMESTAMP], [SIGNATURE]

Then in your callback URL http://domain.com/phpfile.php

You should be able to retrieve those variables and use them in your update statement.

[php]
$usrid = $_GET[‘USER_ID’];
$trackingid = $_GET[‘TRACKING_ID’];
$reward = $_GET[‘REWARD’];
$rewardusd = $_GET[‘REWARD_USD’];
$timestamp = $_GET[‘TIMESTAMP’];
$signature= $_GET[‘SIGNATURE’];
[/php]

That’s the way the callback works for the Paypal IPN, so I’m assuming it’s the same.

Sponsor our Newsletter | Privacy Policy | Terms of Service