<?php
require_once '../functions.php';
//$request = implode(' | ', $_REQUEST);
$request = 'REQUEST: ' . "\n";
foreach ($_REQUEST as $var => $val) {
	$request .= $var . ' = ' . $val . ' | ' . "\n";
}
$request .= "\n" . 'POST: ' . "\n";
foreach ($_POST as $var => $val) {
	$request .= $var . ' = ' . $val . ' | ' . "\n";
}
$request .= "\n" . 'GET: ' . "\n";
foreach ($_GET as $var => $val) {
	$request .= $var . ' = ' . $val . ' | ' . "\n";
}
$request .= "\n" . "URL : " . "\n" . $_SERVER['REQUEST_URI'];
$db = connect();

if ($db) {
	$query = "INSERT INTO notifications SET type = 'ALLOPASS - ".$_REQUEST['type']." - ".$_REQUEST['customer_country']."', message = '" . $request . "'" ;
	$result = mysql_query($query);
	if ($result) {
		echo "saved";
	}
}
else echo "not saved";

$RECALL = $_GET["RECALL"];
if (!empty($RECALL)) {
	$AUTH = urlencode( "222616/879233/4096001" );
  	$r = @file( "http://payment.allopass.com/api/checkcode.apu?code=$RECALL&auth=$AUTH" );
	echo "<br><br>Recall = ".$RECALL."<br>AUTH : " . $AUTH . "<br>File : ";
	var_dump($r);
}
echo "<pre>";
var_dump($_REQUEST);
echo "</pre>";
// jabella CB : 1234548041728642
// jabella@hi-media.com
// Taatu CB : 1234319058240286

// [12:01:35] Mickael [Hi-media Payments]: 1234456470961326
// http://payelex.appspot.com/list_channels?app_id=7f5d1e8c9b26f00ef80621744c21012b&uid=40908839

// https://payment.allopass.com/buy/buy.apu?ids=222616&idd=879233&forward_target=current&bundle_purchase=0&type=dineromail&access_form=0
?>