I've installed

Hello!
I've installed the Membership 2 pro plugin on my website and it seems to work for the stripe gateway. But if users try to subscribe via paypal the payments are coming to my paypal account but the users wont get activated in Membership 2 pro - the invoice is marked as draft!
I hope you can help - because now i am activating the users manually!

All the best,
Daniel

    Adam Czajczyk

    Hello Daniel,

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

    I would like to test the PayPal gateway on your site with my PayPal sandbox account. If that's fine for you, please grant me a support access to your site using our WPMU DEV Dashboard plugin as described here:

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-4

    Once you enable access, let me know by responding to this post, please. I'll then access your site, check its settings and test Membership 2 Pro and hopefully that'll give me a clue on what's happening on the site.

    Best regards,
    Adam

    Adam Czajczyk

    Hello Daniel!

    If this is a running business that shouldn't rather be "disturbed" it might be better to take a different route. If you could setup a staging site (that should be a one-to-one copy of your live site, preferably also on the very same server) we could use it to safely conduct all necessary tests and even make some changes if needed without affection your live site.

    That'd be much safer solution and also would let us "dig much deeper" if required. Would that be possible?

    Best regards,
    Adam

    Dimitris

    Hey there Fuchsfabrik,

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

    I really appreciate the staging environment creation, we can now test freely the symptoms there.

    I noticed that you've enabled both PayPal Single Gateway (for single payments) and PayPal Standard Gateway (for single and recurring payments).

    Your membership levels are having
    - (Pay each month, 12 payments)
    - (Pay for one year)
    so I think that only PayPal Standard Gateway should be enough for that.
    What must be noticed using PP Standard Gateway though, that an IPN listening URL should be set in PP side, as this is the way that PP informs M2PRO for any changes.

    Could you double check that the appropriate IPN URL is set in your PayPal account?
    Please take notice that you can have only one IPN URL in each PP account, but still, you can have different IPN URLs for live and sandbox accounts.
    Ref: https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/

    We could then continue testing PayPal Standard Gateway with your memberships.

    Warm regards,
    Dimitris

    Fuchsfabrik

    Hey Dimitris!
    Thank you for participating in this discussion. My understanding of standard/single gateway was that users who want to subscribe for one year should use the single gateway and users who want to pay monthly should get a recurring payment gateway. I just enabled both gateways on the monthly subscription for testing.

    As you can see i've linked the IPN url in the sandbox account the same i did for the live environment (with the live IPN Url). I get the payments and subscriptions in my paypal sandbox account but as same as in the live environment the users get marked as draft in the membership 2 plugin. So i think the communication between paypal and membership 2 is kinda disturbed or i forgot something to adjust.
    Hope you can help me!
    Best regards,
    Daniel

    Adam Czajczyk

    Hello Daniel,

    Thank you for your replay!

    I have tested this again also on my setup and I found a bug report in our internal bug tracking system. It seems like the similar issue occurred in the past and was solved but we're now getting similar reports. Our developers are checking that and working on a fix so that should be soon addressed. I apologize for the trouble.

    Best regards,
    Adam

    Adam Czajczyk

    Hello Daniel!

    Another questions in the PayPal Documents i've read that recurring payments are only available for users with an active creditcard - did i understand that right or is there an option?

    To be honest, I'm not sure about that. I can't find an information on credit card being required anywhere. I can create subscriptions (recurring payments) using my sandbox paypal account with no credit cart (that's testing account though) and that works. It should work as long as you use a Business PayPal account to accept payment and your customer has a verified PayPal account with a balance that's enough to make required payment.

    It might however be good to just ask PayPal about that. I think they should give you a solid answer on this.

    When can i calculate with a solution - we want to provide this payment option as soon as possible!

    I'm not able to give you an ETA but it's an important issue and our devs are working on it. I believe they'll be able to publish an update (with a solution) soon.

    Kind regards,
    Adam

      Fuchsfabrik

      Okey Thank you!

      Another BIG issue occurred! It seems like the plugin did a factory reset over night?! I dont know how this could happen - i was not testing any stuff on the LIVE env. and now both - LIVE and STAGING env. are like they would've got installed 1 minute ago - no memberships - no content protection - everything was like a public wordpress site - no users in the plugin - i have to put in the memberships and the content protection. How can this happen? Yesterday everything worked fine and now the plugin is reset.
      I hope you can help me, but this is a heavy issue and also for me mysterious...

      Best regards,
      Daniel

    Predrag Dubajic

    Hi Daniel,

    That's strange, there's nothing in M2 that should fire up such behaviour unless you go to M2 > Settings page, add &reset=1 to URL and then you still have checkbox and button that need to be clicked in order to perform the plugin reset.
    This really couldn't be done by mistake so it's probably something else that caused this.

    Can you tell us if there are any changes on your sites during that time, like any plugins, themes or WP updates?

    Also, do you have any Optimization plugins that clean up your database and can cause this issue?

    P.S. If you have questions that are not closely related to each other it's best opening separate threads for them as it helps us to keep better track of everything and provide you with better responses.

    Best regards,
    Predrag

      Fuchsfabrik

      Hello Predrag,
      thank you for your fast response!

      Can you tell us if there are any changes on your sites during that time, like any plugins, themes or WP updates?

      It was like overnight yesterday in the evening everything worked fine - i did not change anything - maybe my host (https://www.one.com/) did a backup or something? I really don't know what caused this. The only plugin i've installed yesterday was "bbPress Notify" but this was earlier that day. So i really did not tried things out with this or any other plug ! And i did not update anything.

      P.S. If you have questions that are not closely related to each other it's best opening separate threads for them as it helps us to keep better track of everything and provide you with better responses.

      Okey sorry! Should i open another support ticket for this issue?

      Best regards,
      Daniel

    Predrag Dubajic

    Hi Daniel,

    It might be best starting new thread so we can keep this discussion here about M2 and PayPal and we can focus on this other issue separately.

    You can start a new thread here http://premium.wpmudev.org/forums/#question but before that could you get in touch with your server provider and check if they performed some kind of maintenance last night that might have caused this, and include that info in your new thread.

    Also, check if you have backup on your server you can restore to since this is most likely caused by something that messed up with database where M2 data is stored and restoring from backup will get you previous setup back.

    Best regards,
    Predrag

    Adam Czajczyk

    Hello Daniel!

    I have just checked and it looks like an update including code that should fix that is on it's way. I'm still not able to give you an ETA on the release but I can confirm that code has already been merged so should be included in upcoming release.

    Make sure please that you update the plugin once update comes up and let us know if it fixed the issue for you.

    Best regards,
    Adam

    Fuchsfabrik

    Hey Guys,
    i did the update but it didnt help!
    But i did some further investigations and everytime a user tries to signup with paypal this happens:
    I am running PHP 7.1, but i will try to switch to 7.0 to see if thats the reason

    Stack trace:
    #0 /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/gateway/paypalstandard/class-ms-gateway-paypalstandard.php(601): MS_Model_Invoice->add_notes('Payment successfull...')
    #1 /customers/3/c/6/mydomain/httpd.www/wp-includes/class-wp-hook.php(298): MS_Gateway_Paypalstandard->handle_return('')
    #2 /customers/3/c/6/mydomain/httpd.www/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #3 /customers/3/c/6/mydomain/httpd.www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #4 /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/controller/class-ms-controller-gateway.php(824): do_action('ms_gateway_hand...')
    #5 /customers/3/c/6/mydomain/httpd.www/wp-includes/class-wp-hook.php(298): MS_Controller_Gateway->handle_payment_return(Object(WP_Query))
    #6 /customers/3/c/6/ge in /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/model/class-ms-model-invoice.php on line 1129
    [07-Apr-2017 19:15:06 UTC] PHP Warning:  set_time_limit(): Cannot set max execution time limit due to system policy in /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/bbpress-notify-nospam/bbpress-notify-nospam.php on line 77
    [07-Apr-2017 19:15:07 UTC] PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/model/class-ms-model-invoice.php:1129
    Stack trace:
    #0 /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/gateway/paypalstandard/class-ms-gateway-paypalstandard.php(602): MS_Model_Invoice->add_notes('Membership ...')
    #1 /customers/3/c/6/mydomain/httpd.www/wp-includes/class-wp-hook.php(298): MS_Gateway_Paypalstandard->handle_return('')
    #2 /customers/3/c/6/mydomain/httpd.www/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #3 /customers/3/c/6/mydomain/httpd.www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #4 /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/controller/class-ms-controller-gateway.php(824): do_action('ms_gateway_hand...')
    #5 /customers/3/c/6/mydomain/httpd.www/wp-includes/class-wp-hook.php(298): MS_Controller_Gateway->handle_payment_return(Object(WP_Query))
    #6 /customers/3/c/6/ge in /customers/3/c/6/mydomain/httpd.www/wp-content/plugins/membership/app/model/class-ms-model-invoice.php on line 1129

    Hope you can help i dont really know what to change in the code but i can do it with your instructions!
    Best regards,
    Daniel

    Adam Czajczyk

    Hello Daniel!

    Thank you for letting me know about that.

    I tried to replicate that on my end using PayPal Standard gateway but it worked fine for me. Would you mind granting me a support access to your site so I could compare your site's configuration with mine in order to do some more testing?

    Here's a guide on how to enable support access:
    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-4

    That'd help me get a better picture of your setup and hopefully would even let me reproduce the issue so I would get more details on the case for the developer.

    Let me know here when support access is open, please.
    Best regards,
    Adam