paypal express email not saving

Paypal express email not saving in payment settings. Global cart is selected on multisite install. I have two stores and neither are saving.
I think this is why I'm getting the error:
"There was a problem connecting to PayPal to setup your purchase. Please try again.
10002 - Authentication/Authorization Failed - You do not have permissions to make this API call"

  • PC
    • WPMU DEV Initiate

    Hey there,

    Thanks for posting on the forums :slight_smile:

    Can you kindly update the site to the latest WordPress and MarketPress version and then try again to see if that fixes the issue ?

    Please advise.

    Cheers, PC

  • aristath
    • Recruit

    Hello there @mazza, I hope you're well today!

    Could you please grant me access to your backend so that I may see exactly what is happening?
    To do so, from your dashboard go to WPMUDEV => Support => Support Access and click on the "Grant access" button.

    Cheers,
    Ari.

  • mazza
    • Flash Drive

    - Marketpress Network settings for Global widgets/Global shopping cart don't save, if they do Paypal Express settings are unavailable or don't save. Global URL slugs also don't always save. They are as follows [shop / categories / tags]
    - In each shop [there are 2] Paypal merchant email doesn't save

  • aristath
    • Recruit

    Hello again @mazza,

    There's definitely something weird going on there... I was able to set the payment gateway, but as soon as I tried fixing the permalinks structure I got this error message:
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'MP_Gateway_Paypal_Express' does not have a method 'network_settings_save' in /home/rarebags/public_html/core/wp-includes/plugin.php on line 192

    I have notified our second level support guys on this issue, they're basically the code gurus.
    Hopefully they'll be able to shed some more light on this and help us resolve it!

    Cheers,
    Ari.

  • aristath
    • Recruit

    Hello again @mazza,

    I tried accessing your site and I got the following error:

    Warning: Cannot modify header information - headers already sent by.....

    This message indicates that somewhere on your installation a php file outputs headers before its time.
    You can solve this issue by following the process below:
    * Using FTP:
    1. Open up your wp-config.php file. If there is a closing PHP tag atr the end of that file, ( ?> ) delete it. If that works then there's no need to proceed.
    2. Rename the wp-content/plugins folder to wp-content/plugins-old and create a new folder called wp-content/plugins. If you no longer get the errors, then a plugin is to blame, or a plugin combined with your theme. CAUTION: DO NOT VISIT your plugins.php page from your dashboard.
    3. Download a new copy of the MarketPress plugin from https://premium.wpmudev.org/project/e-commerce/ extract it on your computer and upload the plugin folder to wp-content/plugins. Are you still getting these errors? If you are, then the issue is probably the theme you're using. If you're not getting this issue any more, then start moving all plugins from wp-content/plugins-old to wp-content/plugins one by one and each time check if the error is back. If you see the error then we just found the plugin that probably causes this.

    Next, you'll have to inspect the files of the plugin or theme that triggers this error.

    Open all php files one by one and check for the following:

    If there is a space or blank line before the opening <?php tag on the file, delete those spaces or lines.

    If there is a closing ?> tag at the end of the file, delete it.

    As stated in the PHP docs,

    The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include or require, so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

    I hope that helps!

    Cheers,
    Ari.

  • mazza
    • Flash Drive

    1 - wpconfig fine
    2 - rename plugins folder - no errors
    I got to step 3 (downloading and putting in new marketpress) and received the same errors* with the fresh copy. Even with it being the only plugin in the new dir. Without marketpress there are no errors.
    I had two functions.php (extra one in child theme) I reduced the doubleup and that no longer appears as an error.
    I put each plugin back in one by one and all fine until adding in marketpress. In addition to the error shortcodes obviously don't work either, so unable to access/view any products.
    Line 106 in marketpress.php checks if global cart is set to true, can it just be defaulted to global cart without checkgin? This is my noob question, please oh code wizards fix my site as I am lost without it!

    *Warning: Illegal string offset 'global_cart' in /home/rarebags/public_html/core/wp-content/plugins/marketpress/marketpress.php on line 106
    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/..../marketpress/marketpress.php:106) in........framework/zilla-admin-init.php on line 16

    Line 14-17 in that file is this:

    // Enable sessions
        if( !isset( $_SESSION ) ){
            session_start();
        }
  • aristath
    • Recruit

    Hello again @mazza!

    Thank you for testing this... Now we're closer to identifying the cause of this. :slight_smile:

    I have notified our code gurus on this thread, hopefully their insights will help us figure this one out and solve the issue you're facing!

    Cheers,
    Ari.

  • aristath
    • Recruit

    Can you please also try updating to the latest version of MarketPress? The current version is 2.9.4.8 and from what I can see you have 2.9.4.6 installed.
    The latest version included some fixes in the payment gateways, perhaps this will solve the issue you're dealing with as well.

    Cheers,
    Ari.

  • mazza
    • Flash Drive

    Info sent cheers jonathan.
    Also note, the errors occurred after I went to marketpress network settings and saw that global cart had no option selected. I re-selected everything and saved - that's when trouble started as it wouldn't save and first box again had no option selected at all. I went and checked these global settings as each store wouldn't save the paypal email address, it would stay blank after save.

  • mazza
    • Flash Drive

    I changed the marketpress folder name a few times [so it was effectively on/off] and retried inputting the multisite marktepress options and they stuck! It seems my issue has been fixed. Perhaps the last update did the trick but took a bit of resetting to come into effect? The first few times even with changing folder names it did nothing but since I gave ftp details and reset it's working. So thanks @Jonathan if you did a few tweaks and if not oh well it's solved itself.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.