-
Notifications
You must be signed in to change notification settings - Fork 0
/
iloxx_track.php
39 lines (32 loc) · 1.74 KB
/
iloxx_track.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/* --------------------------------------------------------------
iloxx_track.php 2014-11-25 gambio
Gambio GmbH
http://www.gambio.de
Copyright (c) 2012 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(ot_cod_fee.php,v 1.02 2003/02/24); www.oscommerce.com
(C) 2001 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers ; http://www.themedia.at & http://www.oscommerce.at
(c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: ot_cod_fee.php 1003 2005-07-10 18:58:52Z mz $)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once 'includes/application_top.php';
header('Content-Type: text/plain');
$iloxx = new GMIloxx();
$iloxx->log('Track: '. $_SERVER['REQUEST_URI']);
$key_valid = isset($_GET['key']) && $iloxx->verifyTrackingKey($_GET['key']);
$order_id = isset($_GET['order_id']) && is_numeric($_GET['order_id']) ? $_GET['order_id'] : false;
$tracking_data = array(
'iloxxtrackid' => isset($_GET['iloxxtrackid']) ? $_GET['iloxxtrackid'] : false,
'iloxxstatusid' => isset($_GET['iloxxstatusid']) ? $_GET['iloxxstatusid'] : false,
'iloxxstatusdate' => isset($_GET['iloxxstatusdate']) ? $_GET['iloxxstatusdate'] : false,
'iloxxorderprice' => isset($_GET['iloxxorderprice']) ? $_GET['iloxxorderprice'] : false,
);
if($key_valid && $order_id !== false) {
$iloxx->recordTrackingEvent($order_id, $tracking_data);
echo "Tracking event received - OK.";
}