*/ chdir('../../../../'); require 'includes/application_top.php'; // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // initialize variables if the customer is not logged in if (!tep_session_is_registered('customer_id')) { $customer_id = 0; $customer_default_address_id = 0; } require DIR_WS_LANGUAGES . $language . '/modules/payment/paypal_pro_payflow_ec.php'; require 'includes/modules/payment/paypal_pro_payflow_ec.php'; require DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT; $paypal_pro_payflow_ec = new paypal_pro_payflow_ec(); if (!$paypal_pro_payflow_ec->check() || !$paypal_pro_payflow_ec->enabled) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } if (!tep_session_is_registered('sendto')) { if (tep_session_is_registered('customer_id')) { $sendto = $customer_default_address_id; } else { $country = tep_get_countries(STORE_COUNTRY, true); $sendto = array('firstname' => '', 'lastname' => '', 'company' => '', 'street_address' => '', 'suburb' => '', 'postcode' => '', 'city' => '', 'zone_id' => STORE_ZONE, 'zone_name' => tep_get_zone_name(STORE_COUNTRY, STORE_ZONE, ''), 'country_id' => STORE_COUNTRY, 'country_name' => $country['countries_name'], 'country_iso_code_2' => $country['countries_iso_code_2'], 'country_iso_code_3' => $country['countries_iso_code_3'], 'address_format_id' => tep_get_address_format_id(STORE_COUNTRY)); } } if (!tep_session_is_registered('billto')) { $billto = $sendto; } // register a random ID in the session to check throughout the checkout procedure
*/ chdir('../../../../'); require 'includes/application_top.php'; // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $snapshot = array('page' => 'ext/modules/payment/paypal/express_payflow.php', 'mode' => $request_type, 'get' => $HTTP_GET_VARS, 'post' => $HTTP_POST_VARS); $navigation->set_snapshot($snapshot); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } require DIR_WS_LANGUAGES . $language . '/modules/payment/paypal_pro_payflow_ec.php'; require 'includes/modules/payment/paypal_pro_payflow_ec.php'; $paypal_pro_payflow_ec = new paypal_pro_payflow_ec(); if (!$paypal_pro_payflow_ec->check() || !$paypal_pro_payflow_ec->enabled) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } if (MODULE_PAYMENT_PAYPAL_PRO_PAYFLOW_EC_TRANSACTION_SERVER == 'Live') { $api_url = 'https://payflowpro.verisign.com/transaction'; $paypal_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout'; } else { $api_url = 'https://pilot-payflowpro.verisign.com/transaction'; $paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout'; } if (!tep_session_is_registered('sendto')) { tep_session_register('sendto'); $sendto = $customer_default_address_id; } if (!tep_session_is_registered('billto')) {