if (MODULE_PAYMENT_GOOGLECHECKOUT_MODE == 'https://sandbox.google.com/checkout/' && MODULE_PAYMENT_GOOGLECHECKOUT_MC_MODE == 'http') { $url = HTTP_SERVER . DIR_WS_CATALOG . 'googlecheckout/responsehandler.php'; } else { $url = HTTPS_SERVER . DIR_WS_CATALOG . 'googlecheckout/responsehandler.php'; } /** @params * merchant_calculations_url * merchant_calculated_tax * accept_merchant_coupons * accept_gift_certificates */ $Gcart->SetMerchantCalculations($url, 'false', 'true', 'false'); if (MODULE_PAYMENT_GOOGLECHECKOUT_3RD_PARTY_TRACKING != 'NONE') { // Third party tracking $tracking_attr_types = array('buyer-id' => 'buyer-id', 'order-id' => 'order-id', 'order-subtotal' => 'order-subtotal', 'order-subtotal-plus-tax' => 'order-subtotal-plus-tax', 'order-subtotal-plus-shipping' => 'order-subtotal-plus-shipping', 'order-total' => 'order-total', 'tax-amount' => 'tax-amount', 'shipping-amount' => 'shipping-amount', 'coupon-amount' => 'coupon-amount', 'coupon-amount' => 'coupon-amount', 'billing-city' => 'billing-city', 'billing-region' => 'billing-region', 'billing-postal-code' => 'billing-postal-code', 'billing-country-code' => 'billing-country-code', 'shipping-city' => 'shipping-city', 'shipping-region' => 'shipping-region', 'shipping-postal-code' => 'shipping-postal-code', 'shipping-country-code' => 'shipping-country-code'); $Gcart->AddThirdPartyTracking(MODULE_PAYMENT_GOOGLECHECKOUT_3RD_PARTY_TRACKING, $tracking_attr_types); } //Tax options if (sizeof($tax_class_unique) == 1 && sizeof($module_info_enabled) == sizeof($tax_class)) { $tax_result = $db->Execute("select distinct countries_name, coalesce(zone_code, 'All Areas') zone_code, tax_rate, countries_iso_code_2\n from " . TABLE_TAX_RATES . " as tr " . " inner join " . TABLE_ZONES_TO_GEO_ZONES . " as ztgz on tr.tax_zone_id = ztgz.geo_zone_id " . " inner join " . TABLE_COUNTRIES . " as c on ztgz.zone_country_id = c.countries_id " . " left join " . TABLE_ZONES . " as z on ztgz.zone_id=z.zone_id\n where tr.tax_class_id= '" . $tax_class_unique[0] . "'"); $num_rows = $tax_result->RecordCount(); $tax_rule = array(); for ($j = 0; $j < $num_rows; $j++) { $tax_result->MoveNext(); $rate = (double) $tax_result->fields['tax_rate'] / 100.0; $GDtaxRule = new GoogleDefaultTaxRule($rate, 'true'); if ($tax_result->fields['countries_iso_code_2'] == 'US') { if ($tax_result->fields['zone_code'] == 'All Areas') { $GDtaxRule->SetCountryArea('ALL'); } else { $GDtaxRule->SetStateAreas($tax_result->fields['zone_code']);