Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal IPN - Help, please...this problem has me stumped


Smiling Buddha

Recommended Posts

Hi,

 

On modules/payment I get this error when I click on paypal ipn:

Warning: call_user_func(tep_get_order_status_name) [function.call-user-func]: First argument is expected to be a valid callback in .../catalog/admin/includes/functions/general.php on line 1232

 

The weird thing is, it works fine on the site - as far as I can test. I just can't even edit the paypal ipn details because of the error

Link to comment
Share on other sites

  • 1 year later...

okay i think i just fixed it. :rolleyes:

 

what i did is i went to catalog\admin\includes\functions\general.php

and added the following functions:

 

  function tep_cfg_pull_down_order_statuses($order_status_id, $key = '') {
   global $languages_id;

   $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');

   $statuses_array = array(array('id' => '0', 'text' => TEXT_DEFAULT));
   $statuses_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "' order by orders_status_name");
   while ($statuses = tep_db_fetch_array($statuses_query)) {
     $statuses_array[] = array('id' => $statuses['orders_status_id'],
                               'text' => $statuses['orders_status_name']);
   }

   return tep_draw_pull_down_menu($name, $statuses_array, $order_status_id);
 }

 function tep_get_order_status_name($order_status_id, $language_id = '') {
   global $languages_id;

   if ($order_status_id < 1) return TEXT_DEFAULT;

   if (!is_numeric($language_id)) $language_id = $languages_id;

   $status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . (int)$order_status_id . "' and language_id = '" . (int)$language_id . "'");
   $status = tep_db_fetch_array($status_query);

   return $status['orders_status_name'];
 }

 

 

No more errors for me and it seems to be working fine now. Hope this helps somebody.

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.
Note: Your post will require moderator approval before it will be visible.

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