Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

The following fixed "PayPal returned invalid or incomplete data to complete your order. Please try again or select an alternate payment method."

<       if (!preg_match("([C-E]{2})-([A-Z0-9]{17})", $_SESSION['paypal_ec_token'])) {
---
>       if (!preg_match("/([C-E]{2})-([A-Z0-9]{17})/", $_SESSION['paypal_ec_token'])) {

 

The following fixed "Unfortunately the country of the address you selected is not currently one that we offer service to. If you have any questions, please feel free to contact us." $billing_address is being set to FALSE if no billing address is returned, so the statement will always be true.

<         if (isset($billing_address)) {
---
>         if (is_array($billing_address) &! empty($billing_address)) {

I just want to confirm that the changes aboved solved the errors mentioned at my 1.0.0 version.

 

Though no payment details are shown at paypals overview screen and the download doesn't show up after payment. Do you think I should update to the latest Paypal Website Payments Pro version (Link?) ?

Link to comment
Share on other sites

  • 4 months later...

Hi,

 

This thread appears to be dead after years of support, but I had a question still.

 

I had to revert back to the original includes/modules/payment/paypal_wpp.php from the latest installation package after making changes to the file from github (7/2010). These changes converted the pregs to eregs, but also stopped PayPal Express from working.

 

This file has several pregs in it. My host isn't planning on upgrading to php 5.3 anytime soon, but just in case, has anyone modified this file to be 5.3 compatible?

Link to comment
Share on other sites

  • 2 months later...

I installed version 10 Apr 2010

 

I got this error when I going to install it at administration section -> Module -> Payment

 

 

Warning: Call-time pass-by-reference has been deprecated in /home/content/****/html/includes/modules/payment/paypal_wpp.php on line 1608

 

Warning: Call-time pass-by-reference has been deprecated in /home/content/****/html/includes/modules/payment/paypal_wpp.php on line 2190

 

Warning: Call-time pass-by-reference has been deprecated in /home/content/****/html/includes/modules/payment/paypal_wpp.php on line 2192

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/***/html/includes/modules/payment/paypal_wpp.php:1608) in /home/content/***/html/admin/includes/functions/general.php on line 91

Link to comment
Share on other sites

Received the following from PayPal. Does anyone think it will require changes to this module? Does the module verify the PayPal IP address? If so, then the third item would require a change.

 

Please be sure to share this notification with your technical resources because network configuration changes may be necessary to avoid a disruption in service. Please note that there is also information regarding a short service interruption for Payflow on October 1st.

 

Date

 

Impact Description

 

 

Customers and Products Impacted

 

IMPORTANT – Action Required

September 29

 

IP Address Expansion

 

 

PayPal Notification:

https://www.x.com/content/ip-address-expansion-paypal-services

 

IPN Customers who have their IPN Listener script behind their firewall with hard-coding of IP Addresses or use of Access Control List management of IP addresses

 

To avoid an interruption in IPN support, customer must either:

Continue to post back to https://www.paypal.com and update access control list to allow outbound access to ANY IP address for the servers that host our IPN script.

OR

Modify the IPN script to post back IPNs to the newly created URL https://ipnpb.paypal.com using HTTPS (port 443) and update firewall access control list rules to allow outbound access to the ipnpb.paypal.com IP ranges

October 1

Server upgrade that requires 3 minutes of downtime starting between 11 PM PDT – 11:05 PM PDT for Payflow Gateway customers

 

PayPal Notification:

https://www.x.com/developers/paypal/documentation-tools/site-status/notification-planned-downtime-during-oct-01-maintenance-pf-live-2263

Customers using Payflow Pro, Payflow Link, V2 Payflow, Websites Payments Pro (3.0) using Gateway credentials and Website Payments Pro Payflow Edition (2.0)

For impacted transactions that are not reattempted due to the connection being unavailable, the API calls would need to be resubmitted for processing.

November 15

IP Address Expansion

 

PayPal Notification:

https://www.x.com/content/ip-address-expansion-paypal-services

 

API Customers, including Express Checkout, Websites Payments Pro (3.0) and Website Payments Pro Payflow Edition (2.0), who either hard code outbound IP addresses or use an Access Control List.

You must either point to DNS or update access control list with newly added IP addresses to avoid an interruption in service. While these changes must be made by early March, 2012, we strongly encourage you to make any necessary updates by November 15th 2011 as this will help minimize any potential disruptions during the holiday season.

 

 

 

Edited by georgecvsc
Link to comment
Share on other sites

I was testing my website by sending transactions to Sandbox and everything was working great one day and then the next day I couldn't even get PayPal transaction page to load ..... instead, checkout_payment.php would simply timeout and redirect me back to shopping_cart.php page with the url (http://www.mysite.com/shopping_cart.php?error_message=). Nothing is displayed as an error in the URL line.

 

I have then tracked down where the redirect is happening in "express.php"

 

The line of code that is causing this to occur is:

 

if (($response_array['ACK'] == 'Success') || ($response_array['ACK'] == 'SuccessWithWarning')) {

tep_redirect($paypal_url . '&token=' . $response_array['TOKEN'] . '&useraction=commit');

} else {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));

}

 

break;

 

-----------------------

Can anyone tell me what exactly is causing my problem and why it falls to the "redirect" instead of going to PayPal? I'm new to OsCommerce so simple and easy to understand replies would be greatly appreciated.

 

Thanks in advance for the quick help.

 

Doug

Link to comment
Share on other sites

Hi All,

My installation of this contrib that had been working for over a year suddenly stopped working 2 days ago. Symptoms of this issue might vary between web hosts, but in my case, when pressing the button for Express Checkout the customer is directed to an error on PayPal (no code) that basically just states the operation failed. This is previous to any login attempt. PayPal techs informed me that variable names were being passed to PayPal rather than the data that was supposed to be contained. For example, the customer name would be something along the line of PAYPAL_NAME. Naturally, if the customer hasn't logged in yet, there is no data for these fields so the variable passed to PayPal should simply be null.

The contrib has worked despite this issue for quite a while. I assume a recent change at PayPal might be the problem, but it may have been an update at my web host. I found a little omission in the logic in includes/modules/payment//paypal_wpp.php. Search for line if (MODULE_PAYMENT_PAYPAL_EC_ADDRESS_OVERRIDE == 'Store' && . Subsequent codes check for the data we're talking about, and if it is missing, sets the address override to "0". The omission was that variables are only set if override is "1", if override is "0", variables aren't set at all. I've just added a small bit to set the vars to null in that instance. For my install, that took care of the issue and actually fixed another problem I had just lived with for the last year or so.

The address override in admin should be set to PayPal, not store. If you like store, well you're on your own. Otherwise, usual disclaimers apply as I'm not a programmer.

Find:

/* Don't override if the state is missing (Avoid 10729 errors) */

if ($order_info['PAYPAL_ADDRESS_OVERRIDE'] == '1' && $order_info['PAYPAL_STATE'] == '') {

$order_info['PAYPAL_ADDRESS_OVERRIDE'] = '0';

$order_info['PAYPAL_NAME'] = '';

$order_info['PAYPAL_ADDRESS1'] = '';

$order_info['PAYPAL_ADDRESS2'] = '';

$order_info['PAYPAL_CITY'] = '';

$order_info['PAYPAL_STATE'] = '';

$order_info['PAYPAL_ZIP'] = '';

$order_info['PAYPAL_COUNTRY'] = '';

}

Insert immediately after:

 

 

/* If Address Override == "0", send null vars to Paypal (was sending Var Names instead) */

if ($order_info['PAYPAL_ADDRESS_OVERRIDE'] == '0') {

 

$order_info['PAYPAL_NAME'] = '';

$order_info['PAYPAL_ADDRESS1'] = '';

$order_info['PAYPAL_ADDRESS2'] = '';

$order_info['PAYPAL_CITY'] = '';

$order_info['PAYPAL_STATE'] = '';

$order_info['PAYPAL_ZIP'] = '';

$order_info['PAYPAL_COUNTRY'] = '';

}

That's it. Hope it saves someone some time.

Edited by Escaping
Link to comment
Share on other sites

Hi Escaping!

 

Thank you so much, I don't think I would have ever got there myself, been banging my head against the wall with PayPal tech support not making any sense.

You have saved me some time, thanks thank thanks!

 

Peter

Link to comment
Share on other sites

I would be most grateful if someone could shed light on how to change the Express Checkout scripts to make them do the following.

 

1. Send line item details along with SetExpressCheckout API call to force PayPal's checkout page to display order information to buyers.

 

2. Submit GetExpressCheckoutDetails to get customers' shipping addresses before they confirm their orders after returning from PayPal.

Link to comment
Share on other sites

My orders are nor getting through Paypal!!!

.I have 2.3 Oscommerce, SSL certified site.

. I have installed Paypal Express and PayPal Website Payments Pro (Payflow Edition) - Direct Payments.

. Everything it's working fine when I press the checkout buttons in either options, taking me to the paypal pages with my own logos.

. I can enter all the data asked by paypal, then shows me the final order and prompt me to confirm.

. when I confirm, the Modules send me back to an empty cart page, not to the payment_success page.

. There is no orders confirmation in my side. No errors displayed, no information nothing..

. I am go into my paypal account and there is no order. No charges, no debits..

 

Any Ideas somebody??? Thanks very much for your help in advance...

Link to comment
Share on other sites

I had to sign up to this forum simply to give Escaping a massive thank-you for posting this solution. After having two web designers shrug their shoulders at the way around the 'sorry, your last action could not be completed' problem that we started to experience I thought I'd sit down with Google and a beer to see if I could muddle may way through and up this post came.

 

I’ve got absolutely no programming experience and you've allowed me to fix our site; thanks again.

Link to comment
Share on other sites

Thank you Escaping. Your post fixed the carts of a few of my clients.

 

Unfortunately this is a prime example of why I have been setting up my clients on other shopping carts over the last few months - there is no support team behind these contributions and the original programmers always seem to eventually lose interest and disappear. The payment module for a site is one of the worst things to have not working. Luckily Escaping posted a solution, but what about next time?

Link to comment
Share on other sites

Hi all

 

We've also been experiencing the same symptoms as Escaping (Express Checkout not working with the dynamoeffects contribution) and opened a Paypal ticket.

We're posting this information here to help others who may be experiencing the same symptomps. The exchange of messages with Paypal is the following:

 

REQUEST 1317742372


<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
 <RequesterCredentials xmlns="urn:ebay:api:PayPalAPI">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents">
  <Username>ebay_api1.robosavvy.com</Username>
  <Password>297NDQBJLDPTEUWW</Password>
</Credentials>
 </RequesterCredentials>
</soap:Header>
<soap:Body>
 <SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI">
<SetExpressCheckoutRequest>
  <Version xmlns="urn:ebay:apis:eBLBaseComponents">2.0</Version>
  <SetExpressCheckoutRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents">
	<OrderTotal currencyID="GBP">1.90</OrderTotal>
	<ReturnURL>https://robosavvy.com/store/login.php/action/express_checkout</ReturnURL>
	<CancelURL>https://robosavvy.com/store/login.php/ec_cancel/1</CancelURL>
	<ReqConfirmShipping>1</ReqConfirmShipping>
	<NoShipping>0</NoShipping>
	<AddressOverride>0</AddressOverride>
	<LocaleCode>US</LocaleCode>
	<PageStyle></PageStyle>
	<cpp-header-image></cpp-header-image>
	<cpp-header-border-color></cpp-header-border-color>
	<cpp-header-back-color></cpp-header-back-color>
	<cpp-payflow-color></cpp-payflow-color>
	<PaymentAction>Sale</PaymentAction>
[b]	    [u]<Address>[/u][/b]
[b]		  <Name>PAYPAL_NAME</Name>[/b]
[b]		  <Street1>PAYPAL_ADDRESS1</Street1>[/b]
[b]		  <Street2>PAYPAL_ADDRESS2</Street2>[/b]
[b]		  <CityName>PAYPAL_CITY</CityName>[/b]
[b]		  <StateOrProvince>PAYPAL_STATE</StateOrProvince>[/b]
[b]		  <PostalCode>PAYPAL_ZIP</PostalCode>[/b]
[b]		  <Country>PAYPAL_COUNTRY</Country>[/b]
[b]	    [u]</Address>[/u][/b]
  </SetExpressCheckoutRequestDetails>
</SetExpressCheckoutRequest>
 </SetExpressCheckoutReq>
</soap:Body>
</soap:Envelope>

 

 

RESPONSE 1317742373


Array
(
[security] =>
[RequesterCredentials] => Array
	(
		[0] => Array
			(
				[Credentials] => Array
					(
						[0] => Array
							(
								[username] =>
								[Password] =>
								[signature] =>
								[subject] =>
							)

					)

			)

	)

[setExpressCheckoutResponse] => Array
	(
		[0] => Array
			(
				[Timestamp] => 2011-10-04T15:32:54Z
[b]				    [u][Ack] => Success[/u][/b]
				[CorrelationID] => ce5d1cb4e4008
				[Version] => 2.0
				[build] => 2133933
[b]				    [u][Token] => EC-58A522101D272430B[/u][/b]
			)

	)

)

 

 

So you can see Paypal seems to be correctly accepting the message we're sending them, although the <address> section is incorrectly filled (ie in our setup we're not overriding the Paypal address).

 

