Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal_Shopping_Cart_IPN


devosc

Recommended Posts

Hi Greg and All. :) I have install this contrib and it works great!! Thanks for all the hard work. I am having one small problem. When I go to edit an invoice in the admin area, I get the following error:

 

1146 - Table 'dbname_osc1.TABLE_PAYPAL_IPN' doesn't exist

 

select * from TABLE_PAYPAL_IPN where paypal_ipn_id = '0'

 

I did have version 1.6 installed b4 this one, but replaces listed files with ones from a new install plus your edits. I am hoping the fix is easy. :) Any help would be greatly appreciated.

 

Thanks,

Shanna

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Hi Shanna,

 

Have a look in catalog/admin/includes/database_tables.php at the bottom did you put the require DIR......... paypal/database_tables.php line in?

 

Also I see in you error message it is trying to find a paypal_ipn_id with a value of '0' which wouldn't or rather shouldn't give any IPN results, did you update the table paypal so that it's autoincrement value starts at the highest value, i.e. the last biggest paypal_ipn_id +1 from the 'orders' table, this will ensure that when you look at old orders it doesn't try to pull out the IPN details of new ones.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Hi Greg. Thanks for the quick response. I do have this in the databases_tables.php file:

 

//begin PayPal_Shopping_Cart_IPN

require_once(DIR_FS_CATALOG_MODULES . 'payment/paypal/database_tables.php');

//end PayPal_Shopping_Cart_IPN

 

