Jump to content
Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

Maybe this has been covered somewhere in the forum. But I would like to ask that I dl wpp 0.8.2 and the change of shipping address from paypal in checkout_shipping page to the checkout_confirmation page isn't working. In the checkout_shipping page buyers are able to change their shipping address through their paypal account via EC but when it arrives to the checkout_confirmation page. The delievery address is changed back to the orginal address they put in for my site's account they created. Did I dl a wrong version module. Or is this a bug that will be fixed in future update release? Thanks.

 

 

(dynamoeffects @ Feb 22 2007, 01:34 AM)

Set "Address Override" to true.

 

dynamoeffects:

 

I did try it on both cases where the address override is set to true or false. But at the end when it goes to the checkout_confirmation page before I click to confirm the order. I see the delivevery address is being switch back to the orginal address the user created in the account(whether in Payapl account or my website account depending if the address override is false or true respectively) rather than the one I changed earlier in the checkout_shipping page. Anybody else experienced that kind of problem?

 

*bump

Share this post


Link to post
Share on other sites
@aheisey: Go into your account in PayPal and view the certificates. Remove the one you created, then create a new one. This time, choose the second option that talks about third-party service providers. I believe the title is: "API Certificate Request". Then you'll have an option to download the certificate.

 

@rev2red: What errors did you receive?

 

I don't get any errors. Thats the problem. It says that it went though with no problem but with some cards it goes to though but the others it doesnt work.

Share this post


Link to post
Share on other sites

@GunGraveAce: The Address Override feature is one of the least tested features in the contribution. That's the next thing on my todo list to work on.

 

@rev2red: Then something's not installed correctly. Run the wpp_diagnostics.php script and make sure the installation checks out.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Version 0.9 with CCGV, additional currency, and Switch/Solo support has been uploaded. Post bug reports here.

 

I am in the UK and use the UK facility. This works great for me. I tried various live transactions, Credit & Debit Card and Switch. All worked perfect.

 

There was just one issue with the processing of payments. All switch tranactions were not fully completed, they were captured transactions and to complete them you have to manually complete each one within the PayPal control panel. I don't know if this is a PayPal issue or if it's how the data is sent to PayPal.

 

Regards

Frank

Share this post


Link to post
Share on other sites

No, it's by design. As stated in the API documentation:

 

If the credit card type is Switch or Solo:

1. The value of PaymentAction must be Authorization.

2. The currencyId must be GBP.

 

When using Switch/Solo, it will always been authorized only. Eventually (as time permits), I will add a button to the order page that will allow you to caputure authorized funds without having to log into PayPal. But as this is done on my (semi)free time, it may take a while.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Okay, I'm new to this whole WPD stuff, i've installed the contrib and i get the following errors after I click continue on the checkout_payment page

 

 

Warning: curl_error(): 54 is not a valid cURL handle resource in /home/the10000/public_html/shop/includes/modules/payment/paypal_wpp.php on line 408

 

Warning: curl_errno(): 54 is not a valid cURL handle resource in /home/the10000/public_html/shop/includes/modules/payment/paypal_wpp.php on line 408

 

Warning: Cannot modify header information - headers already sent by (output started at /home/the10000/public_html/shop/includes/modules/payment/paypal_wpp.php:408) in /home/the10000/public_html/shop/includes/functions/general.php on line 33

 

I have same problem here. My webhost is Dreamhost and i have verified that CURL is installed.

 

Diagnostics Program shows:

 

Is cURL installed? Yes

Able to connect to PayPal through cURL? No

Error received: 58: unable to use client certificate (no key found or wrong pass phrase?)

 

SERVER INFO:

CURL support enabled

CURL Information libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13

 

 

any help please? thanks!

Edited by Charlie77

Share this post


Link to post
Share on other sites

Did you install the contribution before you ran the diagnostics test? If so, is your certificate uploaded to /shop/includes/modules/payment/wpp_cert/ ?


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Did you install the contribution before you ran the diagnostics test? If so, is your certificate uploaded to /shop/includes/modules/payment/wpp_cert/ ?

 

 

yes.. contribution was installed before i ran the diagnostics test... And it's a Clean OSC install, no other modifications made except for this contribution.

Share this post


Link to post
Share on other sites