However, when we then redirect people to Paypal with token we've received (to https://www.paypal.c...A522101D272430B ) we get an error saying: "Sorry — your last action could not be completed"

 

 

After contacting Paypal tehc Support they said the <address> is sending invalid information and needs to be removed. To fix this you either use user "Escaping" solution (posted above) or take our approach which was to go to the model XML files:

 

- Go to: /catalog/includes/paypal_wpp/xml

- Find setExpressCheckut.xml

(this file is the model file used to start the ExpressCheckout process)

- Make a copy of this file and save in case you need it (ie copy it to setExpressCheckout.xml.original )

 

- Open setExpressCheckut.xml

- Delete the whole section between <address> and </address> and Sae

 

This will immediatelly fix the issue.

 

Do note that with this approch if you later wish to use the OSCommerce stored address instead of Paypal's address, you'll need to reverse this procedure.

 

I really think the developper should update the contibution if he has the opportunity: either by re arranging the code or by using 2 different XML files for setExpressCheckout: one when we want to use the Paypal addresss (wihtout the <address> section) and another when you want to use the OSC address (that includes the <address> section).

 

We've been loosing quite an amount of business because of this.

 

Pay attention/be careful because this is a silent bug. It will not generate any errors on the store end (ie from the contribution's point of view there is no error; this is also partly Paypal's fault as they should be throwing the eror at th first contact and nto wait for customers to get to Paypal to thow the error).

 

