<?php
/*
clickandbuy_ems_push_endpoint.php
xt:Commerce ClickandBuy Payment Module
(c) 2008 Matthias Bauer / Trust in Dialog <http://www.trustindialog.de/>
@author Matthias Bauer <m.bauer@trustindialog.de>
@copyright (c) 2008 Matthias Bauer / Trust in Dialog
@version $Revision$
@license GPLv2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
require_once('ext/clickandbuy/lib/xml_parser.php');
include_once('includes/configure.php');
include_once('includes/filenames.php');
require_once(DIR_FS_INC.'xtc_db_connect.inc.php');
require_once(DIR_FS_INC.'xtc_db_close.inc.php');
require_once(DIR_FS_INC.'xtc_db_error.inc.php');
require_once(DIR_FS_INC.'xtc_db_perform.inc.php');
require_once(DIR_FS_INC.'xtc_db_query.inc.php');
require_once(DIR_FS_INC.'xtc_db_queryCached.inc.php');
require_once(DIR_FS_INC.'xtc_db_fetch_array.inc.php');
require_once(DIR_FS_INC.'xtc_db_num_rows.inc.php');
require_once(DIR_FS_INC.'xtc_db_data_seek.inc.php');
require_once(DIR_FS_INC.'xtc_db_insert_id.inc.php');
require_once(DIR_FS_INC.'xtc_db_free_result.inc.php');
require_once(DIR_FS_INC.'xtc_db_fetch_fields.inc.php');
require_once(DIR_FS_INC.'xtc_db_output.inc.php');
require_once(DIR_FS_INC.'xtc_db_input.inc.php');
require_once(DIR_FS_INC.'xtc_db_prepare_input.inc.php');
xtc_db_connect();
function find_node($root, $tagName) {
$res= array();
foreach ($root->tagChildren as $child) {
$res= array_merge($res, find_node($child, $tagName));
if ($child->tagName == $tagName) array_push($res, $child);
}
return $res;
}
$postData = $_POST['xml'];
if (!$postData) die('ERROR no data');
if (get_magic_quotes_gpc()) $postData = stripslashes($postData);
/* Parse the XML */
$parser = new XMLParser($postData);
$parser->parse();
$doc = $parser->document;
/* Extract the info we want */
$crn = $doc->global[0]->crn[0]->tagData;
$type = $doc->tagChildren[1]->tagName;
$datetime = $doc->global[0]->datetime[0]->tagData;
if ($datetime) {
$datetime = vsprintf('%s%s-%s-%s %s:%s:%s', explode('|', chunk_split($datetime, 2, '|')));
}
$qr = false;
switch (strtolower($type)) {
case 'bdr':
$bdr_data = $doc->bdr[0]->bdr_data[0];
$BDRID = $bdr_data->bdr_id[0]->tagData;
$externalBDRID = $bdr_data->externalbdrid[0]->tagData;
$action = $bdr_data->action[0]->tagData;
$state = $action;
$qr = xtc_db_query(vsprintf("INSERT INTO orders_clickandbuy_ems (tst_received, datetime, type, xml, externalBDRID, BDRID, crn, action) VALUES (NOW(), '%s', '%s', '%s', '%s', %d, %d, '%s')", array_map('mysql_escape_string', array($datetime, $type, $postData, $externalBDRID, $BDRID, $crn, $state))));
break;
default:
$action = find_node($doc->tagChildren[1], 'action');
$state = $action ? $action[0]->tagData : 'other';
$qr = xtc_db_query(vsprintf("INSERT INTO orders_clickandbuy_ems (tst_received, datetime, type, xml, crn, action) VALUES (NOW(), '%s', '%s', '%s', %d, '%s')", array_map('mysql_escape_string', array($datetime, $type, $postData, $crn, $state))));
break;
}
if ($qr !== false) print('OK'); else print('ERROR');
?>| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| PdfCreator/ | 2013-11-12 21:09 | 202.72 KB | 76129f60960:kunden | dxwrx-rx-r | |
| StyleEdit/ | 2013-11-12 21:10 | 1.42 MB | 76129f60960:kunden | dxwrx-rx-r | |
| actindo/ | 2013-11-12 20:52 | 340.67 KB | 76129f60960:kunden | dxwrx-rx-r | |
| admin/ | 2013-11-12 20:53 | 16.69 MB | 76129f60960:kunden | dxwrx-rx-r | |
| cache/ | 2025-01-28 22:35 | 150.58 KB | 76129f60960:kunden | dxwrx-rx-r | |
| callback/ | 2013-11-12 21:01 | 390.73 KB | 76129f60960:kunden | dxwrx-rx-r | |
| download/ | 2025-01-28 22:35 | 109 B | 76129f60960:kunden | dxwrx-rx-r | |
| export/ | 2013-11-12 22:46 | 179.73 KB | 76129f60960:kunden | dxwrx-rx-r | |
| ext/ | 2013-11-12 21:01 | 271.04 KB | 76129f60960:kunden | dxwrx-rx-r | |
| gm/ | 2013-11-12 21:03 | 2.27 MB | 76129f60960:kunden | dxwrx-rx-r | |
| iclear/ | 2013-11-12 21:04 | 1.05 MB | 76129f60960:kunden | dxwrx-rx-r | |
| images/ | 2013-11-14 15:48 | 11.41 MB | 76129f60960:kunden | dxwrx-rx-r | |
| import/ | 2013-11-12 21:05 | 2 B | 76129f60960:kunden | dxwrx-rx-r | |
| inc/ | 2013-11-12 21:05 | 349.91 KB | 76129f60960:kunden | dxwrx-rx-r | |
| includes/ | 2025-01-28 22:35 | 3.75 MB | 76129f60960:kunden | dxwrx-rx-r | |
| lang/ | 2013-11-12 21:07 | 1.95 MB | 76129f60960:kunden | dxwrx-rx-r | |
| lettr/ | 2025-01-28 22:35 | 25.98 KB | 76129f60960:kunden | dxwrx-rx-r | |
| logfiles/ | 2018-07-12 04:18 | 330.63 KB | 76129f60960:kunden | dxwrx-rx-r | |
| media/ | 2013-11-12 22:32 | 15.49 KB | 76129f60960:kunden | dxwrx-rx-r | |
| promo/ | 2013-11-12 21:09 | 119.04 KB | 76129f60960:kunden | dxwrx-rx-r | |
| pub/ | 2025-01-28 22:35 | 38 B | 76129f60960:kunden | dxwrx-rx-r | |
| shopgate/ | 2025-01-28 22:35 | 811.32 KB | 76129f60960:kunden | dxwrx-rx-r | |
| system/ | 2013-11-12 21:11 | 678.06 KB | 76129f60960:kunden | dxwrx-rx-r | |
| templates/ | 2013-11-12 21:11 | 1.71 MB | 76129f60960:kunden | dxwrx-rx-r | |
| templates_c/ | 2017-11-16 23:11 | 158.67 KB | 76129f60960:kunden | dxwrx-rx-r | |
| user_classes/ | 2013-11-12 21:14 | 12.3 KB | 76129f60960:kunden | dxwrx-rx-r | |
| .DS_Store | 2013-11-12 20:51 | 24 KB | 76129f60960:kunden | -xw-x----- | |
| .htaccess | 2025-01-28 22:35 | 99 B | 76129f60960:kunden | -xw-x----- | |
| LICENSE.txt | 2013-11-12 20:52 | 17.83 KB | 76129f60960:kunden | -xw-x----- | |
| LIZENZUEBERSETZUNG.txt | 2013-11-12 20:52 | 25.33 KB | 76129f60960:kunden | -xw-x----- | |
| WICHTIGE_HINWEISE.txt | 2013-11-12 20:52 | 1.87 KB | 76129f60960:kunden | -xw-x----- | |
| account.php | 2013-11-12 20:51 | 1.93 KB | 76129f60960:kunden | -xw-x----- | |
| account_edit.php | 2013-11-12 20:51 | 16.32 KB | 76129f60960:kunden | -xw-x----- | |
| account_history.php | 2013-11-12 20:51 | 5 KB | 76129f60960:kunden | -xw-x----- | |
| account_history_info.php | 2013-11-12 20:51 | 6.57 KB | 76129f60960:kunden | -xw-x----- | |
| account_password.php | 2013-11-12 20:51 | 7.01 KB | 76129f60960:kunden | -xw-x----- | |
| address_book.php | 2013-11-12 20:51 | 1.81 KB | 76129f60960:kunden | -xw-x----- | |
| address_book_process.php | 2013-11-12 20:51 | 16.86 KB | 76129f60960:kunden | -xw-x----- | |
| advanced_search.php | 2013-11-12 20:51 | 1.63 KB | 76129f60960:kunden | -xw-x----- | |
| advanced_search_result.php | 2013-11-12 20:51 | 12.1 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_confirmation.php | 2013-11-12 20:51 | 27.82 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_iclear.php | 2013-11-12 20:51 | 8.82 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_payment.php | 2013-11-12 20:51 | 16.71 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_payment_address.php | 2013-11-12 20:51 | 12.14 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_process.php | 2013-11-12 20:51 | 36.23 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_qpay.php | 2013-11-12 20:51 | 2.67 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_shipping.php | 2013-11-12 20:51 | 14.43 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_shipping_address.php | 2013-11-12 20:51 | 12.66 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_success.php | 2013-11-12 20:51 | 5.89 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_vrepay_elv.php | 2013-11-12 20:51 | 2.3 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_vrepay_giropay.php | 2013-11-12 20:51 | 1.52 KB | 76129f60960:kunden | -xw-x----- | |
| checkout_vrepay_kreditkarte.php | 2013-11-12 20:51 | 2.33 KB | 76129f60960:kunden | -xw-x----- | |
| clickandbuy_check.php | 2013-11-12 20:51 | 3.94 KB | 76129f60960:kunden | -xw-x----- | |
| clickandbuy_ems_push_endpoint.php | 2013-11-12 20:51 | 3.48 KB | 76129f60960:kunden | -xw-x----- | |
| cookie_usage.php | 2013-11-12 20:51 | 1.92 KB | 76129f60960:kunden | -xw-x----- | |
| cout_qpay_iframe.php | 2013-11-12 20:51 | 1 KB | 76129f60960:kunden | -xw-x----- | |
| create_account.php | 2013-11-12 20:51 | 38.03 KB | 76129f60960:kunden | -xw-x----- | |
| create_guest_account.php | 2013-11-12 20:51 | 31.6 KB | 76129f60960:kunden | -xw-x----- | |
| display_vvcodes.php | 2013-11-12 20:51 | 750 B | 76129f60960:kunden | -xw-x----- | |
| download.php | 2013-11-12 20:51 | 3.75 KB | 76129f60960:kunden | -xw-x----- | |
| fax.html | 2013-11-12 20:51 | 3.99 KB | 76129f60960:kunden | -xw-x----- | |
| gm_account_delete.php | 2013-11-12 20:51 | 2.92 KB | 76129f60960:kunden | -xw-x----- | |
| gm_ajax.php | 2013-11-12 20:51 | 1.82 KB | 76129f60960:kunden | -xw-x----- | |
| gm_corner.gif.php | 2013-11-12 20:51 | 3.39 KB | 76129f60960:kunden | -xw-x----- | |
| gm_counter.php | 2013-11-12 20:51 | 143 B | 76129f60960:kunden | -xw-x----- | |
| gm_counter_set_screen.php | 2013-11-12 20:51 | 1.16 KB | 76129f60960:kunden | -xw-x----- | |
| gm_create_vvcodes.php | 2013-11-12 20:51 | 533 B | 76129f60960:kunden | -xw-x----- | |
| gm_css_monitor.php | 2013-11-12 20:51 | 8.94 KB | 76129f60960:kunden | -xw-x----- | |
| gm_ebay.php | 2013-11-12 20:51 | 917 B | 76129f60960:kunden | -xw-x----- | |
| gm_gprint.js.php | 2013-11-12 20:51 | 1002 B | 76129f60960:kunden | -xw-x----- | |
| gm_gprint_ajax.php | 2013-11-12 20:52 | 38.48 KB | 76129f60960:kunden | -xw-x----- | |
| gm_gprint_download.php | 2013-11-12 20:52 | 1.76 KB | 76129f60960:kunden | -xw-x----- | |
| gm_gprint_order_ajax.php | 2013-11-12 20:52 | 1.47 KB | 76129f60960:kunden | -xw-x----- | |
| gm_guestbook.php | 2013-11-12 20:52 | 2.52 KB | 76129f60960:kunden | -xw-x----- | |
| gm_javascript.js.php | 2013-11-12 20:52 | 4.3 KB | 76129f60960:kunden | -xw-x----- | |
| gm_opensearch.php | 2013-11-12 20:52 | 718 B | 76129f60960:kunden | -xw-x----- | |
| gm_price_offer.php | 2013-11-12 20:52 | 1.57 KB | 76129f60960:kunden | -xw-x----- | |
| gm_privacy.php | 2013-11-12 20:52 | 3.2 KB | 76129f60960:kunden | -xw-x----- | |
| gm_product_export_cron.php | 2013-11-12 20:52 | 4.4 KB | 76129f60960:kunden | -xw-x----- | |
| gv_redeem.php | 2013-11-12 20:52 | 3.84 KB | 76129f60960:kunden | -xw-x----- | |
| gv_send.php | 2013-11-12 20:52 | 9.58 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_3dsecure.php | 2013-11-12 20:52 | 966 B | 76129f60960:kunden | -xw-x----- | |
| heidelpay_3dsecure_return.php | 2013-11-12 20:52 | 1.5 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_checkout_iframe.php | 2013-11-12 20:52 | 1.19 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_iframe.php | 2013-11-12 20:52 | 1.24 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_redirect.php | 2013-11-12 20:52 | 2.68 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_response.php | 2013-11-12 20:52 | 3.95 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_style.css | 2013-11-12 20:52 | 1.27 KB | 76129f60960:kunden | -xw-x----- | |
| heidelpay_success.php | 2013-11-12 20:52 | 4.6 KB | 76129f60960:kunden | -xw-x----- | |
| index.php | 2013-11-12 20:52 | 5.89 KB | 76129f60960:kunden | -xw-x----- | |
| login.php | 2013-11-12 20:52 | 2.63 KB | 76129f60960:kunden | -xw-x----- | |
| login_admin.php | 2013-11-12 20:52 | 6.06 KB | 76129f60960:kunden | -xw-x----- | |
| login_mobile.php | 2013-11-12 20:52 | 3.75 KB | 76129f60960:kunden | -xw-x----- | |
| logoff.php | 2013-11-12 20:52 | 2.1 KB | 76129f60960:kunden | -xw-x----- | |
| magnaCallback.php | 2013-11-12 20:52 | 20.86 KB | 76129f60960:kunden | -xw-x----- | |
| magnalister_compatibility_check.php | 2013-11-12 20:52 | 17.23 KB | 76129f60960:kunden | -xw-x----- | |
| media_content.php | 2013-11-12 20:52 | 2.6 KB | 76129f60960:kunden | -xw-x----- | |
| mkd_@_.html | 2014-05-29 21:30 | 5.84 KB | 76129f60960:kunden | -xw-x----- | |
| moneybookers_iframe.php | 2013-11-12 20:52 | 3.07 KB | 76129f60960:kunden | -xw-x----- | |
| newsletter.php | 2013-11-12 20:52 | 10.64 KB | 76129f60960:kunden | -xw-x----- | |
| notify_vrepay_elv.php | 2013-11-12 20:52 | 3.72 KB | 76129f60960:kunden | -xw-x----- | |
| notify_vrepay_giropay.php | 2013-11-12 20:52 | 3.77 KB | 76129f60960:kunden | -xw-x----- | |
| notify_vrepay_kreditkarte.php | 2013-11-12 20:52 | 3.81 KB | 76129f60960:kunden | -xw-x----- | |
| password_double_opt.php | 2013-11-12 20:52 | 11.65 KB | 76129f60960:kunden | -xw-x----- | |
| paypal_api_check.php | 2013-11-12 20:52 | 7.37 KB | 76129f60960:kunden | -xw-x----- | |
| paypal_checkout.php | 2013-11-12 20:52 | 39.45 KB | 76129f60960:kunden | -xw-x----- | |
| popup_content.php | 2013-11-12 20:52 | 3.3 KB | 76129f60960:kunden | -xw-x----- | |
| popup_coupon_help.php | 2013-11-12 20:52 | 5.08 KB | 76129f60960:kunden | -xw-x----- | |
| popup_cvv.php | 2013-11-12 20:52 | 2.69 KB | 76129f60960:kunden | -xw-x----- | |
| popup_image.php | 2013-11-12 20:52 | 5.03 KB | 76129f60960:kunden | -xw-x----- | |
| popup_search_help.php | 2013-11-12 20:52 | 1.64 KB | 76129f60960:kunden | -xw-x----- | |
| print_order.php | 2013-11-12 20:52 | 3.23 KB | 76129f60960:kunden | -xw-x----- | |
| print_product_info.php | 2013-11-12 20:52 | 7.29 KB | 76129f60960:kunden | -xw-x----- | |
| product_info.php | 2013-11-12 20:52 | 2.63 KB | 76129f60960:kunden | -xw-x----- | |
| product_reviews.php | 2013-11-12 20:52 | 4.58 KB | 76129f60960:kunden | -xw-x----- | |
| product_reviews_info.php | 2013-11-12 20:52 | 4.92 KB | 76129f60960:kunden | -xw-x----- | |
| product_reviews_write.php | 2013-11-12 20:52 | 7.13 KB | 76129f60960:kunden | -xw-x----- | |
| products_new.php | 2013-11-12 20:52 | 8.04 KB | 76129f60960:kunden | -xw-x----- | |
| redirect.php | 2013-11-12 20:52 | 3.77 KB | 76129f60960:kunden | -xw-x----- | |
| release_info.php | 2013-11-12 20:52 | 82 B | 76129f60960:kunden | -xw-x----- | |
| request_port.php | 2013-11-12 20:52 | 5.4 KB | 76129f60960:kunden | -xw-x----- | |
| reviews.php | 2013-11-12 20:52 | 4.25 KB | 76129f60960:kunden | -xw-x----- | |
| robots.txt | 2013-11-12 20:52 | 3.36 KB | 76129f60960:kunden | -xw-x----- | |
| send_order.php | 2013-11-12 20:52 | 9.69 KB | 76129f60960:kunden | -xw-x----- | |
| shop_content.php | 2013-11-12 20:52 | 8.22 KB | 76129f60960:kunden | -xw-x----- | |
| shopping_cart.php | 2013-11-12 20:52 | 2.08 KB | 76129f60960:kunden | -xw-x----- | |
| show_product_thumbs.php | 2013-11-12 20:52 | 2.33 KB | 76129f60960:kunden | -xw-x----- | |
| sitemap1.xml | 2013-11-14 19:16 | 2.04 KB | 76129f60960:kunden | -xw-x----- | |
| specials.php | 2013-11-12 20:52 | 5.02 KB | 76129f60960:kunden | -xw-x----- | |
| ssl_check.php | 2013-11-12 20:52 | 1.9 KB | 76129f60960:kunden | -xw-x----- | |
| stylesheet_new.css | 2013-11-12 20:52 | 26.88 KB | 76129f60960:kunden | -xw-x----- | |
| vrepay_kreditkarte.php | 2013-11-12 20:52 | 26.35 KB | 76129f60960:kunden | -xw-x----- | |
| wish_list.php | 2013-11-12 20:52 | 2.28 KB | 76129f60960:kunden | -xw-x----- | |
| wpcallback.php | 2013-11-12 20:52 | 3.5 KB | 76129f60960:kunden | -xw-x----- | |
| xtbcallback.php | 2013-11-12 20:52 | 12.48 KB | 76129f60960:kunden | -xw-x----- | |
| yatego.php | 2013-11-12 20:52 | 1.36 KB | 76129f60960:kunden | -xw-x----- | |