AND. I completely spaced the auto-increment thing. :( Is there any way I can fix that? When I go to look in PayPal IPN in the admin area, there is nothing there.

 

Shanna

Link to comment
Share on other sites

Copy over the contents of paypal/database_tables.php into the admin.

 

Look the orders db table and find the last paypal/ipn order received this will/should have the highest paypal_ipn_id number.

Now using phpMyAdmin select the paypal table, click the operations tab, scroll to the bottom and change enter the last highest paypal_ipn_id number +1 or you try the following statement:

 

ALTER TABLE `paypal` PACK_KEYS =0 CHECKSUM =0 DELAY_KEY_WRITE =0 AUTO_INCREMENT =500

 

Where in the above 500 is the new autoincrement number.

 

You won't see your old IPNs, I didn't write a conversion script, but you new ones should show up, try out the the IPN Test Panel.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Ok... I added the few lines from paypal/database_tables.php into the /admin/includes/database_tables.php file. Is this what you wanted me to do? I also followed your instructions for the new autoincrement #.

 

I still get the same error. :(

 

1146 - Table 'bigbowba_osc1.TABLE_PAYPAL_IPN' doesn't exist

 

select * from TABLE_PAYPAL_IPN where paypal_ipn_id = '0'

 

[TEP STOP]

 

Thanks for all your help Greg.

 

Shanna

Link to comment
Share on other sites

You need to go through the install notes again, in the newest version (2.2) the main db table is 'paypal' and is defined as TABLE_PAYPAL not TABLE _PAYPAL_IPN, so this would suggest that somethings were overlooked in the new install.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

I'm also getting the same error as Shanna

 

Also i'm getting a BOX_CUSTOMERS_PAYPAL_IPN coming up under the Customers box in admin. Where did that come from as i can't find any referance to it anywhere?

 

What is that about "I quote"

 

"Have a look in catalog/admin/includes/database_tables.php at the bottom did you put the require DIR......... paypal/database_tables.php line in?"

 

As i can't find reference to that either.

 

Cheers for any info or help.

 

Richard

 

PS By the way i am using the Paypal IPN v0.981 for Milestone 2 version!

Link to comment
Share on other sites

While trying to test the paypal module installation (the john doe test) I received the following error:

 

Parse error: parse error, unexpected ';', expecting ')' in U:\www\sunsetwebdesign\html\catalog\admin\includes\classes\order.php on line 61

 

I checked line 61 but found nothing. Here's line 61 with surrounding text:

 

      $this->customer = array('name' => $order['customers_name'],

                              'company' => $order['customers_company'],

                              'street_address' => $order['customers_street_address'],

                              'suburb' => $order['customers_suburb'],

                              'city' => $order['customers_city'],

                              'postcode' => $order['customers_postcode'],

                              'state' => $order['customers_state'],

                              'country' => $order['customers_country'],

                              'format_id' => $order['customers_address_format_id'],

                              'telephone' => $order['customers_telephone'],

                              'email_address' => $order['customers_email_address']);

 

What is a parse error? What am I missing?

 

Also having problems still with adding new customers.

Link to comment
Share on other sites

Hi, would someone please look at my configuration file below and tell me whether that could cause the paypal shopping cart IPN contribution to stop working?

 

The symptom is that it always gives the Pending Paypal Notification status to an order and never changes it to anything else. It should change it to Paypal Order, I think. I have the PayPal account set up correctly, I believe, with auto return on and data transfer on. If someone could list or email or message me the exact options I can double check.

 

<?php

/*

  $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://affordable-books-and-stuff.com');

define('HTTPS_SERVER', '');

  define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'http://affordable-books-and-stuff.com');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', '/images/');

define('DIR_WS_ICONS', '/images/icons/');

  define('DIR_WS_INCLUDES', 'includes/');

  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost');

  define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql');

?>

 

Out of several tests, I have only gotten one or two to work correctly, and now, after I added the Contribution for Group Discounts, it does not work at all.

 

I have eliminated the catalog directory and moved everything to public_html, I hope correctly, and I did this before adding the last contribution.

 

Thanks for your time.

 

CharleyShipman

Link to comment
Share on other sites

HI Greg. Where is the TABLE_PAYPAL defined? (what file?) Also was it called TABLE_PAYPAL_IPN in version 1.6 amd lower? Pehaps I missed something in a file. he thing is.. I have it working w/o trouble on another domain.. same files... same server, etc. Thanks.

 

Shanna

Link to comment
Share on other sites

Dealing with 3 different problems, hoping someone can help please:

 

1. When trying to e-mail a customer through the admin panel:

 

Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in U:\www\sunsetwebdesign\html\catalog\admin\includes\classes\email.php on line 502

 

Warning: Cannot modify header information - headers already sent by (output started at U:\www\sunsetwebdesign\html\catalog\admin\includes\classes\email.php:502) in U:\www\sunsetwebdesign\html\catalog\admin\includes\functions\general.php on line 18

 

2. When trying to purchase an item as a new customer and adding new customer (can purchase as an existing customer):

 

Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in U:\www\sunsetwebdesign\html\catalog\includes\classes\email.php on line 502

 

Warning: Cannot modify header information - headers already sent by (output started at U:\www\sunsetwebdesign\html\catalog\includes\classes\email.php:502) in U:\www\sunsetwebdesign\html\catalog\includes\functions\general.php on line 29

 

3. When trying to run the John Doe test through the Admin panel, I get NO IPN listing. I set up the module just fine but under the Customers, PayPal IPN, there are no PayPal Instant Payment Notifications listed. I made the changes at paypal.com.

 

Any help or suggestions would be greatly appreciated.

 

My store is at: http://www.sunsetwebdesign.com/catalog/

 

Running Windows 2000 Professional Server

Microsoft-IIS/5.0

osCommerce 2.2

PHP version 4.3.5

MySQL 4.0.18-nt

Edited by sunsetwebdesign
Link to comment
Share on other sites

I managed to fix problems #1 and #2, still need help with #3.

 

Added the paypal module, enabled it on paypal.com, have the new paypal screen in the admin panel, made settings per module instructions. Still no IPN's listed, no John Doe, no others after testing.

 

What am I missing? :huh:

Link to comment
Share on other sites

*sigh*

 

I figured out my problem. There was 1 single extra space in my admin/orders.php file. It was in the middle of the file. Argh. I am sorry for giving you a mental workout Greg. ;) Hopefully this will be the last of my problems.

 

back to testing. Thanks again.

 

Shanna

Link to comment
Share on other sites

The 5/15/2004 update listing says this:

In 'orders_session_info' the fields 'sendto' and 'billto' need to be of type 'int(11)'.

the sql files says this:

DROP TABLE IF EXISTS orders_session_info;

CREATE TABLE orders_session_info (

  orders_id int(11) NOT NULL default '0',

  sendto int(1) NOT NULL default '1',

  billto int(1) NOT NULL default '1',

 

Is it init(1) or init(11)?

Link to comment
Share on other sites

Ah shucks, the other day I thought I'd try and quickly update the download section to save future descrepencies etc and was thinking faster than I was typing, yeah it should be int(11). Thanks for pointing that out.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

I get the following error when testing the paypal shopping cart ipn:

 

1054 - Unknown column 'products_options_id' in 'field list'

 

select products_options_id, products_options, products_options_values_id, products_options_values, options_values_price, price_prefix from orders_products_attributes where orders_id = '2147483647' and orders_products_id = '3'

 

I have intslalled the the ips several times to no avail. I have triple checked the install instructions, looked on the borad but find no answer.

 

I also get the following error from the "orders" in admin:

 

1054 - Unknown column 'o.paypal_ipn_id' in 'on clause'

 

select p.payment_status from paypal p left join orders o on p.paypal_ipn_id = o.paypal_ipn_id where o.orders_id ='2147483647'

 

ANy ides?

Link to comment
Share on other sites

Just installed Paypal Shopping Cart IPN and am now getting the following error:

 

Fatal error: Call to undefined function: tep_session_is_registered() in /41/d87175533/htdoc/cart/includes/classes/shopping_cart.php on line 81

 

Line 81 is:

 

if (tep_session_is_registered('customer_id') && ($reset_database == true)) {

 

 

 

I have installed this mod after installing the Gift Voucher and Discount Mod on a clean install.

 

 

Any help greatfully received.

Link to comment
Share on other sites

I've installed all the latest patches for the IPN but still having problems.

Including the tinyint to int(11) fix

 

Every order comes back as Pending PayPal Notification

the Paypal_IPN table is blank

the Paypal section on the Admin orders screen is blank

 

Some customers are able to pay (but their order remains in the above state)

and a lot of customers can't pay at all - though none of them have supplied me with details of the problem they are having.

 

I ran the test IPN page and it actually worked and put John Doe in the table

I've tested it with a friends paypal account and it doesn't make any difference if you click to return to website or not - still remains in the above state.

 

I have 140+ customers and 100+ orders on the system

 

any ideas?

If I could think of something witty to say I would add a signature.

Link to comment
Share on other sites

I'm having the exact same problem. Hopefully some nice board member will give us a solution to this. I triple checked too and can't figure out what I'm doing wrong either.

Link to comment
Share on other sites

Just installed Paypal Shopping Cart IPN and am now getting the following error:

 

Fatal error: Call to undefined function: tep_session_is_registered() in /41/d87175533/htdoc/cart/includes/classes/shopping_cart.php on line 81

 

Line 81 is:

 

    if (tep_session_is_registered('customer_id') && ($reset_database == true)) {

 

 

 

I have installed this mod after installing the Gift Voucher and Discount Mod on a clean install.

 

 

Any help greatfully received.

Spiceworld

 

found where the function is defined at line 74 of includes\functions\sessions.php

 

function tep_session_is_registered($variable) {

return session_is_registered($variable);

}

 

 

might be worth checking that file hasn't been changed with one of your other updates

If I could think of something witty to say I would add a signature.

Link to comment
Share on other sites

3. When trying to run the John Doe test through the Admin panel, I get NO IPN listing. I set up the module just fine but under the Customers, PayPal IPN, there are no PayPal Instant Payment Notifications listed. I made the changes at paypal.com.

I get the John Doe test to work - though not much further than that....

 

Probably pretty obvious to most people but this fooled me for a while....

When you set the paypal module to test mode there is a test page link, so off I toddled to the test page but never actually saved the paypal module so test mode was still off.

 

Next every time you've press the test button you needd to update the Transaction ID field on right column of the test page - I just incremented the PAYPAL000000 number by 1 each time. The custom field above has your order number in.

 

Next one I tried was checking the next auto-increment number on the paypal table

is the same as the auto-increment number on the orders table.

This probably assumes you have got the Synchronize Invoice set to true

 

Just noticed that the paypal_ipn_id field at the end of the orders table only seems to get populated from test mode - not that there is anything else in the paypal_ipn table for it to link too mind you...

If I could think of something witty to say I would add a signature.

Link to comment
Share on other sites

Hi FlaemDragon,

 

I tried that test page too. Just got sent to a blank page (http://www.sunsetwebdesign.com/catalog/ipn.php)

 

Still no IPNs listed with orders or under PayPal Instant Payment Notifications. I followed the directions to a "t" and it's still not working.

 

I finally got rid of all my errors popping up and now I'm stuck on this paypal module IPN thingy and the Download module not showing buttons. It's so discouraging. I've search the forums, posted (and gotten little advice, but at least a few people responded), and the wiki stuff wasn't helpful at all. Such a great piece of software but so little support for it, it's really frustrasting. For us newbies, it's very complicated (but easier to understand the more you work through the install) but the documentation is mostly over our heads.

 

I've been working on this for 2 months and am at the end but almost ready to throw in the towel and go back to just html. :(

Link to comment
Share on other sites

Hi there,

 

I don't have much time as I used too and I don't really get anything out of this other than the pleasure of progamming.

 

When you run the IPN Test Panel and are not in Test Mode a big red banner appears immediately below the page header saying that test mode is off. If you also scroll down to the bottom of the page there are some instructions, enough to test the IPN.

 

99.5% of the time when the IPN Test works but then the IPN doesn't work in in 'Live Mode' is because the Primary Email address and the Business ID are not configured correctly, below is what the PayPal_Shopping_Cart_IPN documentation says in step 5:

# E-Mail Address

Enter your Primary PayPal email address here.

 

# Business ID

If you have configured a secondary email address to be your business email address in your PayPal profile account,

then enter this here, otherwise enter the one used above.

Log into your PayPal profile to see what and how many emails you're using and which is the primary email address.

 

Dawn if you're getting a blank page when you click the IPN Test button then it would seem that there is an error occuring, you would need to edit catalog/includes/modules/payment/paypal/application_top.php and switch the error reporting back on by commenting out 'error_reporting(0);' and uncommenting the line above ('error_reporting(E_ALL & ~E_NOTICE);').

D, I also noticed that you're looking into the Downloads Controller, these 2 contributions will not *immediately* work together, one or the other would need some modifications to do so.

 

In v2.2 there are no references to TABLE_PAYPAL_IPN, this table is reminiscent of previous versions, so the latest edits most be performed.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...