The only way you can find out about it is if you start noticing you're not receiving Express Checkout Payments.

 

Regards

Pedro.

Edited by RoboSavvy
Link to comment
Share on other sites

  • 2 weeks later...

I have this year rebuilt my osCommerce site and am having problems with PayPal Pro UK Express checkout. I have installed the modules PayPal Website Payments Pro (Payflow Edition) - Express Checkout and also PayPal Website Payments Pro (Payflow Edition) - Direct Payment. I have an SSL licence applied and the Direct payment seems to work fine but the express does not work at all. Firstly there is no express buttom under the 'checkout or' as it should after adding an item in the basket. So if you go through checkout and them make PayPal as a choice of payment you then get an error message.Error a general problem has occured with the transaction. Please try later. No matter how many times you try it remians the same. I would appreciate some help as PayPAl say it is an oscommerce fault and they do not technically support any issues involving osCommerce!

Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Link to comment
Share on other sites

  • 1 month later...

Does anyone know how to add in the PRODUCT MODEL into the PRODUCTS section of the confirmation email using Dynamo Checkout?

 

If you can let me know I would be eternally grateful.

 

Thanks, Chris

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

  • 3 weeks later...

First time I have ever experienced this in my 3 years with OSCOMMERCE:

 

PayPal WPP Direct Payments & Express Checkout enabled:

 

