Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pay Pal IPN problem


Recommended Posts

Hello... I finally went and tried to install the Pay Pal IPN module after having tons of problems with the regular Pay Pal one. Now, I installed all of the files, but when I click on it in my admin, I get this error: Warning: call_user_func() expects first argument, 'tep_get_order_status_name', to be a valid callback in /home/virtual/site27/fst/var/www/html/shop/admin/includes/functions/general.php on line 1232

 

It won't allow me to make any edits. And if I try to purchase a product with it in my cart, it ends up reloading to my main page since the page it's trying to go to doesn't exist.

 

CAN ANYONE HELP?

Link to comment
Share on other sites

If I try to edit the module in my Admin, I get this error:

 

Fatal error: Call to undefined function: tep_cfg_pull_down_order_statuses() in /home/virtual/site27/fst/var/www/html/shop/admin/modules.php(204) : eval()'d code on line 1

Link to comment
Share on other sites

I was having the same problem as you. The only work around right now that I am aware of, is to install PayPalIPN .97 and not .971.

 

I hope this helps

Link to comment
Share on other sites

ok,

 

take a step backwards, thats the one I had, and it gave me the exact same problems you are encountering.

 

use paypalipn_v097 not paypalipn_v0971

Link to comment
Share on other sites

Now I installed the .97 version and it does work.... but the sales are still not recording in the OScommerce cart and the items are not listed in the Pay Pal email or site either. What could I have set wrong?

Link to comment
Share on other sites

is it in test mode?

 

If so, you will need to do an order, minus paying for it at paypal, and then send a test IPN in the admin>paypal IPN>send test IPN.

 

It will send the email and create the order.

 

Also if your emails don't show the shipping or billing adress, use this fix found by dreamscape:

 

if using v.97 for either MS1 or for the newcheckout, it pulls the address incorrectly for the email.

 

I have tried this and it is working ok from what I can see:

 

at the bottom of paypal_notify.php, find and change:

tep_address_label($order->customer['id'], $order->delivery['format_id'], 0, '', "n")

to

tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "n")

 

and change

tep_address_label($order->customer['id'], $order->billing['format_id'], 0, '', "n")

to

tep_address_format($order->delivery['format_id'], $order->billing, 0, '', "n")

 

Also if you want, you can now try upgrading to v0.971. I just finished and was successful. I replaced all the old .php files from v0.97 to the ones supplied with v.0971, and then added the new code in the .txt files. I did notice that in v0.97 there is a file catalog/includes/classes/order.txt that wasn't in the folder for v0.971. I don't know that it is needed, but I left the file alone. I didn't uninstall anything from v0.97, but rather just added the new pieces of code in the .txt files.

 

Maybe somebody can shed a little more light on why this worked, when a clean install of v0.971 didn't.

Link to comment
Share on other sites

I may have found the problem???

 

The instructions say to intsert new code in a number of files. One of them is in Catalog->Includes->Modules->download.php.

 

It says to do this:

 

// You just have to modify this block of code:

 

It should be from this:

 

Now get all downloadable products in that order

$downloads_query_raw = "SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays

FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd

WHERE customers_id = '" . $customer_id . "'

AND o.orders_id = '" . $last_order . "'

AND op.orders_id = '" . $last_order . "'

AND opd.orders_products_id=op.orders_products_id

AND opd.orders_products_filename<>''";

 

To this:

 

// Now get all downloadable products in that order

$downloads_query_raw = "SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays

FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd

WHERE customers_id = '" . $customer_id . "'

AND o.orders_status != 99999

AND o.orders_id = '" . $last_order . "'

AND op.orders_id = '" . $last_order . "'

AND opd.orders_products_id=op.orders_products_id

AND opd.orders_products_filename<>''";

 

Note that there is only one little modification: the addition of "AND o.orders_status != 99999" to the SELECT.

 

I've found that when you do this a line is left in. Delete or rem out this line:

 

This will get rid of the main error that appears at the top in admin. You will now beable to edit the PayPal IPN parameters.

 

If this doesn't work try and reinstall the paypalipn.sql and upgrade sql again, you might have to delete the paypalipn.sql first to do so.

 

This will get the PayPal IPN to send the total amount to PayPal when checking out.

 

Neil.

Link to comment
Share on other sites

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...