Managed Server
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Trusted Shop Einbindung - Zahlungsarten werden nicht übernommen.

    sattom

    • Neu im Forum
    • Beiträge: 17
    habe nach vielen erfolglosen versuchen den Trusted Shop Verkäuferschutz eingebunden und zwar aus
    diesen Thread http://www.modified-shop.org/forum/index.php?topic=18462.0

    die nachfolgende Datei * checkout_success.zip

    checkout_success.php
    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: checkout_success.php 896 2005-04-27 19:22:59Z mz $

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(checkout_success.php,v 1.48 2003/02/17); www.oscommerce.com
       (c) 2003         nextcommerce (checkout_success.php,v 1.14 2003/08/17); www.nextcommerce.org

       Released under the GNU General Public License
       -----------------------------------------------------------------------------------------
       Third Party contribution:

       Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
       http://www.oscommerce.com/community/contributions,282
       Copyright (c) Strider | Strider@oscworks.com
       Copyright (c  Nick Stanko of UkiDev.com, nick@ukidev.com
       Copyright (c) Andre ambidex@gmx.net
       Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org


       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


    include ('includes/application_top.php');
    // create smarty elements
    $smarty = new Smarty;
    // include boxes
    require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');

    // BOF - GTB - 2011-04-12 - changes for Guest Account
    // if the customer is not logged on, redirect them to the shopping cart page
    /*
    if (!isset ($_SESSION['customer_id'])) {
      xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
    }
    */

    if (isset ($_GET['action']) && ($_GET['action'] == 'update')) {

            if ($_POST['account_type'] != 1) {
      //if ($_SESSION['account_type'] != 1) {
        //BOF - web28.de - FIX redirect to NONSSL
        //xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
        xtc_redirect(xtc_href_link(FILENAME_DEFAULT),'NONSSL');
        //EOF - web28.de - FIX redirect to NONSSL
      } else {
        //xtc_redirect(xtc_href_link(FILENAME_LOGOFF));
        xtc_redirect(xtc_href_link(FILENAME_LOGOFF), 'NONSSL');
      }
    }

    // if the customer is not logged on, redirect them to the shopping cart page
    if (!isset ($_SESSION['customer_id'])) {
      xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART), 'NONSSL');
    }
    // EOF - GTB - 2011-04-12 - changes for Guest Account

    $breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SUCCESS);
    $breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SUCCESS);

    require (DIR_WS_INCLUDES.'header.php');

    $orders_query = xtc_db_query("select orders_id,currency,customers_email_address,payment_class
                                         orders_status
                                  from "
    .TABLE_ORDERS."
                                  where customers_id = '"
    .$_SESSION['customer_id']."'
                                  order by orders_id desc limit 1"
    );
    $orders = xtc_db_fetch_array($orders_query);
    $last_order = $orders['orders_id'];
    $order_status = $orders['orders_status'];

    /* TRUST ADDON BEGIN */
    $smarty->assign('ORDER_ID', $last_order);
    $smarty->assign('ORDER_KDNR', $_SESSION['customer_id']);
    $smarty->assign('ORDER_CURR', $orders['currency']);
    $smarty->assign('ORDER_MAIL', $orders['customers_email_address']);

    /* ZAHLUNGSART
    Lastschrift/Bankeinzug          DIRECT_DEBIT
    Kreditkarte                     CREDIT_CARD
    Rechnung                        INVOICE
    Nachnahme                       CASH_ON_DELIVERY
    Vorauskasse / Ãœberweisung       PREPAYMENT
    Verrechnungsscheck              HEQUE
    Paybox                          PAYBOX
    PayPal                          PAYPAL
    Zahlung bei Abholung            CASH_ON_PICKUP
    Finanzierung                    FINANCING
    Leasing                         LEASING
    T-Pay                           T_PAY
    Click&Buy (Firstgate)           CLICKANDBUY
    Giropay                         GIROPAY
    Google Checkout                 GOOGLE_CHECKOUT
    Online Shop Zahlungskarte       SHOP_CARD
    Sofortüberweisung.de            DIRECT_E_BANKING
    Moneybookers.com                MONEYBOOKERS
    Andere Zahlungsart              OTHER
    */



    switch ($orders['payment_class'])
    {
        case 'paypal_ipn':
                            $paymenttype = 'PAYPAL';
            break;
        case 'banktransfer':
                            $paymenttype = 'DIRECT_DEBIT';
            break;
        case 'moneyorder':
                            $paymenttype = 'PREPAYMENT';
            break;
        case 'cash':
                            $paymenttype = 'CASH_ON_PICKUP';
            break;
        case 'cod':
                            $paymenttype = 'CASH_ON_DELIVERY';
            break;
        case 'moneybookers_sft':
                            $paymenttype = 'DIRECT_E_BANKING';
            break;
            default:
                            $paymenttype = '';
                    break;
    }
    $smarty->assign('ORDER_PAYMENTTYPE', $paymenttype);


    // get order_total data
    require (DIR_WS_CLASSES . 'order.php');
    $order = new order($last_order);
    $order_total = $order->getTotalData($last_order);
    $ORDER_AMOUNT = $xtPrice->xtcFormat($order_total['total'],false);
    $smarty->assign('ORDER_AMOUNT', $ORDER_AMOUNT);
    /* TRUST ADDON END */


    //BOF  - web28 - 2010-03-27 PayPal Bezahl-Link
    if (isset($_SESSION['paypal_link']) && MODULE_PAYMENT_PAYPAL_IPN_USE_CHECKOUT == 'True') {
            $smarty->assign('PAYPAL_LINK',$_SESSION['paypal_link']);
        unset ($_SESSION['paypal_link']);
    }
    //EOF  - web28 - 2010-03-27 PayPal Bezahl-Link

    // BOF - GTB - 2011-04-12 - changes for Guest Account
    // $smarty->assign('FORM_ACTION', xtc_draw_form('order', xtc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')));
    $smarty->assign('FORM_ACTION', xtc_draw_form('order', xtc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')).xtc_draw_hidden_field('account_type', $_SESSION['account_type']));
    // EOF - GTB - 2011-04-12 - changes for Guest Account
    //BOF - Dokuman - 2009-11-23 - Make the print preview clickable, i.e. change mouse cursor to hand symbol
    $smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
    //$smarty->assign('BUTTON_PRINT', '<img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" style="cursor:pointer" onclick="window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')" />');
    //BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable
    //$smarty->assign('BUTTON_PRINT', '<a style="cursor:pointer" onclick="javascript:window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')"><img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" alt="'.TEXT_PRINT.'" /></a>');
    //BOF - GTB - 2010-09-15 - change Print Button to Form for Guests
    //$smarty->assign('BUTTON_PRINT', '<a style="cursor:pointer" onclick="javascript:window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600\')"><img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" alt="'.TEXT_PRINT.'" /></a>');
    $smarty->assign('FORM_ACTION_PRINT', xtc_draw_form('print_order', xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id'], 'SSL'), 'post', 'target="popup" onsubmit="javascript:window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id'], 'SSL').'\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600\')"').xtc_draw_hidden_field('customer_id', $_SESSION['customer_id']));
    $smarty->assign('BUTTON_PRINT', xtc_image_submit('print.gif', TEXT_PRINT));
    //EOF - GTB - 2010-09-15 - change Print Button to Form for Guests
    //EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable
    //EOF - Dokuman - 2009-11-23 - Make the print preview clickable, i.e. change mouse cursor to hand symbol

    $smarty->assign('FORM_END', '</form>');
    // GV Code Start
    $gv_query = xtc_db_query("select amount from ".TABLE_COUPON_GV_CUSTOMER." where customer_id='".$_SESSION['customer_id']."'");
    if ($gv_result = xtc_db_fetch_array($gv_query)) {
            if ($gv_result['amount'] > 0) {
                    $smarty->assign('GV_SEND_LINK', xtc_href_link(FILENAME_GV_SEND));
            }
    }
    // GV Code End
    // Google Conversion tracking
    if (GOOGLE_CONVERSION == 'true') {

            $smarty->assign('google_tracking', 'true');
            $smarty->assign('tracking_code', '
                    <noscript>
                    <a href="http://services.google.com/sitestats/'
    .GOOGLE_LANG.'.html" onclick="window.open(this.href); return false;">
                    <img height=27 width=135 border=0 src="http://www.googleadservices.com/pagead/conversion/'
    .GOOGLE_CONVERSION_ID.'/?hl='.GOOGLE_LANG.'" />
                    </a>
                    </noscript>
                        '
    );
    }

    if (DOWNLOAD_ENABLED == 'true') {
            include (DIR_WS_MODULES.'downloads.php');
    }

    //BOF - DokuMan - 2010-05-20 - Move guest deletion from logoff to checkout_success
    //delete Guests from Database
    if (($_SESSION['account_type'] == 1) && (DELETE_GUEST_ACCOUNT == 'true')) {
       xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".$_SESSION['customer_id']."'");
       xtc_db_query("DELETE FROM ".TABLE_ADDRESS_BOOK." WHERE customers_id = '".$_SESSION['customer_id']."'");
       xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_INFO." WHERE customers_info_id = '".$_SESSION['customer_id']."'");
       xtc_session_destroy();
       unset ($_SESSION['customer_id']);
       unset ($_SESSION['customer_default_address_id']);
       unset ($_SESSION['customer_first_name']);
       unset ($_SESSION['customer_country_id']);
       unset ($_SESSION['customer_zone_id']);
       unset ($_SESSION['comments']);
       unset ($_SESSION['user_info']);
       unset ($_SESSION['customers_status']);
       unset ($_SESSION['selected_box']);
       unset ($_SESSION['navigation']);
       unset ($_SESSION['shipping']);
       unset ($_SESSION['payment']);
       unset ($_SESSION['ccard']);
       unset ($_SESSION['gv_id']);
       unset ($_SESSION['cc_id']);
       require (DIR_WS_INCLUDES.'write_customers_status.php');
    }
    //EOF - DokuMan - 2010-05-20 - Move guest deletion from logoff to checkout_success

    $smarty->assign('language', $_SESSION['language']);
    //BOF - DokuMan - 2010-08-31 - PAYMENT_BLOCK not needed in checkout success
    //$smarty->assign('PAYMENT_BLOCK', $payment_block);
    //EOF - DokuMan - 2010-08-31 - PAYMENT_BLOCK not needed in checkout success
    $main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_success.html');
    // BOF - Tomcraft - 2009-11-28 - Included xs:booster
    //$smarty->assign('main_content', $main_content);
    $smarty->assign('main_content', $main_content.(isset($_SESSION['xtb2'])?"<div style=\"text-align:center;padding:3px;margin-top:10px;font-weight:bold;\"><a style=\"text-decoration:underline;color:blue;\" href=\"./xtbcallback.php?reverse=true\">Zur&uuml;ck zur xs:booster Auktions&uuml;bersicht..</a></div>":""));
    // EOF - Tomcraft - 2009-11-28 - Included xs:booster
    $smarty->caching = 0;
    if (!defined('RM'))
            $smarty->load_filter('output', 'note');
    $smarty->display(CURRENT_TEMPLATE.'/index.html');
    include ('includes/application_bottom.php');
    ?>

    checkout_success.html
    Code: CSS  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="checkout_success"}
    {config_load file="$language/lang_$language.conf" section="checkout_navigation"}
    <ul id="checkoutnavigation">
      <li class="inactive"><span class="number">1.</span> <span class="title">{#title_shipping#}</span><br /><span class="description">{#desc_shipping#}</span></li>
      <li class="inactive"><span class="number">2.</span> <span class="title">{#title_payment#}</span><br /><span class="description">{#desc_payment#}</span></li>
      <li class="inactive"><span class="number">3.</span> <span class="title">{#title_confirmation#}</span><br /><span class="description">{#desc_confirmation#}</span></li>
      <li class="active"><span class="number">4.</span> <span class="title">{#title_success#}</span><br /><span class="description">{#desc_success#}</span></li>
    </ul>
    <div style="clear:both"></div>
    {* BOF - GTB - 2010-09-15 - change Print Button to Form *}
    {*$FORM_ACTION*}
    {* EOF - GTB - 2010-09-15 - change Print Button to Form *}
    <h1>{#heading_success#}</h1>
    <p>{#text_success#}</p>

    <table width=400 border="0" cellspacing="0" cellpadding="4">
    <tr>
    <td width="90">
            <form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
                    <input type="image" border="0" src="http://www.trustedshops.de/shopbetreiber/siegelbox/images/trustedshops_m.png" title="Trusted Shops Gütesiegel - Bitte hier Gültigkeitprüfen!">
                    <input name="shop_id" type="hidden" value="X698204E0E4159E782EDC288C8748CC84">
            </form>
    </td>


    <td align="justify">
            <form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
                    <input name="_charset_" type="hidden" value="">
                    <input name="shop_id" type="hidden" value="X698204E0E4159E782EDC288C8748CC84">
                    <input name="email" type="hidden" value="{$ORDER_MAIL}">
                    <input name="amount" type="hidden" value="{$ORDER_AMOUNT}">
                    <input name="curr" type="hidden" value="{$ORDER_CURR}">
                    <input name="paymentType" type="hidden" value="{$ORDER_PAYMENTTYPE}">
                    <input name="kdnr" type="hidden" value="{$ORDER_KDNR}">
                    <input name="ordernr" type="hidden" value="{$ORDER_ID}">Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.<br><br>
                    <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">
            </form>
    </td>
    </tr>
    </table>


    <h2>{#title_printorder#}</h2>
    <p>{#text_printorder#}<br />
    <strong>{#text_thankyou#}</strong></p>
    {if $GV_SEND_LINK}
    <p>{#gv_has_vouchera#} {$GV_SEND_LINK} {#gv_has_voucherb#}</p>
    {/if}
    {* BOF - web28 - 2010-03-27 PayPal Bezahl-Link *}
    {if $PAYPAL_LINK}
    <p><div style="background: #f2f2f2; color: #ffffff; padding:5px; border: 2px solid #496686">{$PAYPAL_LINK}</div></p>
    {/if}
    {* EOF - web28 - 2010-03-27 PayPal Bezahl-Link *}
    {* BOF - GTB - 2010-09-15 - change Print Button to Form *}
    {* <p>{$BUTTON_PRINT}&nbsp;{$BUTTON_CONTINUE}</p> *}
    {$FORM_ACTION_PRINT}
    <div style="float:left;">{$BUTTON_PRINT}</div>
    {$FORM_END}
    {$FORM_ACTION}
    <div style="float:left; padding-left:5px;">{$BUTTON_CONTINUE}</div>
    <div style="clear:left;"></div>
    {* EOF - GTB - 2010-09-15 - change Print Button to Form *}
    {if $downloads_content neq ''}
    {if $title_downloadfiles!=''}
    <h1>{#title_downloadfiles#}</h1>
    {/if}
    {$downloads_content}
    {/if}
    {* Google Conversion-tracking start *}
    {if $google_tracking eq 'true'}
    <p>{$tracking_code}</p>
    {/if}
    {* Google Conversion-tracking end *}
    {$FORM_END}

    soweit scheint es zu funktionieren - das einzigste problem sind die Zahlungsart die wird scheinbar
    nicht übertragen.

    habe jetzt schon einige beiträge durchprobiert und einiges getestet - bekomme es aber nicht hin

    kam mir hier jemand helfen ?

    Linkback: https://www.modified-shop.org/forum/index.php?topic=22797.0

    sattom

    • Neu im Forum
    • Beiträge: 17
    hat keiner eine idee für mich ?

    freidenker77

    • Frisch an Board
    • Beiträge: 69
    Re: Trusted Shop Einbindung - Zahlungsarten werden nicht übernommen.
    Antwort #2 am: 25. September 2013, 19:28:19
    Bei mir das gleiche Problem:

    habe Trusted Shops bei mir vollständig nach den jeweiligen Anleitungen intregiert und der Shop funktioniert noch :-).

    Die beiden Dateien checkout_success.html und checkout_success.php habe ich nach den Anleitungen verändert.

    Leider wird aber nur die Bestell-Nr. an TS übertragen und keine weiteren Daten (Preis, Kundenummer,E-Mail-Adresse, Zahlungsarten fehlen)

    Weiss event. jemand, woran das liegen könnte?

    freidenker77

    • Frisch an Board
    • Beiträge: 69
    Re: Trusted Shop Einbindung - Zahlungsarten werden nicht übernommen.
    Antwort #3 am: 30. September 2013, 15:36:53
    Hat denn keiner hier eine Idee???

    Habe den Code genauso eingebunden...

    Leider wird nur die Bestell-Nr. übertragen aber nicht die "wichtigen" Daten.

    freidenker77

    • Frisch an Board
    • Beiträge: 69
    Re: Trusted Shop Einbindung - Zahlungsarten werden nicht übernommen.
    Antwort #4 am: 30. September 2013, 16:11:56
    Da ja anscheinend niemand helfen will...

    Anders gefragt: wer würde mir das gegen Bezahlung in meinen Shop einbinden?

    Alles andere wurde bereits erfolgreich integriert. Es geht nur um die Datenübertragung (E-Mail, Preis, Kundennummer) an TS.
    0 Antworten
    2602 Aufrufe
    20. März 2010, 16:58:34 von vinznvegas
    2 Antworten
    1409 Aufrufe
    05. Dezember 2018, 01:20:12 von mattheis
    4 Antworten
    2876 Aufrufe
    09. Februar 2013, 20:35:07 von paco43
               
    anything