Orders go thru fine, emails are sent, but no payment is received on my PayPal account?

 

Any ideas where to look?

 

Thanks!

 

Ricardo

Link to comment
Share on other sites

  • 2 months later...

I apologize up front for seeming like I am not a programmer, because I am not. The instructions were pretty simple except for two steps.

 

In the instructions at step # 12, it says to find this line.

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td>

 

I am unable to find this line in the current code. I have this.

 

 

?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

}

}

 

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

} elseif (!is_writeable(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

}

}

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

 

<tr>

<td>

<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">

<tr class="header">

<td valign="middle"><div align="center"><img src="http://www.pccoins.com/images/header_image.jpg" width="775" height="165" align="absmiddle"></div>

</td>

</tr>

</table>

<table width="775" height="28" border="0" align="center" cellpadding="0" cellspacing="0">

<tr class="headerNavigation">

<td class="headerNavigation">  <a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>" class="headerNavigation"><?php echo HEADER_TITLE_TOP; ?> | </a><a href="<?php echo tep_href_link(FILENAME_CONTACT_US); ?>" class="headerNavigation"><?php echo BOX_INFORMATION_CONTACT; ?> | </a><a href="<?php echo tep_href_link(FILENAME_ABOUT_US); ?>" class="headerNavigation"><?php echo BOX_HEADING_ABOUT_US; ?></a></td>

