Upgrades not being reflected, but transaction shows up

In testing prosites on my site, I created a test user... then I made a purchase... then I upgraded it to another package. But everything still indicates that I have my basic rather than premium package. I have confirmed in Stripe that the transaction was accepted... so why is the plugin not updating the package status? Any ideas? (See user "Tom Tom" with sites "Tom Tom Test 1" and "Tom Tom Test 2") @PC has my site, access, and contact info.

That was yesterday. I created the user, made another upgrade in the same day. I thought possibly it would take some time to reflect. But it's a day later now and it still says the user is a basic member when it should be an elite member. Mind you, this is all the while the test user's transaction for the upgrade to elite was accepted.

Can anyone help please?

Thanks.

  • PC
    • WPMU DEV Initiate

    Hey Tom,

    I tested on your lab site as well as mine but I see the same behaviour.

    It logs the changes :

    2013-12-09 1:14:59 pm User modifying subscription via CC: Plan changed to (Jwplanet.com JWPlanet+ Pro: $89.99 USD every 12 months) - cus_34lvsyKwsrkjyI

    But doesn't actually modify that :slight_frown:

    I have sent a note to @Aaron for his advise on this one. He should be around sooner than later.

    Cheers, PC

  • tryst
    • WPMU DEV Initiate

    Hiya warpedmind,

    It sounds as if you might not have installed the webhook url into Stripe, or otherwise stripe is having a problem accessing your site.

    https://manage.stripe.com/#account/webhooks

    Under the "Settings" section of Pro Sites, in the Stripe section, it gives the URL that you need to enter into Stripe.

    If it's a https webhook, make sure that your site is accessible via https too (an error in the certificate could throw it too possibly).

    This webhook has be on the "test" site of Stripe - there are two sides to the whole site.

    I came unstuck in a similar way when I'd forgotten the webhook, and then I'd forgotten that my site is hidden behind a .htpasswd (as it's under development).

    Regards,
    Trystan

  • warpedmind
    • The Incredible Code Injector

    @Aaron @pc Can I please get some resolution on this?

    I just tried to upgrade another user (testuser). I upgraded to my biggest package. Yet I still got this message: "You have 20 days left in your JWPlanet+ Basic free trial. Checkout now to prevent losing JWPlanet+ Basic features »"

    And even though I've now bought the biggest package, I still see this as well:
    Level: JWPlanet+ Basic
    Next Payment Date: December 13, 2014

    I think the payment date (tomorrow) is suspicious too.

    This is really a serious problem... any ideas please?

  • tryst
    • WPMU DEV Initiate

    Warpedmind,

    Going back to your original query, in Stripe, can you please press 'test webhooks' with event 'charge-succeeded'?

    Going to the latest question, (the tomorrow's date thing), go to your username in Stripe (top right of the screen), press 'Account Settings', under 'General', change the timezone to the same timezone that your server is set up as.

    Trystan

  • PC
    • WPMU DEV Initiate

    Hey there Trystan,

    I am not too familiar about stripe errors but while testing the webhook, it throws

    Test webhook error: 302

    @warpedmind it shows your staging url and not the main url so I am not sure if that might be the problem as you are hosting on wpengine which gives you a wpengine subdomain on which your main site domain is mapped .

    Our lead developer @Aaron was away with family. I have sent him another note to chime in with his guidance here.

    Cheers, PC

  • warpedmind
    • The Incredible Code Injector

    Thanks for your help @trystan_davies. I got, like @pc, Test webhook error: 302. I also set my account to the proper time zone, so thanks again!

    @pc, can you please tell me exactly when and where you encounter the staging url? Can you describe to me what's happening so I can duplicate the problem and tell WPEngine? By the way, I'm not using my staging url, I don't think. I know I have one, but I've never used it yet.

  • tryst
    • WPMU DEV Initiate

    Hiya warpedmind

    Right, so it *is* a webhook error. Yeah! We're getting closer. Whoohoo. Great stuff.

    Some Rep Points for fixing the TimeZone would be really welcome. :wink:

    I don't know the URL of your site, but (as I mentioned before) it is becasue your webhook is not implemented correcly or your site is not accessible by https (SSL) properly.

    So, if you go to your signup for for Pro Sites. Is it https? If there are certificate errors (looking at the address bar) then that would need fixing.

    If there a mismatch between the originating page and the webhook page (ie. http to https [or] https to http) then that could be a problem too as I don't think it would be able to move session variables around.

    Try adding this to your wp-config.php file
    define('FORCE_SSL_ADMIN', true);

    All the best,
    Trystan

  • warpedmind
    • The Incredible Code Injector

    Hey @pc, @tryst, @aaron... thanks for your help. I've changed my webhooks and am trying to test it. So far, it looks pretty good! I was able to take a site and upgrade it! I'll do more testing... if I can be pretty convinced, I'll mark this as resolved. Thanks so much!

    I just encountered another problem... not sure if it's related or not, so I've created a new thread for it here, but I hope you can check it out @pc: https://premium.wpmudev.org/forums/topic/exploit-in-prosites-registering-through-regular-wp-registration-link

    Thanks,

    Tom

  • PC
    • WPMU DEV Initiate

    Hey there Tom,

    Glad to hear that the tests are going well on this issue. If anything goes wrong, just let us know !

    For the other issue, I see that my colleague @aristath is waiting for your response on the thread so you are in good hands there :slight_smile:

    @tryst : Points your way for helping out :slight_smile:

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.