In that case, your API certificate either isn't uploaded to the right place, or the path to it is incorrect in the module's settings. Did everything else pass in the diagnostics test?


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites

This is the only error i get on the diagnostics test:

 

Able to connect to PayPal through cURL? No

Error received: 58: unable to use client certificate (no key found or wrong pass phrase?)

 

Certificate was uploaded on the correct path and has been configured correctly on the module settings.

 

Im not sure though if the Certificate forwarded to me was correct.

 

it's on a text file (cert_key_pem.txt) and looks something like this:

 

 

 

-----BEGIN RSA PRIVATE KEY-----

 

Some Encrypted text here

 

-----END RSA PRIVATE KEY-----

-----BEGIN CERTIFICATE-----

 

Some Encrypted text here

 

--- --END CERTIFICATE-----

Share this post


Link to post
Share on other sites

The last thing I would suggest is changing the permissions of your certificate to 777 and retest it. If it works, change those permissions down to 644 and try again. I think it may have gotten uploaded with no permission to read it.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
The last thing I would suggest is changing the permissions of your certificate to 777 and retest it. If it works, change those permissions down to 644 and try again. I think it may have gotten uploaded with no permission to read it.

Another possibility is that he's trying to use a sandbox certificate on the live server, or vice versa.

 

--Glen

Share this post


Link to post
Share on other sites
The last thing I would suggest is changing the permissions of your certificate to 777 and retest it. If it works, change those permissions down to 644 and try again. I think it may have gotten uploaded with no permission to read it.

 

Thanks but still no luck, everything has been set up for live server (Module settings and Certificate)

 

BTW, once you receive a API certificate , does that mean that your paypal account is already approved to accept payments using Website Payments Pro?

Share this post


Link to post
Share on other sites

Ok, i think i found the possible error... im going to ask my client if he had chose "My own Website" on Sales Venue(s) on Paypal application seems like he had selected Ebay based on the ERROR Dump when i used the 0.8 version.

 

[soap:Header]

[RequesterCredentials xmlns=urn:ebay:api:PayPalAPI]

[Credentials xmlns=urn:ebay:apis:eBLBaseComponents]

Share this post


Link to post
Share on other sites

Getting approved for WPP is a whole other process, and you would know if you've done it. PayPal would send you an email saying that you're ready to go.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites

Hello

I installed the contrib ran your test program all came back ok. I go to log in and get this.

 

Fatal error: Call to undefined function: tep_paypal_wpp_enabled() in /hsphere/local/home/arbushma/grandcanyonjewelers.com/catalog/login.php on line 18

 

Have any idea on a fix?

Share this post


Link to post
Share on other sites

Can this module be setup to Print an error in credit card payment screen if transation is over $10,000.00. Paypal will not take transactions above $10,000 and simply declines the card.. THe customer gets mad, does not call and closes their shopping cart.

 

Maybe have a line in language file: Your order is over 10,000 please call XXX XXX XXX to process your payment...

 

Can this be done?? Is this a feature already in module that I am missing or not setting up correctly? It seems that there was a check in the older version of the module.

 

Thanks - Ryan

Share this post


Link to post
Share on other sites

@Bushmaster: You didn't complete the installation, namely the changes in /includes/functions/general.php

 

@ryansc: The only check close to what you're describing is for shipping rates. If the shipping cost is above $10k, it will error. If you're expecting orders for $10k or more, you need a real merchant account and gateway. PayPal is a mickey mouse operation for small to medium sized transactions and the transaction rates are going to kill you.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Sounds like your host doesn't offer cURL support. Contact them or search for a new webhost.

 

 

I've checked this and they do support it, they claim the cURL will work on default as well, I tried everything I know, any ideas?

Share this post


Link to post
Share on other sites

Are you a GoDaddy user?


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites

I am trying to get the PayPal Website Payments Pro (US/UK) by dynamoeffects v0.9 contribution working with my site and I think that there may be a problem with it working with another contribution that I have installed.

 

I am receiving an error when ever I try to log in (with a test account). The error is:

 

 

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

* This problem can sometimes be caused by disabling or refusing to accept

cookies.

 

 

Before I began the install for the PayPal contrib I made sure that everything was working correctly with what I already had. Currently I have OSC 2.2 MS2, Ultimate_SEO_URLSv21d, MVS-V1.1, cDynamic Meta Tags v1.0.

 

