Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi dealbas can you share your shopping cart URL.

    Thank you

    Thread Starter dealbas

    (@dealbas)

    There isnt a cart page. The main shop page is http://www.hopeforthree.org/shop43

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi I clicked on the Add to Cart button for the following product Order your 2015 calendar today! and it took me to PayPal.

    I carried out the above test using Firefox browser.

    Can you test on a different browser? Can you also clear the browser cache?

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Sorry forgot to mention no errors were displayed.

    Plugin Author mra13

    (@mra13)

    Something weird is going on your site. That IPN URL should not redirect to the PayPal page. Have you or someone else modified any code of this plugin?

    Thread Starter dealbas

    (@dealbas)

    I just installed it from the wordpress.org repo.

    Here is the function the error is referring to:

    // Start of IPN handling (script execution)
    function wpc_handle_paypal_ipn()
    {
        $debug_log = "ipn_handle_debug.log"; // Debug log file name
        $ipn_handler_instance = new paypal_ipn_handler();
    
        $debug_enabled = false;
        $debug = get_option('wp_shopping_cart_enable_debug');
        if ($debug){
            $debug_enabled = true;
        }
    
        if ($debug_enabled)
        {
            echo 'Debug is enabled. Check the '.$debug_log.' file for debug output.';
            $ipn_handler_instance->ipn_log = true;
            //$ipn_handler_instance->ipn_log_file = realpath(dirname(__FILE__)).'/'.$debug_log;
        }
        $sandbox = get_option('wp_shopping_cart_enable_sandbox');
        if ($sandbox) // Enable sandbox testing
        {
            $ipn_handler_instance->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
            $ipn_handler_instance->sandbox_mode = true;
        }
        $ipn_handler_instance->debug_log('Paypal Class Initiated by '.$_SERVER['REMOTE_ADDR'],true);
        // Validate the IPN
        if ($ipn_handler_instance->validate_ipn())
        {
            $ipn_handler_instance->debug_log('Creating product Information to send.',true);
            if(!$ipn_handler_instance->validate_and_dispatch_product())
            {
                $ipn_handler_instance->debug_log('IPN product validation failed.',false);
            }
        }
        $ipn_handler_instance->debug_log('Paypal class finished.',true,true);
    }

    Do you see anything wrong??

    Thread Starter dealbas

    (@dealbas)

    Okay. So IPN wasnt enabled on the paypal account. I have sinced enabled it. Now Im seeing this

    Fatal Error: Call to undefined function wpc_handle_paypal_ipn() in /var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php on line 28
    Description
    
    The WP Simple Paypal Shopping cart plugin code created an error that caused PHP execution to fail.
    
    The code tried to run a function that doesn't exist (wpc_handle_paypal_ipn()). This type of error is typically caused by a simple typo (is_hom() rather than is_home()), by calling a function provided by a plugin when that plugin is not activated, by calling a function before it is ready (such as calling a function before the code that creates it has run), or by using a function that no longer exists (the function may have been removed from WordPress core or the plugin/theme that previously supplied it).
    
    Solutions
    
    Invalid code modifications can cause this problem. If you have made any modifications to the plugin, remove them and try to load the site again.
    It is possible that this plugin's code is out of date and that an upgrade is available. Check with the plugin's author to see if an upgrade is available.
    There may be a conflict with another plugin running on the site. Try upgrading the other plugins on the site. A plugin conflict can be ruled out by deactivating all the other active plugins on the site and checking to see if the error still occurs.
    The WP Simple Paypal Shopping cart plugin may not have been fully uploaded. Uploading the plugin again could fix the issue. Important: If you do this, you will lose any modifications made to the plugin.
    Error Source Details
    
    Type	Plugin
    Name	WP Simple Paypal Shopping cart
    Version	v4.0.7
    Author	Tips and Tricks HQ, Ruhul Amin
    Path	/var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart
    File	wp_shopping_cart_misc_functions.php
    Other Software Details
    
    WordPress Version	4.1.1
    PHP Version	5.3.3
    Full Error Details
    
    Type	Fatal Error (E_ERROR)
    Message	Call to undefined function wpc_handle_paypal_ipn()
    File	/var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php
    Line	28
    Type Description	This type of error indicates that PHP cannot continue to run the code. Typical causes of this type of error are code bugs that have typos, missing or incomplete files (such as a file that was only partially uploaded), and the code using more memory than it is allowed.

    What sticks out is this line
    The code tried to run a function that doesn't exist (wpc_handle_paypal_ipn()). This type of error is typically caused by a simple typo (is_hom() rather than is_home()), by calling a function provided by a plugin when that plugin is not activated, by calling a function before it is ready (such as calling a function before the code that creates it has run), or by using a function that no longer exists (the function may have been removed from WordPress core or the plugin/theme that previously supplied it).

    Looking at the code should “wpc_handle_paypal_ipn()” be “wpc_handle_paypal_ipn())” ???

    function wp_cart_init_handler()
    {
        $orders_menu_permission = apply_filters('wspsc_orders_menu_permission', 'manage_options');
        //Add any common init hook handing code
        if( is_admin() && current_user_can($orders_menu_permission)) //Init hook handing code for wp-admin
        {
            wpspc_create_orders_page();
        }
        else//Init hook handing code for front end
        {
            wpspc_cart_actions_handler();
            add_filter('ngg_render_template','wp_cart_ngg_template_handler',10,2);
            if(isset($_REQUEST['simple_cart_ipn']))
            {
                include_once('paypal.php');
                wpc_handle_paypal_ipn();
                exit;
            }
        }
    }
    Thread Starter dealbas

    (@dealbas)

    I tried the PayPal’s IPN simulator but its showing “We could not send an IPN due to an http error.”

    Plugin Contributor mbrsolution

    (@mbrsolution)

    @dealbas that is very strange. Can you uninstalled the plugin and install a fresh copy from wordpress.org. Then carry out another test.

    Thread Starter dealbas

    (@dealbas)

    Sorry about my absence.
    Is the ipn listener http://www.hopeforthree.org/?simple_cart_ipn=1 ?
    Im getting an error, if you stop the page from redirecting to paypal and look at the details you’ll see whats going on.
    Ive enabled and disabled IPN on paypal with the notification url set to http://www.hopeforthree.org and http://www.hopeforthree.org/?simple_cart_ipn=1
    Neither setting made a difference.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi this post is six months old. Have you updated the plugin to the latest version?

    Thread Starter dealbas

    (@dealbas)

    The cart works fine, thanks. But that error keeps being emailed.

    Yea, I updated to 4.1.4. Is the ipn listener http://www.hopeforthree.org/?simple_cart_ipn=1 ?

    Plugin Contributor mbrsolution

    (@mbrsolution)

    When I click on the link above it takes me to a redirect page and then to PayPal. So the link works for me.

    Thread Starter dealbas

    (@dealbas)

    Yes the link will take you to paypal, but a email keeps being sent

    Please check your server that handles PayPal Instant Payment Notification (IPN) messages. Messages sent to the following URL(s) are not being received:

    http://www.hopeforthree.org/?simple_cart_ipn=1

    If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information.

    Once you or your service provider fix this problem, you or your service provider can resend the failed messages from the IPN History page. If this problem continues, PayPal may disable the IPN feature for your account.

    Thank you for your prompt attention to this issue.

    Thanks,
    PayPal

    The error on the page says

    Fatal Error (hide details) (remove)
    The site encountered a problem that it cannot recover from. Please use the following information to try to resolve the problem.

    Error Message

    Fatal Error: Call to undefined function wpc_handle_paypal_ipn() in /var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php on line 19
    Description

    The WP Simple Paypal Shopping cart plugin code created an error that caused PHP execution to fail.

    The code tried to run a function that doesn’t exist (wpc_handle_paypal_ipn()). This type of error is typically caused by a simple typo (is_hom() rather than is_home()), by calling a function provided by a plugin when that plugin is not activated, by calling a function before it is ready (such as calling a function before the code that creates it has run), or by using a function that no longer exists (the function may have been removed from WordPress core or the plugin/theme that previously supplied it).

    Solutions

    Invalid code modifications can cause this problem. If you have made any modifications to the plugin, remove them and try to load the site again.
    It is possible that this plugin’s code is out of date and that an upgrade is available. Check with the plugin’s author to see if an upgrade is available.
    There may be a conflict with another plugin running on the site. Try upgrading the other plugins on the site. A plugin conflict can be ruled out by deactivating all the other active plugins on the site and checking to see if the error still occurs.
    The WP Simple Paypal Shopping cart plugin may not have been fully uploaded. Uploading the plugin again could fix the issue. Important: If you do this, you will lose any modifications made to the plugin.
    Error Source Details

    Type Plugin
    Name WP Simple Paypal Shopping cart
    Version 4.1.4
    Author Tips and Tricks HQ, Ruhul Amin
    Path /var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart
    File wp_shopping_cart_misc_functions.php
    Other Software Details

    WordPress Version 4.3.1
    PHP Version 5.3.3
    Full Error Details

    Type Fatal Error (E_ERROR)
    Message Call to undefined function wpc_handle_paypal_ipn()
    File /var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php
    Line 19
    Type Description This type of error indicates that PHP cannot continue to run the code. Typical causes of this type of error are code bugs that have typos, missing or incomplete files (such as a file that was only partially uploaded), and the code using more memory than it is allowed.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    You should only add the following http://www.hopeforthree.org to your PayPal IPN?

    I know you mentioned above that you already added the URL I mentioned above. If this is not working then there is something wrong in your PayPal account or your website.

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Some undefined function is causing IPN errors, need fix/patch please’ is closed to new replies.