This can be handy for a variety of uses. Once you have your order information locally, the possibilities are endless.
<? # schema: # CREATE TABLE CREATE TABLE `foxy_orders` ( # `id` int(11) NOT NULL auto_increment, # `order_id` int(11) default NULL, # `foxy_data` text NOT NULL, # `created_at` datetime NOT NULL default '0000-00-00 00:00:00', # `processed_at` datetime default NULL, # PRIMARY KEY (`id`) # ) ENGINE=MyISAM AUTO_INCREMENT=227 DEFAULT CHARSET=utf8 // // Finally, set your key to decrypt the XML that you receive from FoxyCart. // This must match *exactly* what you entered at http://www.foxycart.com/admin $key = "abracadabra"; if (isset($_POST["FoxyData"])) { // =================================================================================================== // DECRYPT YOUR DATA // (do not modify) // =================================================================================================== // Decrypt the data using your $key // First, include the rc4crypt.php file include 'class.rc4crypt.php'; // Then decrypt the XML $FoxyData_encrypted = urldecode($_POST["FoxyData"]); $FoxyData_decrypted = rc4crypt::decrypt($key,$FoxyData_encrypted); // =================================================================================================== if (!mysql_connect('DBHOST', 'DBUSER', 'DBPASS')) die("no connection to MySQL"); if (!mysql_select_db('not4sale_production')) die("couldn't select database"); mysql_query("INSERT INTO foxy_orders (created_at,foxy_data) VALUES (NOW(),'".mysql_escape_string($FoxyData_decrypted) ."')"); echo "foxy"; } else { echo "no post data!"; } ?>