Is it because of the altered urls that are being generated or something else? I will be glad to leave some code snippets if needed, just don't know which file may be causing the problem.

 

I appreciate any help in the right direction.

 

Thanks,

 

Gary

Share this post


Link to post
Share on other sites
I am trying to get the PayPal Website Payments Pro (US/UK) by dynamoeffects v0.9 contribution working with my site and I think that there may be a problem with it working with another contribution that I have installed.

 

I am receiving an error when ever I try to log in (with a test account). The error is:

Before I began the install for the PayPal contrib I made sure that everything was working correctly with what I already had. Currently I have OSC 2.2 MS2, Ultimate_SEO_URLSv21d, MVS-V1.1, cDynamic Meta Tags v1.0.

 

Is it because of the altered urls that are being generated or something else? I will be glad to leave some code snippets if needed, just don't know which file may be causing the problem.

 

I appreciate any help in the right direction.

 

Thanks,

 

Gary

 

 

More information but probably still not helpful.

 

I ran the wpp_diagnostics.php file included and got the following results (all green).

 

Paypal Website Payments Pro

 

Diagnostics Program v0.2

 

by Brian Burton (dynamoeffects)

Basic Tests

Using at least PHP 4.3.0? Yes

Does your store have an SSL certificate installed and working? Yes

Is cURL installed? Yes

Does cURL work? (Simple HTTP test) Yes

API Certificate installed? Yes

API Certificate directory protected? Yes

API Username in place? Yes

API Password in place? Yes

Database update in place? Yes

XML Document "doDirectPayment.xml" exists? Yes

XML Document "doExpressCheckout.xml" exists? Yes

XML Document "getExpressCheckoutDetails.xml" exists? Yes

XML Document "setExpressCheckout.xml" exists? Yes

XML Document "transactionSearch.xml" exists? Yes

Advanced Diagnostics

Able to connect to PayPal through cURL? Yes

Received a valid response? Yes

Did PayPal respond without errors? (If not, errors are below) Yes

Success!

 

Congratulations! This contribution appears to be correctly installed on your store!

 

Please note that if you're still having problems with your installation, it is most likely because you didn't completely integrate all of the code.

 

It is not necessarily tied to the login process either. If there is nothing in the cart and I try to log in it will process correctly. however, if I add something to the cart and try to proceed to checkout it gives me the same page above but I noticed that this time the URL is different and has an error in it's address

https://www.gourmetsoiree.com/checkout_shipping.php?error_message=ERROR_NO_SHIPPING_SELECTED_SELECTED

.

It says something about No shipping selected but it had not gone to the shipping selection page yet.

 

Anyone have any ideas?

 

Thanks,

 

Gary

Share this post


Link to post
Share on other sites
More information but probably still not helpful.

 

I ran the wpp_diagnostics.php file included and got the following results (all green).

It is not necessarily tied to the login process either. If there is nothing in the cart and I try to log in it will process correctly. however, if I add something to the cart and try to proceed to checkout it gives me the same page above but I noticed that this time the URL is different and has an error in it's address

https://www.gourmetsoiree.com/checkout_shipping.php?error_message=ERROR_NO_SHIPPING_SELECTED_SELECTED

.

It says something about No shipping selected but it had not gone to the shipping selection page yet.

 

Anyone have any ideas?

 

Thanks,

 

Gary

 

I think I may have found where I have failed in this installation but I think I am going to need a little help ironing out what exactly needs to be done. I believe that the problem lies within my checkout_shipping.php file.

 

MVS has to alter much of this file so it is not clear where the Pay Pal WPP files should be altered. If anyone could help me with this I would really appreciate it.

 

Here is my File with the MVS Alterations

 

