Vr Pay unter Gambio 3.11

Thema wurde von JCC_User, 30. November 2018 erstellt.

  1. JCC_User

    JCC_User Mitglied

    Registriert seit:
    19. November 2018
    Beiträge:
    16
    Danke erhalten:
    0
    Hallo,
    gibt es eine Möglichkeit das Vr pay Modul zum laufen zu bekommen?
    Es ist essentiell für den Shop und ich dachte eigentlich dass es funktioniert, allerdings werde ich jetzt einfach redirected wann immer ich eine zahlung starte...
     
  2. Wilken (Gambio)

    Wilken (Gambio) Erfahrener Benutzer

    Registriert seit:
    7. November 2012
    Beiträge:
    18.737
    Danke erhalten:
    7.309
    Danke vergeben:
    2.208
  3. JCC_User

    JCC_User Mitglied

    Registriert seit:
    19. November 2018
    Beiträge:
    16
    Danke erhalten:
    0
    Ja genau am ende der Bestellung geschieht einfach ein Redirect.
    Im Gambio steht dann: Leider kam es zu einem Fehler bei der Weiterleitung und in der URL:
    Code:
    checkout_payment.php?payment_error=vrpayecommerce_cards_saved&error=ERROR_GENERAL_REDIRECT
    Ich finde auch keine Fehler in den Logs
     
  4. JCC_User

    JCC_User Mitglied

    Registriert seit:
    19. November 2018
    Beiträge:
    16
    Danke erhalten:
    0
    Also der fehler liegt in der checkout_payment.php? Dort kann er wohl die Checkoutid nicht generieren und erstellt deshalb einen redirect
    PHP:
    <?php
    /* --------------------------------------------------------------
      checkout_confirmation.php 2014-02-11 gm
      Gambio GmbH
      http://www.gambio.de
      Copyright (c) 2014 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(checkout_confirmation.php,v 1.137 2003/05/07); www.oscommerce.com
      (c) 2003   nextcommerce (checkout_confirmation.php,v 1.21 2003/08/17); www.nextcommerce.org
      (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com
      ($Id: checkout_confirmation.php 1277 2005-10-01 17:02:59Z mz $)

      Released under the GNU General Public License
      -----------------------------------------------------------------------------------------
      Third Party contributions:
      agree_conditions_1.01         Autor:  Thomas Ploenkers (webmaster@oscommerce.at)

      Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr
      | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

      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');

    $GLOBALS['breadcrumb']->add(
        
    NAVBAR_TITLE_1_CHECKOUT_CONFIRMATION,
        
    xtc_href_link(
            
    FILENAME_CHECKOUT_SHIPPING,
            
    '',
            
    'SSL'
        
    )
    );
    $GLOBALS['breadcrumb']->add(NAVBAR_TITLE_2_CHECKOUT_CONFIRMATION);

    // if the customer is not logged on, redirect them to the login page
    if (isset($_SESSION['customer_id']) === false) {
        
    xtc_redirect(xtc_href_link(FILENAME_LOGIN'''SSL'));
    }

    // mediafinanz
    include_once(DIR_FS_CATALOG 'includes/modules/mediafinanz/include_checkout_confirmation.php');

    $coo_checkout_confirmation_control MainFactory::create_object('CheckoutConfirmationContentControl');
    $coo_checkout_confirmation_control->set_data('GET'$_GET);
    $coo_checkout_confirmation_control->set_data('POST'$_POST);

    $coo_checkout_confirmation_control->proceed();

    $t_redirect_url $coo_checkout_confirmation_control->get_redirect_url();
    if (empty(
    $t_redirect_url) == false) {
        
    xtc_redirect($t_redirect_url);
    } else {
        
    $t_main_content $coo_checkout_confirmation_control->get_response();
    }

    //add vrpayecommerce payment form ---------
    $smarty = new Smarty;
    $current_template defined('CURRENT_TEMPLATE') ? constant('CURRENT_TEMPLATE') : '';

    if (
    $current_template != 'Honeygrid') {
        
    $smarty->assign('LIGHTBOX'gm_get_conf('GM_LIGHTBOX_CHECKOUT'));
    } else {
        
    $smarty->assign('LIGHTBOX''false');
    }

    $smarty->assign('LIGHTBOX_CLOSE'xtc_href_link(FILENAME_DEFAULT'''NONSSL'));

    $smarty->assign('language'$_SESSION['language']);
    $smarty->assign('PAYMENT_BLOCK'$payment_block);
    $smarty->caching 0;

    $payment_module $_SESSION['payment'];

    require_once(
    DIR_WS_MODULES'payment/'$payment_module '.php');
    $payment_form = new $payment_module;

    if (
    $payment_module == 'vrpayecommerce_easycredit') {
        
    $request $payment_form->getServerToServerRequest($payment_widget_url);

        if (
    $request == 'ERROR_MERCHANT_SSL_CERTIFICATE') {
            
    $payment_form->redirectFailure('ERROR_MERCHANT_SSL_CERTIFICATE');
        } elseif (!
    $request || !isset($request['redirect']['url'])) {
            
    $payment_form->redirectFailure('ERROR_GENERAL_REDIRECT');
        }

        
    $transaction_result VRpayecommercePaymentCore::getTransactionResult($request['result']['code']);

        if (
    $transaction_result == 'NOK') {
            
    $error_identifier VRpayecommercePaymentCore::getFailedIdentifier($request['result']['code']);
            
    $payment_form->redirectFailure($error_identifier);
        }

        
    $smarty->assign('redirect_url'$request['redirect']['url']);
        
    $smarty->assign('parameters'$request['redirect']['parameters']);
    } else {
        
    $checkout_id $payment_form->getCheckoutId($payment_widget_url);
        
    $paymentWidgetContent VRpayecommercePaymentCore::getPaymentWidgetContent(
            
    $payment_widget_url,
            
    $payment_form->getTestMode()
        );

        if (
    strpos($paymentWidgetContent'errorDetail') !== false) {
            
    xtc_redirect(
                
    xtc_href_link(
                    
    'checkout_payment.php?payment_error='.$payment_module.'&error=ERROR_GENERAL_REDIRECT',
                    
    '',
                    
    "SSL",
                    
    true,
                    
    false
                
    )
            );
        }

        if (
    $payment_widget_url == 'ERROR_MERCHANT_SSL_CERTIFICATE') {
            
    xtc_redirect(
                
    xtc_href_link(
                    
    'checkout_payment.php?payment_error='.$payment_module.'&error=ERROR_MERCHANT_SSL_CERTIFICATE',
                    
    '',
                    
    "SSL",
                    
    true,
                    
    false
                
    )
            );
        } elseif (!
    $checkout_id) {
            
    xtc_redirect(
                
    xtc_href_link(
                    
    'checkout_payment.php?payment_error='.$payment_module.'&error=ERROR_GENERAL_REDIRECT',
                    
    '',
                    
    "SSL",
                    
    true,
                    
    false
                
    )
            );
        }
    }

    switch (
    $_SESSION['language_code']) {
        case 
    'de':
            
    $lang $_SESSION['language_code'];
            break;
        default:
            
    $lang "en";
    }

    $merchant_location '';
    if (
    $payment_module == 'vrpayecommerce_cards' || $payment_module == 'vrpayecommerce_cards_saved') {
        
    $merchant_location $payment_form->getMerchantLocation();
    }

    $error $payment_form->get_error();
    $smarty->assign('error_message'$error['error']);
    $smarty->assign('lang'$lang);
    $smarty->assign('test_mode'$payment_form->getTestMode());
    $smarty->assign('brand'$payment_form->getBrand());
    $smarty->assign('recurring'$payment_form->isRecurring());
    $smarty->assign('redirect'$payment_form->isRedirect());
    $smarty->assign('payment_widget_url'$payment_widget_url);
    $smarty->assign('merchant_location'$merchant_location);
    $smarty->assign(
        
    'response_url',
        
    xtc_href_link(
            
    'ext/modules/payment/vrpayecommerce/checkout_response.php?payment_module='
            
    .$payment_module.'&response_from=checkout',
            
    '',
            
    "SSL",
            
    true,
            
    false
        
    )
    );
    $smarty->assign('cancel_url'xtc_href_link(FILENAME_CHECKOUT_PAYMENT'''SSL'));
    $smarty->assign('registrations'$payment_form->getRecurringLists());

    $t_main_content $smarty->fetch(CURRENT_TEMPLATE '/module/payment/vrpayecommerce/'.$payment_form->getTemplate());

    //-------------------------------

    $coo_layout_control MainFactory::create_object('LayoutContentControl');
    $coo_layout_control->set_data('GET'$_GET);
    $coo_layout_control->set_data('POST'$_POST);
    $coo_layout_control->set_('coo_breadcrumb'$GLOBALS['breadcrumb']);
    $coo_layout_control->set_('coo_product'$GLOBALS['product']);
    $coo_layout_control->set_('coo_xtc_price'$GLOBALS['xtPrice']);
    $coo_layout_control->set_('c_path'$GLOBALS['cPath']);
    $coo_layout_control->set_('main_content'$t_main_content);
    $coo_layout_control->set_('request_type'$GLOBALS['request_type']);
    $coo_layout_control->proceed();

    $t_redirect_url $coo_layout_control->get_redirect_url();
    if (empty(
    $t_redirect_url) === false) {
        
    xtc_redirect($t_redirect_url);
    } else {
        echo 
    $coo_layout_control->get_response();
    }

    Kann mir hier vllt jemand weiterhelfen?

    PHP:
    elseif (!$checkout_id) {
            
    xtc_redirect(
                
    xtc_href_link(
                    
    'checkout_payment.php?payment_error='.$payment_module.'&error=ERROR_GENERAL_REDIRECT',
                    
    '',
                    
    "SSL",
                    
    true,
                    
    false
                
    )
            );
    Das ist die Zeile die den Fehler generiert, kommentiere ich diese aus gehts weiter, aber er erzeugt auch keine eingabemaske
     
  5. JCC_User

    JCC_User Mitglied

    Registriert seit:
    19. November 2018
    Beiträge:
    16
    Danke erhalten:
    0
    #5 JCC_User, 30. November 2018
    Zuletzt bearbeitet: 30. November 2018
    Wurde von Gambio 2 --> 3 evtl etwas an der Checkout Id generierung geändert?
    Sind hier evtl alte Variablen die nicht mehr genutzt werden?? dies sind auszüge aus der vrpayecommerce_base.php

    PHP:
        /**
         * Get checkout ID and create payment widget at my payment information page
         *
         * @param  string $payment_widget_url
         * @param  string $id
         * @return string
         */
        
    public function getCheckoutIdRecurringPayment(&$payment_widget_url$id false)
        {
            
    $customer $this->getCustomerData();
            
    $customer_address $this->getCustomerAddress();

            
    $transaction_data $this->getCredentials();
            
    $transaction_data['customer']['email'] = $customer['customers_email_address'];
            
    $transaction_data['customer']['first_name'] = $customer_address['entry_firstname'];
            
    $transaction_data['customer']['last_name'] = $customer_address['entry_lastname'];
            
    $transaction_data['billing']['street'] = $customer_address['entry_street_address'];
            
    $transaction_data['billing']['city'] = $customer_address['entry_city'];
            
    $transaction_data['billing']['zip'] = $customer_address['entry_postcode'];
            
    $transaction_data['billing']['country_code'] = $this->getCountryIsoCode($customer_address['entry_country_id']);
            
    $transaction_data['amount'] = $this->getRegisterAmount();
            
    $transaction_data['currency'] = $_SESSION['currency'];
            
    $transaction_data['customer_ip'] = $this->getCustomerIp();

            if (
    $this->code == 'vrpayecommerce_cards_saved') {
                
    $transaction_data['3D']['amount'] = $transaction_data['amount'];
                
    $transaction_data['3D']['currency'] = $transaction_data['currency'];
            }
            if (
    $this->getGroupRecurring() != 'OT') {
                
    $transaction_data['payment_type'] = $this->getPaymentType();
            }

            
    $transaction_data['test_mode'] = $this->getTestMode();
            
    $transaction_data['payment_recurring'] = 'INITIAL';
            
    $transaction_data['payment_registration'] = 'true';

            if (
    $id) { // change payment
                
    $transaction_data['transaction_id'] = $this->getReferenceId($id);
            } else {
                
    $transaction_data['transaction_id'] = $_SESSION['customer_id'];
            }
            
    $payment_widget_url VRpayecommercePaymentCore::getPaymentWidgetUrl($transaction_data$checkout_id);

            return 
    $checkout_id;
        }


    PHP:
    public function getCheckoutId(&$payment_widget_url)
        {
            global 
    $order;

            
    $transaction_data $this->getCredentials();
            
    $transaction_data['customer']['email'] = $order->customer['email_address'];
            
    $transaction_data['customer']['first_name'] = $order->billing['firstname'];
            
    $transaction_data['customer']['last_name'] = $order->billing['lastname'];
            
    $transaction_data['billing']['street'] = $order->billing['street_address'];
            
    $transaction_data['billing']['city'] = $order->billing['city'];
            
    $transaction_data['billing']['zip'] = $order->billing['postcode'];
            
    $transaction_data['billing']['country_code'] = $order->billing['country']['iso_code_2'];
            
    $transaction_data['amount'] = $order->info['total'];
            
    $transaction_data['currency'] = $order->info['currency'];
            
    $transaction_data['customer_ip'] = $this->getCustomerIp();

            if (
    $this->code == 'vrpayecommerce_cards_saved') {
                
    $transaction_data['3D']['amount'] = $transaction_data['amount'];
                
    $transaction_data['3D']['currency'] = $transaction_data['currency'];
            }
            
    $transaction_data['test_mode'] = $this->getTestMode();
            
    $transaction_data['payment_type'] = $this->getPaymentType();
            
    $_SESSION['vrpayecommerce']['transaction_id'] = date('YmdHis') . xtc_create_random_value(5'digits');
            
    $transaction_data['transaction_id'] = $_SESSION['vrpayecommerce']['transaction_id'];

            
    $transaction_data array_merge_recursive(
                
    $transaction_data,
                
    $this->getKlarnaParameters(),
                
    $this->getPaydirektParameters(),
                
    $this->getRegistrationParameters(),
                
    $this->getEasycreditParameters()
            );
            if (
    $this->isRecurring() && $this->getGroupRecurring() == 'OT') {
                unset(
    $transaction_data['payment_type']);
            }

            
    $_SESSION['vrpayecommerce']['transactionData'] = $transaction_data;
            
    VRpayecommercePaymentCore::instanceLoggerClass()->notice('get transaction_data : '.
                
    print_r($transaction_data1), 'security''vrpayecommerce_log');

            
    $payment_widget_url VRpayecommercePaymentCore::getPaymentWidgetUrl($transaction_data$checkout_id);

            return 
    $checkout_id;
        }
    PHP:
       public function capturePayment()
        {
            if (
    $this->isVersionTrackerActive()) {
                
    VersionTracker::sendVersionTracker($this->getVersionData());
            }
            
    $checkout_id xtc_db_prepare_input($_POST['vrpay_id']);
            
    VRpayecommercePaymentCore::instanceLoggerClass()->notice('get checkout_id : '.
                
    print_r($checkout_id1), 'security''vrpayecommerce_log');

            
    $transaction_data $this->getCredentials();
            
    $transaction_data['test_mode'] = $this->getTestMode();
            
    $transaction_data['payment_type'] = "CP";
            
    $transaction_data['amount'] = $_POST['amount'];
            
    $transaction_data['currency'] = $_POST['currency'];
            
    VRpayecommercePaymentCore::instanceLoggerClass()->notice('get transaction data : '.
                
    print_r($transaction_data1), 'security''vrpayecommerce_log');

            
    // check if transaction amount is not same with cart amount
            
    $order = new order();
            if (
    $order->info['total'] != (float) $transaction_data['amount']) {
                
    $_SESSION['cartID'] = $_SESSION['cart']->cartID;
                
    $this->redirectFailure('ERROR_GENERAL_CAPTURE_PAYMENT');
            }

            
    $payment_status VRpayecommercePaymentCore::backOfficeOperation($checkout_id$transaction_data);
            
    VRpayecommercePaymentCore::instanceLoggerClass()->notice('get payment status : '.
                
    print_r($result_delete_registration1), 'security''vrpayecommerce_log');

            if (!
    $payment_status) {
                
    $this->redirectFailure('ERROR_GENERAL_NORESPONSE');
            } else {
                
    $_SESSION['vrpayecommerce']['resultJson'] = $payment_status;
                
    $code_result $payment_status["result"]["code"];
                
    $is_in_review VRpayecommercePaymentCore::isSuccessReview($code_result);
                
    $_SESSION['vrpayecommerce']['isInReview'] = $is_in_review;
                
    $error_identifier VRpayecommercePaymentCore::getErrorIdentifier($code_result);
                
    $transaction_result VRpayecommercePaymentCore::getTransactionResult($code_result);
                
    VRpayecommercePaymentCore::instanceLoggerClass()->notice('get transaction result code : '.
                    
    print_r($transaction_result1), 'security''vrpayecommerce_log');

                if (
    $transaction_result == "ACK") {
                    
    $this->processPaymentSuccess($payment_status);
                } elseif (
    $transaction_result == "NOK") {
                    
    $this->redirectFailure($error_identifier);
                } else {
                    
    $this->redirectFailure('ERROR_UNKNOWN');
                }
            }
        }

    PHP:
    public function getShopUrl()
        {
            if (
    $this->isVersionTrackerActive()) {
                
    VersionTracker::sendVersionTracker($this->getVersionData());
            }
            
    $checkout_id xtc_db_prepare_input($_REQUEST['id']);
            
    $registration_id xtc_db_prepare_input($_POST['registrationId']);

            
    $this->getPaypalSavedResponse($registration_id);

            
    $transaction_data $this->getCredentials();

            if (
    $_GET['response_from'] == 'checkout') {
                
    $payment_status VRpayecommercePaymentCore::getPaymentStatus($checkout_id$transaction_data);
            } elseif (
    $_GET['response_from'] == 'servertoserver') {
                
    $payment_status =
                    
    VRpayecommercePaymentCore::getPaymentServerToServerStatus($checkout_id$transaction_data);

                return 
    $payment_status;
            }

            if (!
    $payment_status) {
                
    VRpayecommercePaymentCore::instanceLoggerClass()->notice(
                    
    'error payment status is empty ',
                    
    'security',
                    
    'vrpayecommerce_log'
                
    );
                
    $this->redirectFailure('ERROR_GENERAL_NORESPONSE');
            } else {
                if (
    $payment_status == 'ERROR_MERCHANT_SSL_CERTIFICATE') {
                    
    VRpayecommercePaymentCore::instanceLoggerClass()->notice(
                        
    'error because of ssl certificate',
                        
    'security',
                        
    'vrpayecommerce_log'
                    
    );
                    
    $this->redirectFailure('ERROR_MERCHANT_SSL_CERTIFICATE');
                }
                
    $_SESSION['vrpayecommerce']['resultJson'] = $payment_status;
                
    $code_result $payment_status["result"]["code"];
                
    $is_in_review VRpayecommercePaymentCore::isSuccessReview($code_result);
                
    $_SESSION['vrpayecommerce']['isInReview'] = $is_in_review;
                
    $error_identifier VRpayecommercePaymentCore::getErrorIdentifier($code_result);
                
    $transaction_result VRpayecommercePaymentCore::getTransactionResult($code_result);

                if (
    $transaction_result == "ACK") {
                    
    $this->processPaymentSuccess($payment_status);
                } elseif (
    $transaction_result == "NOK") {
                    
    $this->redirectFailure($error_identifier);
                } else {
                    
    $this->redirectFailure('ERROR_UNKNOWN');
                }
            }
        }
    Anbei nochmal die ganze Datei die wahrscheinlich den Fehler verursacht.
     

    Anhänge:

  6. JCC_User

    JCC_User Mitglied

    Registriert seit:
    19. November 2018
    Beiträge:
    16
    Danke erhalten:
    0