$googlepayment = new googlecheckout(); $cart = $_SESSION['cart']; $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); require 'googlecheckout/library/googlecart.php'; require 'googlecheckout/library/googleitem.php'; require 'googlecheckout/library/googleshipping.php'; require 'googlecheckout/library/googletax.php'; $Gcart = new googlecart($googlepayment->merchantid, $googlepayment->merchantkey, MODULE_PAYMENT_GOOGLECHECKOUT_MODE == 'https://sandbox.google.com/checkout/' ? "sandbox" : "production", DEFAULT_CURRENCY); $Gwarnings = array(); if (MODULE_PAYMENT_GOOGLECHECKOUT_MODE == 'https://sandbox.google.com/checkout/') { $Gwarnings[] = GOOGLECHECKOUT_STRING_WARN_USING_SANDBOX; } // Check installed Version if (MODULE_PAYMENT_GOOGLECHECKOUT_VERSION != GOOGLECHECKOUT_FILES_VERSION) { $Gcart->SetButtonVariant(false); $Gwarnings[] = sprintf(GOOGLECHECKOUT_STRING_WARN_MIX_VERSIONS, MODULE_PAYMENT_GOOGLECHECKOUT_VERSION, GOOGLECHECKOUT_FILES_VERSION); } if ($googlepayment->merchantid == '' || $googlepayment->merchantkey == '') { $Gcart->SetButtonVariant(false); $Gwarnings[] = GOOGLECHECKOUT_STRING_WARN_NO_MERCHANT_ID_KEY; } $products = $cart->get_products(); require_once DIR_WS_CLASSES . 'order.php'; $order = new order(); $order_items = $order->products; //die; if (MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS == 'True' && $cart->get_content_type() != 'physical') { $Gcart->SetButtonVariant(false); $Gwarnings[] = GOOGLECHECKOUT_STRING_WARN_VIRTUAL; }