<?php
/*
 $Id: checkout_shipping.php,v 1.16 2003/06/09 23:03:53 hpdl Exp $

 Modified for MVS V1.0 2006/03/25 JCK/CWG
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require('includes/classes/http_client.php');

// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
$navigation->set_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));
 }

// if no shipping destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
 } else {
// verify the selected shipping address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
  $sendto = $customer_default_address_id;
  if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
}
 }

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

//MVS
 if (SELECT_VENDOR_SHIPPING == 'true') {
include(DIR_WS_CLASSES . 'vendor_shipping.php');
$shipping_modules = new shipping;
 } else {
include(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
$total_weight = $cart->show_weight();
$cost = $cart->show_total();
$total_count = $cart->count_contents();
 }

//---PayPal WPP Modification START ---//
 if (tep_paypal_wpp_enabled()) {
$ec_enabled = true;
 } else {
$ec_enabled = false;
 }

 if ($ec_enabled) {
if (isset($_GET['ec_cancel']) || (tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info'))) {
  if (tep_session_is_registered('paypal_ec_temp')) tep_session_unregister('paypal_ec_temp');
  if (tep_session_is_registered('paypal_ec_token')) tep_session_unregister('paypal_ec_token');
  if (tep_session_is_registered('paypal_ec_payer_id')) tep_session_unregister('paypal_ec_payer_id');
  if (tep_session_is_registered('paypal_ec_payer_info')) tep_session_unregister('paypal_ec_payer_info');
}

$show_payment_page = false;

$config_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_DP_DISPLAY_PAYMENT_PAGE' LIMIT 1");
if (tep_db_num_rows($config_query) > 0) {
  $config_result = tep_db_fetch_array($config_query);
  if ($config_result['configuration_value'] == 'Yes') {
	$show_payment_page = true;
  }
}

$ec_checkout = true;
if (!tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info')) { 
  $ec_checkout = false;
  $show_payment_page = true;
} else {
  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  $payment = 'paypal_wpp';
}
 }
//---PayPal WPP Modification END ---//
// process the selected shipping method
 if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
  $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

  if (SELECT_VENDOR_SHIPPING == 'true') {

  $total_shipping_cost = 0;
  $shipping_title = MULTIPLE_SHIP_METHODS_TITLE;
  $vendor_shipping = $cart->vendor_shipping;
  $shipping = array();
  foreach ($vendor_shipping as $vendor_id => $vendor_data) {
	$products_shipped = $_POST['products_' . $vendor_id];
	$products_array = explode ("_", $products_shipped);

	$shipping_data = $_POST['shipping_' . $vendor_id];
	$shipping_array = explode ("_", $shipping_data);
	$module = $shipping_array[0];
	$method = $shipping_array[1];
	$ship_tax = $shipping_array[2];

	if ( is_object($$module) || ($module == 'free') ) {
	  if ($module == 'free') {
		$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
		$quote[0]['methods'][0]['cost'] = '0';
	  } else {
		$total_weight = $vendor_shipping[$vendor_id]['weight'];
		$shipping_weight = $total_weight;
		$cost = $vendor_shipping[$vendor_id]['cost'];
		$total_count = $vendor_shipping[$vendor_id]['qty'];
		$quote = $shipping_modules->quote($method, $module, $vendor_id);

	  }
	  if (isset($quote['error'])) {
		tep_session_unregister('shipping');
	  } else {
		if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		  $output[$vendor_id] = array('id' => $module . '_' . $method,
									  'title' => $quote[0]['methods'][0]['title'],
									  'ship_tax' => $ship_tax,
									  'products' => $products_array,
									  'cost' => $quote[0]['methods'][0]['cost']
									 );
		  $total_ship_tax += $ship_tax;
		  $total_shipping_cost += $quote[0]['methods'][0]['cost'];
		}//if isset
	  }//if isset
	}//if is_object
  }//foreach
  if ($free_shipping == true) {
	$shipping_title = $quote[0]['module'];
  } elseif (count($output) <2) {
	$shipping_title = $quote[0]['methods'][0]['title'];
	}
  $shipping = array('id' => $shipping,
					'title' => $shipping_title,
					'cost' => $total_shipping_cost,
					'shipping_tax_total' => $total_ship_tax,
					'vendor' => $output
				   );

} else {
  if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
	$shipping = $HTTP_POST_VARS['shipping'];

	list($module, $method) = explode('_', $shipping);
	if ( is_object($$module) || ($shipping == 'free_free') ) {
	  if ($shipping == 'free_free') {
		$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
		$quote[0]['methods'][0]['cost'] = '0';
	  } else {
		$quote = $shipping_modules->quote($method, $module);
	  }
	}
	if (isset($quote['error'])) {
	  tep_session_unregister('shipping');
	} else {
	  if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		$shipping = array('id' => $shipping,
						  'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
						  'cost' => $quote[0]['methods'][0]['cost']);

//---PayPal WPP Modification START ---//
						if ($show_payment_page || !$ec_enabled) {
							tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
						} else {
							tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
						}
//---PayPal WPP Modification END ---//
		}
	  }
	} else {
	  tep_session_unregister('shipping');
	}
  }
} else {
  $shipping = false;

//---PayPal WPP Modification START ---//
		if ($show_payment_page || !$ec_enabled) {
			tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
		} else {
			tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
		}
//---PayPal WPP Modification END ---//
}	


// get all available shipping quotes
 $quotes = $shipping_modules->quote();

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
 if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
var selected;

function selectRowEffect(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_address.shipping[0]) {
document.checkout_address.shipping[buttonSelect].checked=true;
 } else {
document.checkout_address.shipping.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
<? //---PayPal WPP Modification START ---//-- ?>
<?php 
 if ($ec_enabled) {
if (tep_session_is_registered('paypal_error')) {
  $messageStack->add('shipping', $paypal_error);
  tep_session_unregister('paypal_error');
}
if ($messageStack->size('shipping') > 0) { 
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php echo $messageStack->output('shipping'); ?></td>
  </tr>
<?php 
}
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TEXT_PAYPALWPP_EC_HEADER; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
  <td width="100%" colspan=2 valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">
	<tr class="infoBoxContents">
	<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
	  <tr>
		  <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		<tr>
		  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<? if (!$ec_checkout) { ?>
		  <td align="center"><a href="<?php echo tep_href_link('ec_process.php', '', 'SSL'); ?>"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border=0></a></td>
		  <td align="left" valign="middle"><span style="font-size:11px; font-family: Arial, Verdana;"><?php echo TEXT_PAYPALWPP_EC_BUTTON_TEXT; ?></span></td>
<? } else { ?>
		  <td align="center" style="font-size:14px; font-family: Arial, Verdana;"><b><? echo TEXT_PAYPALWPP_EC_SWITCH_METHOD_1; ?></b><br><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'ec_cancel=1', 'SSL'); ?>"><? echo TEXT_PAYPALWPP_EC_SWITCH_METHOD_2; ?></a></td>
<? } ?>
		  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		</tr>
		</table></td>
		  </tr>
	</table></td>
	</tr>
	  </table></td>
  </tr>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
<? //---PayPal WPP Modification START ---//-- ?>
<?php if ($ec_checkout && $ec_enabled) { ?>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_EC_PROCESS, 'clearSess=1', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
<?php } else { ?>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
			<td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
<? //---PayPal WPP Modification START ---//-- ?>
<?php 
		if ($ec_checkout && $ec_enabled) { 
			$paypal_ec_payer_info = $_SESSION['paypal_ec_payer_info'];
			$address_label = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'] . '<br>';
			if ($paypal_ec_payer_info['payer_business']) $address_label .= $paypal_ec_payer_info['payer_business'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_street_1'] . '<br>';
			if ($paypal_ec_payer_info['ship_street_2']) $address_label .= $paypal_ec_payer_info['ship_street_2'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_city'] . ', ' . $paypal_ec_payer_info['ship_state'] . '  ' . $paypal_ec_payer_info['ship_postal_code'] . '<br>';
			$address_label .= $paypal_ec_payer_info['ship_country_name'];
?>
				<td class="main" valign="top"><?php echo $address_label; ?></td>
<?php } else { ?>
				<td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
//MVS start
 if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		 <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
<?php
 if (SELECT_VENDOR_SHIPPING == 'true') {
require(DIR_WS_MODULES . 'vendor_shipping.php');
 } else {
$quotes = $shipping_modules->quote();

 if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
  case 'national':
	if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'international':
	if ($order->delivery['country_id'] != STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'both':
	$pass = true;
	break;
}

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
  $free_shipping = true;

  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
 } else {
$free_shipping = false;
 }

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();
//MVS End
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} elseif ($free_shipping == false) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
}

if ($free_shipping == true) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2" width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b> <?php echo $quotes[$i]['icon']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			  <tr id="defaultSelected" class="moduleRowSelected" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="selectRowEffect(this, 0)">
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} else {
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	if (isset($quotes[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	} else {
	  for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
		$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

		if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
		} else {
		  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
<?php
		if ( ($n > 1) || ($n2 > 1) ) {
?>
				<td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
				<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>
<?php
		} else {
?>
				<td class="main" align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
		$radio_buttons++;
	  }
	}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
  }
}
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}
 } //MVS end
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
<? //---PayPal WPP Modification START ---//-- ?>
<?php if ($show_payment_page || !$ec_enabled) { ?>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
<? //---PayPal WPP Modification START ---//-- ?>
<?php if ($show_payment_page || !$ec_enabled) { ?>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
<?php	} ?>
<? //---PayPal WPP Modification END ---//-- ?>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

and here is the file that came with Pay Pal WPP:

 

<?php
/*
 $Id: checkout_shipping.php,v 1.16 2003/06/09 23:03:53 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require('includes/classes/http_client.php');

// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
$navigation->set_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));
 }

// if no shipping destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
 } else {
// verify the selected shipping address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
  $sendto = $customer_default_address_id;
  if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
}
 }

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();

// load all enabled shipping modules
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping;

 if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
  case 'national':
	if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'international':
	if ($order->delivery['country_id'] != STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'both':
	$pass = true;
	break;
}

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
  $free_shipping = true;

  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
 } else {
$free_shipping = false;
 }

//---PayPal WPP Modification START ---//
 if (tep_paypal_wpp_enabled()) {
$ec_enabled = true;
 } else {
$ec_enabled = false;
 }

 if ($ec_enabled) {
if (isset($_GET['ec_cancel']) || (tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info'))) {
  if (tep_session_is_registered('paypal_ec_temp')) tep_session_unregister('paypal_ec_temp');
  if (tep_session_is_registered('paypal_ec_token')) tep_session_unregister('paypal_ec_token');
  if (tep_session_is_registered('paypal_ec_payer_id')) tep_session_unregister('paypal_ec_payer_id');
  if (tep_session_is_registered('paypal_ec_payer_info')) tep_session_unregister('paypal_ec_payer_info');
}

$show_payment_page = false;

$config_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_DP_DISPLAY_PAYMENT_PAGE' LIMIT 1");
if (tep_db_num_rows($config_query) > 0) {
  $config_result = tep_db_fetch_array($config_query);
  if ($config_result['configuration_value'] == 'Yes') {
	$show_payment_page = true;
  }
}

$ec_checkout = true;
if (!tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info')) { 
  $ec_checkout = false;
  $show_payment_page = true;
} else {
  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  $payment = 'paypal_wpp';
}
 }
//---PayPal WPP Modification END ---//
// process the selected shipping method
 if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
  $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
  if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
	$shipping = $HTTP_POST_VARS['shipping'];

	list($module, $method) = explode('_', $shipping);
	if ( is_object($$module) || ($shipping == 'free_free') ) {
	  if ($shipping == 'free_free') {
		$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
		$quote[0]['methods'][0]['cost'] = '0';
	  } else {
		$quote = $shipping_modules->quote($method, $module);
	  }
	  if (isset($quote['error'])) {
		tep_session_unregister('shipping');
	  } else {
		if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		  $shipping = array('id' => $shipping,
							'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
							'cost' => $quote[0]['methods'][0]['cost']);

//---PayPal WPP Modification START ---//
						if ($show_payment_page || !$ec_enabled) {
							tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
						} else {
							tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
						}
//---PayPal WPP Modification END ---//
		}
	  }
	} else {
	  tep_session_unregister('shipping');
	}
  }
} else {
  $shipping = false;

//---PayPal WPP Modification START ---//
		if ($show_payment_page || !$ec_enabled) {
			tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
		} else {
			tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
		}
//---PayPal WPP Modification END ---//
}	
 }

// get all available shipping quotes
 $quotes = $shipping_modules->quote();

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
 if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
var selected;

function selectRowEffect(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_address.shipping[0]) {
document.checkout_address.shipping[buttonSelect].checked=true;
 } else {
document.checkout_address.shipping.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
<? //---PayPal WPP Modification START ---//-- ?>
<?php 
 if ($ec_enabled) {
if (tep_session_is_registered('paypal_error')) {
  $messageStack->add('shipping', $paypal_error);
  tep_session_unregister('paypal_error');
}
if ($messageStack->size('shipping') > 0) { 
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php echo $messageStack->output('shipping'); ?></td>
  </tr>
<?php 
}
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TEXT_PAYPALWPP_EC_HEADER; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
  <td width="100%" colspan=2 valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">
	<tr class="infoBoxContents">
	<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
	  <tr>
		  <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		<tr>
		  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<? if (!$ec_checkout) { ?>
		  <td align="center"><a href="<?php echo tep_href_link('ec_process.php', '', 'SSL'); ?>"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border=0></a></td>
		  <td align="left" valign="middle"><span style="font-size:11px; font-family: Arial, Verdana;"><?php echo TEXT_PAYPALWPP_EC_BUTTON_TEXT; ?></span></td>
<? } else { ?>
		  <td align="center" style="font-size:14px; font-family: Arial, Verdana;"><b><? echo TEXT_PAYPALWPP_EC_SWITCH_METHOD_1; ?></b><br><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'ec_cancel=1', 'SSL'); ?>"><? echo TEXT_PAYPALWPP_EC_SWITCH_METHOD_2; ?></a></td>
<? } ?>
		  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		</tr>
		</table></td>
		  </tr>
	</table></td>
	</tr>
	  </table></td>
  </tr>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
<? //---PayPal WPP Modification START ---//-- ?>
<?php if ($ec_checkout && $ec_enabled) { ?>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_EC_PROCESS, 'clearSess=1', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
<?php } else { ?>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
			<td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
<? //---PayPal WPP Modification START ---//-- ?>
<?php 
		if ($ec_checkout && $ec_enabled) { 
			$paypal_ec_payer_info = $_SESSION['paypal_ec_payer_info'];
			$address_label = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'] . '<br>';
			if ($paypal_ec_payer_info['payer_business']) $address_label .= $paypal_ec_payer_info['payer_business'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_street_1'] . '<br>';
			if ($paypal_ec_payer_info['ship_street_2']) $address_label .= $paypal_ec_payer_info['ship_street_2'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_city'] . ', ' . $paypal_ec_payer_info['ship_state'] . '  ' . $paypal_ec_payer_info['ship_postal_code'] . '<br>';
			$address_label .= $paypal_ec_payer_info['ship_country_name'];
?>
				<td class="main" valign="top"><?php echo $address_label; ?></td>
<?php } else { ?>
				<td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (tep_count_shipping_modules() > 0) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} elseif ($free_shipping == false) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
}

if ($free_shipping == true) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2" width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b> <?php echo $quotes[$i]['icon']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
		  </tr>
<?php
} else {
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	if (isset($quotes[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	} else {
	  for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
		$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

		if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
		} else {
		  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
<?php
		if ( ($n > 1) || ($n2 > 1) ) {
?>
				<td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
				<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>
<?php
		} else {
?>
				<td class="main" align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
		$radio_buttons++;
	  }
	}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
		  </tr>
<?php
  }
}
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
<? //---PayPal WPP Modification START ---//-- ?>
<?php if ($show_payment_page || !$ec_enabled) { ?>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
<? //---PayPal WPP Modification START ---//-- ?>
<?php if ($show_payment_page || !$ec_enabled) { ?>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
<?php	} ?>
<? //---PayPal WPP Modification END ---//-- ?>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

If compared in Winmerge (or any other file comparison program I am sure) you can see where they are different. My problem is, I am not sure how to integrate these two codes. Can anyone help?

 

Thanks in advance.

 

Gary

Share this post


Link to post
Share on other sites
@Bushmaster: You didn't complete the installation, namely the changes in /includes/functions/general.php

 

No I finished the install. just can some more code there that needed to come out not sure where it came from.

 

 

//optamazation

function print_array ($array, $exit = false) {

print "<pre>";

print_r ($array);

print "</pre>";

if ($exit) exit();

 

and now it leads to a new one. The xml files are there but I notice a slash is missing.

 

PayPal WPP installation incomplete! There should be XML files located in /hsphere/local/home/arbushma/grandcanyonjewelers.com/catalogincludes/wpp_xml/ !

(setExpressCheckout.xml)

Share this post


Link to post
Share on other sites

@gmltw: That problem is caused by the rules in your htaccess file. Switch your .htaccess file with the original one, and then try again.

 

@Bushmaster: Add an extra "/" after "catalog" wherever you see it in you configure.php file.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×