Pro Sites No Longer Upgrading After Payment

Hi, I searched but couldn't find any other similar reports...

A user just notified me that their site was not upgraded after they completed their payment. I don't know how many other sites have been affected (searching now) or how long this has been going on. I'm running v.3.5.4 and it may have started after that upgrade.

For the record, we are using the legacy Supporter gateway. The supporter-paypal.php file in the new version is identical so I did not replace that. I also use ( Aaron ) Aaron's IPN forwarder script. But I have confirmed in Paypal that all IPNs are being sent successfully. The IPN data is also clearly being recorded via the plugin in the Log, but the site level is still not being upgraded. (See screenshot.)

What other information might you need from me to help resolve this quickly? I will continue to troubleshoot and report back with anything odd. I have not yet manually extended the Supporter III level to the site in question (ID 3893). Doing that in the past has really messed up subscriptions once the issue is fixed. But I do need to upgrade the site soon!

I have extended Support Access for the tripawds.com network. Thanks in advance for the help!

    Adam Czajczyk

    Hello jcnjr,

    I hope you're well today and thank you for your question!

    I assume there is a reason to use such kind of setup so that wouldn't be possible to temporarily switch to a "regular" PayPal with no IPN forwarding script on a way?

    If that's not possible, would you be able please to perform two more tests on the site? The first one would be to sign up for a completely new site (paid) and see if that works or not. I mean the signup where you do not create free site first and then upgrade but just signup for a Pro Site in "one go" with the payment.

    The second one, if possible, would be to setup/eneable Stripe (may be in "sandbox/texting" mode) and see if that one works.

    Would that be possible? If yes, could you please conduct these tests and let me know about results? I would like to narrow that down a bit to know for sure whether this is related only to PayPal and if it affects signup as well as upgrade.

    Best regards,
    Adam

    jcnjr

    Thank yo for the quick reply Adam Czajczyk

    I assume there is a reason to use such kind of setup so that wouldn't be possible to temporarily switch to a "regular" PayPal with no IPN forwarding script on a way?

    No The forwarder script is necessary. It is the only way to use one Paypal account IPN on multiple domains like we do. And all IPNs are being sent successfully as confirmed in the Paypal IPN History log. And as mentioned, the Pro Sites log indicates receipt of the transaction IPN data.

    please to perform two more tests on the site? The first one would be to sign up for a completely new site (paid) and see if that works or not.

    I believe this is exactly what the user did, but regardless I just created a new user and site. I then upgraded the site and Supporter status was immediately extended.

    do not create free site first and then upgrade but just signup for a Pro Site in "one go" with the payment.

    There is no option to do this on our network. When a user creates a site, they are redirected to a page with the link to their site—which, by the way, includes a link to the main dashboard, not the user's site.

    I see no settings in the Pro Sites dashboard to present the Upgrade option on site creation option you describe. If what you mention is possible with the existing options, which I have not changed in years, the settings & tooltips are worded incorrectly: They say "signup on checkout" when they should read "upgrade on signup". Regardless, the option to upgrade "in one go" as you suggest was not possible. See second screenshot...

    So...I created a new site, and then upgraded it, and after checkout the Supporter status was correctly applied. This, however, was clearly not the case with the user who reported the problem. (I am still reviewing sites to see if others have been affected.)

    ...setup/eneable Stripe (may be in "sandbox/texting" mode) and see if that one works.

    Since the Paypal checkout worked correctly in my test, I will not be setting up stripe at this time.

    I appreciate your help troubleshooting this further. Please log in to my network dashboard and review my Pro Sites settings in case I am missing something.

    PLEASE ADVISE: How might I edit database entries to upgrade the user's site to the Level they paid for? I do not want to manually extend the Supporter status, since doing so will cause problems with renewal of the user's subscription.

    Thank You!

    jcnjr

    Well, this looks interesting...

    [10-Feb-2017 09:09:08 UTC] WordPress database error Table 'tripawds_wpmudb0709.wp_1881_options' doesn't exist for query SELECT option_value FROM wp_1881_options WHERE option_name = 'siteurl' LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/forthecause/template-fullwidth.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, call_user_func_array, ProSites->checkout_output, apply_filters('psts_primary_checkout_table'), WP_Hook->apply_filters, call_user_func_array, ProSites_View_Front_Checkout::render_checkout_page, ProSites_View_Front_Checkout::render_pricing_columns, ProSites_View_Front_Checkout::render_free, get_admin_url, get_site_url, get_option

    NOTE: The site with this error above (1881) is not the Supporter site that had the trouble (3893). In fact, the site does not exist. There are 7 entries of this error in our Server logs for 10-Feb-2017 and the Supporter upgrade was attempted/paid by the user on 08-Feb-2017.

    Upon further inspection, the only other thing related to Pro Sites in the error logs from 01/30-02/11 include 12 entries of the following:

    [07-Feb-2017 07:50:00 UTC] PHP Warning: session_start(): open(/tmp/sess_prr0hrijcntb898lppg23auln1, O_RDWR) failed: Permission denied (13) in /home/tripawds/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/Helper/Session.php on line 29

    This second error appears on various dates, but none on 02/08 when the Supporter payment was made. Regardless, it looks either important or suspicious. Assuming the "Helper" session may be necessary for successful transactions, any suggestions for addressing that permission denial are appreciated.

    Dimitris

    Hey there jcnjr,

    hope you're doing good and don't mind chiming in here!

    [07-Feb-2017 07:50:00 UTC] PHP Warning: session_start(): open(/tmp/sess_prr0hrijcntb898lppg23auln1, O_RDWR) failed: Permission denied (13) in /home/tripawds/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/Helper/Session.php on line 29

    It seems to be a permission issue for the directory allocated to store PHP sessions, you may have to contact your hosting provider about this issue as well.
    Please have a look at my colleague Sajid's reply here:
    https://premium.wpmudev.org/forums/topic/pro-sites-continued-php-warning#post-999386

    I found these Pro Sites (psts) db tables in the options for the affected site.
    1. Are there any rows missing?

    I inspected a test installation of mine and I was able to locate some extra rows in there due to the Stripe gateway, nothing more.

    2. What to I need to change to give Supporter Level III access without manually extending via pro Sites?

    I have to advise our dev team about this, please spare me some time and I'll get back to you as soon as possible.

    Warm regards,
    Dimitris

    jcnjr

    Dimitris said:

    hope you...don't mind chiming in here!

    Not at all, Thank you! The more help the better.

    It seems to be a permission issue for the directory allocated to store PHP sessions

    FYI: /tmp directory indicated in the PHP error does exist, with appropriate permissions (755), and session data is being written since various sess_# do appear in the directory. If this is not related to the Supporter Upgrade I hope to resolve in this thread, and it proves problematic, I will open another ticket.

    I was able to locate some extra rows in there due to the Stripe gateway, nothing more.

    Thanks for looking. Aside from those clearly marked _stripe_ there appears to be some discrepancy in the psts_ tables. I'm just trying to confirm if everything looks appropriate here...

    My _options table for affected site:
    psts_payments_log
    psts_action_log
    psts_paypal_profile_id
    psts_blog_allowed_themes
    psts_waiting_step
    FYI: For our main site (wp_1_) we do have psts_signed-up and psts_withdrawn rows in the _options table.
    Your test install:
    psts_withdrawn
    psts_signed_up
    psts_stripe_*

    I have to advise our dev team about this...

    Thanks again. I am desperately hoping to hear back soon about how to upgrade the site to the level paid for without manually extending via the dashboard. The user has already repeatedly asked me why it hasn't happened yet.

    Dimitris

    Hey there jcnjr,

    hope you're doing good today!

    Thanks again. I am desperately hoping to hear back soon about how to upgrade the site to the level paid for without manually extending via the dashboard. The user has already repeatedly asked me why it hasn't happened yet.

    I already pinged our lead dev again about this, as it seems that he was overwhelmed lately by many tasks. I'll pass you any feedback/insights that I'll get, as soon as possible!

    Take care,
    Dimitris

    jcnjr

    I already pinged our lead dev again about this

    Thank you Dimitris

    I had to go ahead and manually upgrade the site. It was either that or refund the payment and lose the member...

    If possible, I still would like to know how to modify the site via the database for future reference in case this happens again. Ideally, if there is a way to remove the manual level extension and reassign the appropriate level in the database so the subscription is not affected when it renews, that would be great.

    I would also love to hear any insight as to why this may have happened, if anybody has any ideas...

    Thanks again!

    Dimitris

    Hey there jcnjr,

    hope you're doing good today!

    I just had some feedback from lead dev about the manual level extension of a site.
    So, if the subscription is active on Paypal, you need to update the expire timestamp in Pro Sites table wp_pro_sites ("wp" database prefix is the default one, you may have already changed this via wp-config.php file) for the respective site ID. You can use http://www.epochconverter.com/ to get a timestamp for a specific date.

    About the generic issue of sites not updating after a successful payment, I've already contacted a Second Level Support dev and he's going to show some love during next days, hopefully he'll be able to pinpoint the source of those inconsistencies (most probably are server related issues due to session variables not being set so I may have to ask for some server details later on).

    Take care,
    Dimitris