Pro sites. Issue with dashboard link

When a user registers, after the payment is made it redirects to a page where he can see a link to his wp-admin dashboard.
When you click on that it redirects to:
/upgrade/?bid=ID link, not dashboard.
All he can see is the pricing table and the following text:
Sign up for another site.

  • Predrag Dubajic
    • Support

    Hi Silvio,

    Hope you're doing well.

    In Pro Sites > Modules you have "Pay to Blog" module active, and when this is turned on it completely disables the site, back and front end, until it's paid.

    When I registered new site I did get redirected to PayPal but my payment didn't get through to Pro Sites so the site is still shown as unpaid.

    Can you double check that the PayPal information you entered is correct?

    If the issue is still there after that can you please perform a basic troubleshooting by disabling your other plugins and switching to default WP theme so we can see if any of those are conflicting with Pro Sites and cause the payments not to get through?

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Silvio,

    I did some additional tests with my PayPal and Stripe sandbox details and both seem to be having issues on your site.
    PayPal does register the payment but the notification of completed payment seems not getting to your site so the site still shows as unpaid.
    With Stripe I'm unable to complete the payment at all, it says that the level is not created on my Stripe account so it seems your site is not being able to contact it with the info needed to create a subscription there.

    Could you please perform a basic troubleshooting by disabling your other plugins and switching to default WP theme so we can see if any of those are conflicting with payment gateways?

    If that doesn't return any results please contact your host so they can check server logs and see if there's anything blocking outgoing and incoming connections to your site.

    As I mentioned above, Pay To Blog module that you have activated will not allow access to the site and it will redirect it to upgrade page until the payment is completed.
    So once we figure out what's blocking the payments on your site this should be working fine.

    Best regards,
    Predrag

  • silvio
    • Design Lord, Child of Thor

    Hi Predrag,

    I have done same as you mention above, that means I have deactivated all plugins and default Wordpress theme, but still getting same issues.

    I have configured everything well but it's not working as I need.

  • Predrag Dubajic
    • Support

    Hi Silvio,

    We would need to do some further investigation to see why this is happening on your installation because the tested details are working properly with Pro Sites setup on my test site.

    Could you provide us with FTP or cPanel details so we can dig deeper into this?
    You can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Predrag Dubajic"
    - Site login URL
    - WordPress admin username
    - WordPress admin password
    - FTP credentials (host/username/password)
    - cPanel credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant urls/info

    Also, is it ok if we disable plugins and switch theme during the tests?

    Best regards,
    Predrag

  • Adam Czajczyk
    • Support Gorilla

    Hello silvio

    I hope you're well today!

    I've let myself jump in until Predrag gets back online and I checked the site (both back-end configuration and on server) and I'd like to ask you for a little additional explanation.

    There's the file called "actualiza_pro_sites.php" in your install. I took a brief look at the code and it seems to be doing some manipulation directly on the database, including pro sites related data. Certainly, it is not a core WP file or a part of Pro Sites so it must have been custom developed. Could you tell me a bit more on that file? Unfortunately, I don't quite understand comments there (I'm sorry I don't speak the language and Google Translate is not especially helpful if it comes to that context) so I am not exactly sure what the file does.

    Also, is it somehow called out from your WP site? Or is it scheduled by cron or manually called? I understand that it might also be irrelevant but your explanation would help us understand the setup better :slight_smile:

    Best regards,
    Adam

  • silvio
    • Design Lord, Child of Thor

    we had an old platform that we don't use anymore that make the payments for the multisite , this php is one of them , but they all are isolated and don't interact or disrupt the prosites plugin, I want to use pro site plugin payment and not the custom made payment system that we had in the past.

    something our programm detect in your form is this error because both form have the same id when we want to use paypal and stripe.
    https://justblognow.com/upgrade/?action=new_blog

    [DOM] Found 2 elements with non-unique id #_signup_form: (More info: https://goo.gl/9p2vKq) <input type=?"hidden" id=?"_signup_form" name=?"_signup_form" value=?"ca2a055248">? <input type=?"hidden" id=?"_signup_form" name=?"_signup_form" value=?"e4970c37d9">?

    we disconnect stripe to have only one form but the error that we talk from the beginning still continue

  • silvio
    • Design Lord, Child of Thor

    we start this thread day 2 , now is day 10 and we don't have this problem solved, what we have to do to finish this and move forward ?

    We need this problem solved today please !

    best regards
    silvio fortunato

  • Predrag Dubajic
    • Support

    Hi Silvio,

    Sorry that this is taking this long, but there's something specific on your site that's causing weird behavior with Pro Sites functionality.

    The issue you mentioned above with ID reports in console is already being worked on for the next release, you can apply the patch by downloading the attached file, unzip it and place it inside your /wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front folder.
    However, this probably won't solve anything because we can't replicate the issue on our end even without the patch so it seems something else on your site is causing issues.

    Can you setup a staging site where we could do some further investigation, doing this on live site can cause issues as we would need to disable all of your plugins, disable your redirects and so on.
    You can send us login details to staging site as a response to our email conversation.

    Best regards,
    Predrag

  • silvio
    • Design Lord, Child of Thor

    thks for the patch , you can change whatever you want in our environment , 99% of the users aren't active and we are relaunch our platform , so you can try whatever you want but do it today please.

    you have access to our platform please install the patch and PLEASE solve the mais issue ASAP.

    best regards
    silvio fortunato

  • Predrag Dubajic
    • Support

    Hi Silvio,

    It looks like that your mu-plugins are not causing this, however I was unable to test without the other custom files that you have in your WP root folder as when I remove them your site stop loading completely.

    These are all the non-WP files located in your root folder and some are obviously being used by something since your site breaks when they are removed:

    actualiza_pro_sites.php
    actualiza_user_wp_manual.php
    actualiza_user_wp.php
    apaga_tabelas.php
    cria_blog_manual.php
    cria_user_wp.php
    enter.php
    funcdblocal.php
    olivier.xml
    output_actualiza.txt
    output_novo_user.txt
    output.txt
    silvio.xml
    teste_time.php
    teste1.php
    wordfence-waf.php
    xml_teste.php
    xml_teste1.php
    xmlrpc.php

    Can you tell us where those are being called from and what is their purpose, and can you also try excluding these from your site so we can test without modified WP installation and see if that gives us any improvements?

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Silvio,

    Sandbox accounts don't require SSL to be active so this shouldn't be an issue.

    After further testing we're still unable to determine what is causing this behaviour on your site so we have forwarded your thread to our developers to investigate it further.

    Could you also provide us with database access so they can check that as well?
    I will send you an email about this as well so check that and send the login as a response to that.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Silvio,

    It looks like you have contacted us with a different account previously and that's where I responded so I'm guessing that's why you didn't see my response.

    I did get your email and have updated developer report with that and hopefully we will have some good news soon.

    Best regards,
    Predrag

  • Lindeni Mahlalela
    • Recruit

    Hello silvio

    I hope you are doing great today. I am really sorry for the delay in fixing this issue. We have checked your setup and tried some various options to fix the issue.

    In order to verify the source of the checkout issue, I have replaced your Stripe API keys with mine to see what happens in Stripe after attempting a checkout. I noticed that there were no activities in Stripe and that was caused by the fact that the API version used in the plugin by default is older than the new Stripe API. To fix this, I applied a patch on the Stripe gateway files and switched to the latest API version in Stripe for the webhook defined for the Pro Sites setup.

    The modified gateway-stripe.php file is attached and it is for replacing the one in the location:

    wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php

    I have already replaced it on your site and have left my API keys in the settings for testing, you may replace them with yours again but for this to work properly you should update the webhook in Stripe so that it uses the new Stripe API, you can do this in "Developers > Webhooks" in Stripe Dashboard and it should look like this:

    With the API version being "2018-02-28". Once you have updated your webhook Pro Sites should continue to work as expected with regards to checkout with the Stripe Gateway.

    During my tests I have also found a few lines in debug.log file, these are related to Pro Sites Stripe Gateway as well:

    [13-Apr-2018 07:11:18 UTC] WordPress database error Duplicate entry 'sub_CfhxxxxxxxnX' for key 'ix_subscription_id' for query INSERT INTO wp175_pro_sites_stripe_customers(blog_id, customer_id, subscription_id) VALUES (1, 'cus_CfhxxxxxlY', 'sub_CfhSxxxxxxnX') ON DUPLICATE KEY UPDATE customer_id = VALUES(customer_id), subscription_id = VALUES(subscription_id) made by do_action('wp_ajax_nopriv_psts_stripe_webhook'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, ProSites_Gateway_Stripe::webhook_handler, ProSites_Gateway_Stripe::set_customer_data
    [13-Apr-2018 06:33:18 UTC] Error in /<WordPress_Install_Location>/wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php at line 3112No such customer: cus_ApUxxxxxzw
    [13-Apr-2018 06:33:07 UTC] Error in /<WordPress_Install_Location>/wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php at line 3112No such customer: cus_ApVDxxxxxxKyP

    I think the first one is because the subscriptions were not created in Stripe because of the API but were created locally in the Pro Sites database, so it tries to recreate them, the others are because of the change in Stripe account so if the customer was created in your account and then I changed to use my account, it will not find the customer with that ID in my account, that is why it shows those errors. I believe they should not happen again, I am just pointing them out so that you don't worry about them if you check the logs.

    I hope this helps. Please let us know if you have any further issues or queries and we will be more than happy to assist in any way possible.

    Have a nice day.
    Lindeni

  • Lindeni Mahlalela
    • Recruit

    Hello silvio

    I hope you are doing well, thanks for the feedback. I have checked your PayPal settings and everything looks fine in the Pro Sites settings but when I tried to subscribe for a new blog/site using the PayPal gateway I was able to proceed with everything normally but the site/blog was not activated.

    The reason why it does not activate after payment with PayPal might be because the IPN url is not set in PayPal. The IPN URL is the same concept as the Webhook URL in Stripe, you have to copy it from the PayPal settings in ProSites page "Pro Sites > Payment Gateways > PayPal", the URL looks like this:

    http://yourdomain.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn

    You have to copy it and go to your PayPal Dashboard and Login, then click on the Gear Icon at the top right next to "Profile":

    Then on the page that opens, click "My Selling Tools" and click "update" next to "Instant payment notification", click on “Choose IPN Settings” to enable IPN and enter your url. On the page that open, Paste the URL in the "Notification URL" field, choose "Receive IPN Notifications (enabled)" then click "Save", it should look like this:

    Once I have done this with my API credentials I was able to subscribe for a new site and it was activated successfully. I have left my API keys on your site so you can test, you may remove them once you have your IPN settings setup as suggested above.

    If payment notifications are not properly set, you may receive payments in your PayPal account but find that the Pro Sites does not update the sites on your setup, meaning, you may find that sites get expired even though you have received payment, this was the case on my inititial test, the payment went through on PayPal but Pro Sites didn't receive the notification it expected to activate the blog/site that is why it seems none was created/activated.

    in a future when there is a new version os pro sites and i upgrade it , it should work and don't destroy your patch ?

    I forgot to mention that this is a known issue and an official patch has been created and submitted to QA Team for review. It should be included in the next release, but before you update please check the changelog to see if this has been included in the release.

    I already upgrade stripe api in my stripe account

    What remains is to change the API keys on Pro Sites settings "Pro Sites > Payment Gateways > Stripe" under "Stripe API Credentials" section, change those with your API credentials you have previously set.

    I hope this helps. Please let us know if you need any further assistance and we will be happy to assist in any way possible.

    Have a nice day.
    Lindeni

    • silvio
      • Design Lord, Child of Thor

      the problem is that I already have one IPN link in my account for other project , can't your routine infomed paypal of what link he should call after payment and not have to setup in IPN in my paypal account , paypal have an old limitation to accept only one link, if we have several projects using the same paypal account we will be in trouble.

      what you suggest ?

  • Lindeni Mahlalela
    • Recruit

    Hi silvio

    Thank you for the feedback, unfortunately the is no way to achieve this on our plugin but there are some other ways this can achieved the simplest being to use another PayPal account, but if that is not an option then you can use the concept of an IPN Forwarder.

    I have checked online and have found that there are some plugins that can help you with this but most of them are commercial and the free ones are old but may still work, I haven't tested anyone of them so I am not in a position to recommend any, here they are:

    Free: https://github.com/cferdinandi/gmt-paypal-ipn-forwarder
    Commercial: https://wickedcoolplugins.com/the-plugins/ipn-redirect/
    Commercial: https://www.angelleye.com/product/wordpress-paypal-ipn-forwarder/

    Please note that I am not endorsing or recommending or saying any of these plugins will work for your needs I am only mentioning them as a way of helping you get solutions or directions quickly. If you use the free plugin or the paid one, you should deal with them or contact the respective developers should anything go wrong.

    You may also find this thread informative but it is very old and the code is also very old and requires some modification to make it work: https://premium.wpmudev.org/forums/topic/multiples-ipn-dynamically-setting-the-notification-url

    I hope this helps, please let us know if you need help with anything else.

    Have a nice day.
    Lindeni

    • silvio
      • Design Lord, Child of Thor

      thks a lot for your support and tips, I was thinks about make my own forward but i always keep forgetting that if we have a problem , someone had it too first and build a ready made solution, all the stuff was solved, many thks for all the incredible support.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.