<td align="right" class="headerNavigation">

<?php if ((tep_session_is_registered('customer_id')) && (!tep_session_is_registered('noaccount')))

// DDB - PWA - 040622 - no display of logoff for PWA customers

{ ?>

<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?> </a>  | 

<?php } if (!tep_session_is_registered('noaccount')) // DDB - PWA - 040622 - no display of account for PWA customers

{ ?>

<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, 'my_account_f=1', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?> </a>  | 

<?php } ?>

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

</tr>

</table>

<?php

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

</tr>

</table>

<?php

}

 

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

</tr>

</table>

<?php

}

?>

 

Where should I place this code?

 

 

<?php

//---PayPal WPP Modification START ---//

$show_user_options = tep_paypal_wpp_show_user_options();

?>

<td align="right" class="headerNavigation">

<?php if ($show_user_options) { ?>

<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> |

<?php } ?>

<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> |

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> |

<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>

</td>

<?php //---PayPal WPP Modification END ---// ?>

 

 

In step # 10, I am supposed to find this code.

 

 

<?php

$initialize_checkout_methods = $payment_modules->checkout_initialization_method();

 

I can't find this code anywhere in this code. Our code is listed below.

 

 

<?php

/*

$Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require("includes/application_top.php");

 

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

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));

?>

<!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">

</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 bgcolor="#FFFFFF" width="775" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">

<!-- 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('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><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_cart.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

if ($cart->count_contents() > 0) {

?>

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[0][] = array('align' => 'center',

'params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_REMOVE);

 

$info_box_contents[0][] = array('params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_PRODUCTS);

 

$info_box_contents[0][] = array('align' => 'center',

'params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_QUANTITY);

 

$info_box_contents[0][] = array('align' => 'right',

'params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_TOTAL);

 

$any_out_of_stock = 0;

$products = $cart->get_products();

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

// Push all attributes information in an array

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

while (list($option, $value) = each($products[$i]['attributes'])) {

echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

where pa.products_id = '" . $products[$i]['id'] . "'

and pa.options_id = '" . $option . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . $value . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . $languages_id . "'

and poval.language_id = '" . $languages_id . "'");

$attributes_values = tep_db_fetch_array($attributes);

 

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];

$products[$i][$option]['options_values_id'] = $value;

$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];

$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];

$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];

}

}

}

 

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

if (($i/2) == floor($i/2)) {

$info_box_contents[] = array('params' => 'class="productListing-even"');

} else {

$info_box_contents[] = array('params' => 'class="productListing-odd"');

}

 

$cur_row = sizeof($info_box_contents) - 1;

 

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

 

$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .

' <tr>' .

' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .

' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

 

if (STOCK_CHECK == 'true') {

$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);

if (tep_not_null($stock_check)) {

$any_out_of_stock = 1;

 

$products_name .= $stock_check;

}

}

 

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

reset($products[$i]['attributes']);

while (list($option, $value) = each($products[$i]['attributes'])) {

$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';

}

}

 

$products_name .= ' </td>' .

' </tr>' .

'</table>';

 

$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',

'text' => $products_name);

 

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

$info_box_contents[$cur_row][] = array('align' => 'right',

'params' => 'class="productListing-data" valign="top"',

'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');

}

 

new productListingBox($info_box_contents);

?>

</td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>

</tr>

<?php

if ($any_out_of_stock == 1) {

if (STOCK_ALLOW_CHECKOUT == 'true') {

?>

<tr>

<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>

</tr>

<?php

} else {

?>

<tr>

<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></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="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 tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>

<?php

$back = sizeof($navigation->path)-2;

if (isset($navigation->path[$back])) {

?>

<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>

<?php

}

?>

<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></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 align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

}

?>

</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="0">

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

 

 

Where does this go in the code above?

 

 

<?php

//---PayPal WPP Modification START ---//

tep_paypal_wpp_ep_button(FILENAME_SHOPPING_CART);

//---PayPal WPP Modification END ---//

?>

 

If anyone could assist, I would greatly appreciate it.

Link to comment
Share on other sites

  • 3 months later...

I am troubleshooting an installation of this module. I have worked through several errors and fixed them, but now I have an error I find nothing on. It is when I run the diagnostics page:

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

Transaction refused because of an invalid argument. See additional error messages for details. (10360)

We didn't find any transactions associated with this email address.

 

I have searched this forum topic, the entire forum, the web and PayPal API errors and haven't found the error code, or anything on the last line (We didn't find any transactions associated with this email address).

 

Anyone have a solution, able to buy me a clue or point me in the right direction?

Edited by njaknjak
Link to comment
Share on other sites

I am troubleshooting an installation of this module. I have worked through several errors and fixed them, but now I have an error I find nothing on. It is when I run the diagnostics page:

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

Transaction refused because of an invalid argument. See additional error messages for details. (10360)

We didn't find any transactions associated with this email address.

 

I have searched this forum topic, the entire forum, the web and PayPal API errors and haven't found the error code, or anything on the last line (We didn't find any transactions associated with this email address).

 

Anyone have a solution, able to buy me a clue or point me in the right direction?

 

After working through a variety of errors, we finally cleared the paypal diagnostics. And then have had session/cookie problems, which I then fixed.

 

***************************************************

 

Now we have another problem. After I got this module working with the PayPal API certificate, our client tells us they have another site running on another server using the the API signature. I fixed this one, I broke that one. PayPal only allows you to use it one way or the other. So now we have a whole other set of problems, from lack of communication on the client's part.

 

I noticed that you (dynamoeffects) said several YEARS ago that you were going to look at make this module run with either the certificate or the signature. I cannot find where you did it. Is this still under consideration? I am sure there are many that use the same PayPal account for different sites, and could have different payment solutions where one used the certificate and another the signature - so they would be in this situation, also.

 

Any thoughts on doing this??

 

Thanks.

Link to comment
Share on other sites

  • 1 month later...

After working through a variety of errors, we finally cleared the paypal diagnostics. And then have had session/cookie problems, which I then fixed.

 

***************************************************

 

Now we have another problem. After I got this module working with the PayPal API certificate, our client tells us they have another site running on another server using the the API signature. I fixed this one, I broke that one. PayPal only allows you to use it one way or the other. So now we have a whole other set of problems, from lack of communication on the client's part.

 

I noticed that you (dynamoeffects) said several YEARS ago that you were going to look at make this module run with either the certificate or the signature. I cannot find where you did it. Is this still under consideration? I am sure there are many that use the same PayPal account for different sites, and could have different payment solutions where one used the certificate and another the signature - so they would be in this situation, also.

 

Any thoughts on doing this??

 

Thanks.

Did you have any luck with this situation? I would love to use this module for paypal transactions but, I already use the same account for another site which uses the signature without the certificate.

 

Also, I can't even create a certificate in PayPal Sandbox to test this.

 

Anyone have any thoughts on this?

Thank!

Link to comment
Share on other sites

  • 1 month later...

I've installed and set up this module, but when I try to test it I get this when I click the Express Payment button -

 

Unauthorized Access

 

Just that - blank page with two words. If I try entering my credit card details I get this -

 

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (Error No. 35)

 

Any ideas what the problem is?

Link to comment
Share on other sites

  • 11 months later...
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...