Pro Sites Card Info Update Issue

I have an issue with Pro Site when people try to upgrade or update their card information. When the user tries to upgrade or update their card, the page just refreshes, but it registers something in stripe.

  • James Morris
    • WordPress Enthusiast

    Hello Mathias

    In order to help you better with your issue, would you please grant me access to your site and server?

    Please visit the Contact page and complete the form with the following information:

    Subject: “Attn: James Morris”

    In the Message box, please provide the following:

    – link back to this thread for reference

    – any other relevant urls

    – Admin login:

    Admin username

    Admin password

    Login url

    – Hosting Control Panel Login

    Admin username

    Admin password

    Login url

    – FTP credentials

    host

    username

    password

    (and port if required)

    Best regards,

    James Morris

  • James Morris
    • WordPress Enthusiast

    Hello Mathias,

    I’ve taken some time today to look over your setup and run some tests on one of my testing sites. I’ve confirmed this issue is not exclusive to your site. I’m able to replicate this issue on my installation as well.

    I’m flagging this ticket as a bug report and reporting it to our Dev Team so they can look into this issue further. An update will be posted as soon as more information is available.

    Thank you for your patience while we sort through this issue.

    Best regards,

    James Morris

  • James Morris
    • WordPress Enthusiast

    Hello Mathias,

    I hope you are well today.

    I’ve spoken with the Developer and he’s provided the following patch for testing. I’ve tested this on my own dev environment and it worked without issue. Can you please try the attached on your site?

    * Before proceeding, please make a complete backup of your website

    * Please download the attached zip file

    * Extract it to a local directory on your computer

    * Upload the gateway-stripe.php file to /wp-content/plugins/pro-sites/pro-sites-files/gateways on your server

    I look forward to hearing back from you regarding your tests.

    Best regards,

    James Morris

  • James Morris
    • WordPress Enthusiast

    Hello Mathias,

    Given your site is live and rather large, I’m having some difficulty testing this on your environment without putting your processor in Sandbox mode.

    Do you have a staging site where I can test this on your server? If not, may I have permission to put your payment processor in Sandbox mode for just a few minutes while I perform additional tests?

    Best regards,

    James Morris

  • James Morris
    • WordPress Enthusiast

    Hello Mathias,

    I just want to give you a little update…

    We’ve been testing this further on your site and I’ve confirmed that the patch did not work in your situation. I’ve reported this to our Dev Team so they can look into this further.

    Any additional information you could provide would be great. Can you provide details on an account you’re seeing this problem with?

    Best regards,

    James Morris

  • Mathias
    • The Bug Hunter

    Update: Even if the cache is flushed, the user cannot update their card and re-subscribe. When the user tries to update the card and subscribe with the new card, the card is actually updated, but the subscription is not reactivated, and I have to do that manually from the dashboard.

  • Mathias
    • The Bug Hunter

    Any update here?

    Just so we’re clear about the issue: The new card information goes through just fine and gets updated in Stripe, but it doesn’t reactivate the blog subscription. After the users has entered the new information, then I can go to the admin dashboard and reactivate it manually.

  • Ivan
    • Developer

    Hi Mathias !

    It seems you provided SFTP credentials without write permission. WE need it for debugging this issue on your site. Could you add this permission?

    Also, I noticed that there is not Card Security Code: field for Stripe on your opgrader page. It’s requred field. Could you check it?

    Make sure that you added {your_domain.com}/wp-admin/admin-ajax.php?action=psts_stripe_webhook url to Stripe webhooks list(you can see notice about this on WP Dashboard -> Pro Sites -> Payment Gateways -> Stripe ) If you added it, please provide us credentials to your stripe account.

    https://premium.wpmudev.org/contact/#i-have-a-different-question

    Please visit our private Contact page and complete the form with the following information:

    Subject: “Attn: Ivan Svyrskyi”

    In the Message box, please provide the following:

    – link back to this thread for reference

    – any other relevant urls

    – Stripe login:

    Stripe username

    Stripe password

    Note: Don’t send any credentials via this forum because it’s public forum.

    Also, could you disable all caches for make sure that it doesn’t relate to caches?

    Best regards,

    Ivan.

  • Mathias
    • The Bug Hunter

    Hi Ivan.

    I have sent you the details now.

    The Card Security Code is showing just fine here? See attached image.

    The web hook is added in Stripe.

    Again, notice that this is not a problem with new customers, but with returning customers who wants to subscribe again.

  • Ivan
    • Developer

    Hi Mathias !

    I set test mode for Stripe on your site, added the link to webhook in Stripe account, created a new user on your site, subscribed him to Pro level and I see the subscription in Stripe.

    Then I canceled this subscription via Admin area of your site (WP Dashboard -> Pro Sites -> Manage Sites -> Blog ID ) and I checked it on Stripe service – subscription was canceled.

    Then I upgraded this subsite to Pro level again via a new Stripe credentials and I see this message after upgrading

    Then I checked a new subscription in Stipe service and via Admin area of your sites – it shows everywhere.

    Could you check it?

    Note: after my tests, I restore your live Stripe credentials on your site.

    Best regards,

    Ivan.

  • Ivan
    • Developer

    Hi Mathias !

    Unfortunately, I have no live credentials for Stripe :slight_smile:

    But I tested it and I noticed that we don’t show an error if something wrong. I added some changes to your site and now you can see what’s wrong. For example, in my case I see

    Could you check it again? And please, let me know what error do you see?

    If you have another site with the same issue – you can open this file {wordpress_folder}/wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.phpipe.php via FTP and replace this code (approximately 1857th lile)

    if ( $errmsg ) {
    $content .= '<div id="psts-processcard-error" class="psts-error">' . $errmsg . '</div>';
    }

    to this one

    $content .= '<div id="psts-processcard-error">';
    if ( $errmsg ) {
    $content .= '<div class="psts-error">' . $errmsg . '</div>';
    }
    $content .= '</div>';

    Also, I’ll add these changes to the next versions of the plugin.

    Best regards,

    Ivan.

  • Mathias
    • The Bug Hunter

    I have just tried again on our test blog in live mode, and it still doesn't work. I try to upgrade with a new card, and the customer gets updated, but nothing happens to the blog, and the upgrade page just refresh and says "Your subscription has been cancelled".

    I have attached an image, displayed that the users card is updated, but nothing happens to the subscription.

  • Ivan
    • Developer

    Hi Mathias !

    It’s weird. Did you tried it on https://blog***t.dk site?

    This issue becomes more hard for resolving because we can’t replicate it. Let’s try to do it together.

    Could you do the following test? Please, deactivate all plugins except Pro Sites and activate 2017 default theme, then open checkout page, and input Stripe credentials. Then, before hitting on “Subscribe” button, rename {wordpress_folder}/wp-content/debug.log file as debug-old.log via FTP. Then hit “Subscribe” button and if you will have the same result – please, download new {wordpress_folder}/wp-content/debug.log file and please, upload it to service like a Dropbox or Google Drive and paste link here ( or changing format this file to txtfile format, as that’s the only format you can attach here and attach it to your reply) I’ll continue to investigate it.

    Best regards,

    Ivan.

  • Mathias
    • The Bug Hunter

    Have just tried, problem still there.

    In the debug log, I have found this: [30-Oct-2017 21:09:13 UTC] Error in /wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php at line 2810No upcoming invoices for customer: cus_B7u9TX1mNK3xbQ

    The cus_B7u9TX1mNK3xbQ matches the customer for my test account with email: j1782522@trbvm.com

    The credit card gets updated, but the subscription is not renewed.

    I have attached the debug.log

  • Ivan
    • Developer

    Hi Mathias !

    Yeah, this customer id exists on your Stripe account. But Stripe can’t find a subscription which related to that blog id. Also, I checked via your site and it seems this customer doesn’t have any subscription in Stripe. Could you check it via Stripe? It looks like that subscription was deleted via Stripe. It seems you provided me Stripe credentials but I have no access because it uses two-step authenticate.

    Also, could you test it for a new user? I mean to create new pro-site and then update subscription. Does it work correctly?

    Best,

    Ivan.

  • Ivan
    • Developer

    Hi Mathias !

    I have tested it, and no it doesn't work.

    Could you describe step-by-step how did you test?

    I turned Stripe to test mode on your site, ?reated new site, enabled lite level and changed the price for it as $9/month, subscribed to it, then upgraded to pro one. I see that the subscription was changed to my test Stripe account.

    What did I miss?

    Best,

    Ivan.

  • Mathias
    • The Bug Hunter

    Hi Ivan, thank you for your reply.

    As I mentioned earlier, the problem only seems to happen in live mode. I have just (once again) tried creating a new blog, upgrading it, canceling the subscription, and then tried to resubscribe, but I can't.

    If I try to resubscribe, the customer in stripe only gets updated, and not subscribed again.

    I have once again attached an image from stripe, showing the exact thing I have mentioned earlier.

  • Ivan
    • Developer

    Hi Mathias !

    I checked your last test. You did it for 4681 site id, yes?

    I temporarily changed Stripe mode to testing one and logined as mathiasb user and tried to resubscribe – and I got the same issue – the current page just refresh and says “Your subscription has been cancelled”.

    So, it means that – the first – it has the same behavior for Testing and Live modes of Stripe ( not as you mentioned earlier that the problem only seems to happen in live mode )

    And the second – it relates to some caching ( Redis or another one ) I got this concluding because I couldn’t resubscribe with the Testing Mode then I asked you to disable all cache tools then I could resubscribe with Testing mode and now I can’t do it again.

    Best,

    Ivan.

  • Ivan
    • Developer

    Also, I replicated step-by-step your instructions on my test site and it works like a charm. However, I got the same errors in my debug log which you mentioned. I investigated it – it happens when a subscription is canceled and you open Pro-sites page for upgrading.

    Best regards,

    Ivan.

  • Mathias
    • The Bug Hunter

    Yes, the problem happens when the customer want to update the card info, not when they want to subscribe for the first time. It only happens when a customer tries to update their card, the card gets updated, but isn’t subscribed to a Pro subscription.

    The only caching, is Redis cache. I have tried disabling Redis, but it doesn’t do anything on my end.

  • Ivan
    • Developer

    Hi Mathias !

    Really, I could subscribe again with Test credentials after disabling Redis. So, the disabling Redis definitely helps for Test mode of Stripe. Also, I created new site again, subscribed with one Test Stripe credentials, canceled and resubscribed with another test Stripe credentials and it works like a charm. Stripe says that all things which work with Test mode should work with Live mode.

    Could you change your browser for testing it?

    Also, can you please do a plugin and THEME conflict tests? To know more about plugin conflict test, you can check this guide: http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Also, I noticed that the {your_domain}/wp-login.php?loggedout=true link doesn’t log out you. It’s weird. It’s not standard behavior of WP. Maybe these issues are related.

    Best,

    Ivan.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.