M2P payment went through but the member is not active.

I just signed up for one of my memberships. I got an email from my business PayPal account saying the payment has been received but the member has not been activated.
Please help.

  • Adam Czajczyk

    Hello Jake

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

    First thing to check in such case would be to make sure that IPN is set correctly, if you are using a "PayPal Standard Gateway". To do this, you would want to:

    - go to the "Membership 2 -> Settings -> Payments -> PayPal Standard Gateway" in site's back-end
    - copy an IPN listening URL from there
    - login to your PayPal account
    - go to "Profile -> Profile and Settings -> My selling tools" there
    - find "Instant payment notifications" line there and click on "Enable" or "Update" link next to it (depending on which one is available)
    - make sure that IPN is turned on and set to deliver all messages
    - past the previously copied URL to the "Notification URL" field and save settings.

    Once that is set, test signup again and see if memberships are activated after payment. If not, we'll have to investigate it further.

    However, when I tried to check your site now, I couldn't even load it and I was getting "500" internal server errors. Are you making/did you made some changes to the site resulting in this?

    If not and that's just happening "out of the blue" from time to time, that might as well be related here. But please check about IPN first and then let me know here if that worked or not.

    Kind regards,
    Adam

  • Adam Czajczyk

    Hello @jakearmistead12!

    I adjusted the IPN and the membership is now being shown for the member. However, the automatic emails for that particular membership have not been sent.

    We're experiencing some issues with "Subscription - Completed with payment" e-mails from Membership 2 Pro that are not being delivered on some setups. Our developers are already aware of that and are looking for solution so that should be fixed in one of upcoming updates. It shouldn't, however, affect the general performance of the plugin so if memberships are now properly applied, that should be working fine - except that e-mail notification.

    Also, once again I have received the payment in my business account but the billing section shows that there is an outstanding invoice that needs to be paid for that member.

    I would need to take a closer look at it. It seems, however, that the support access to the site has already expired or has been disabled. Could you please enable it again for me?

    Let me know here when it's active again and also let me know please about the particular member and an invoice in question (so I could find them and check).

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Jake,

    Thanks for the response and enabling access!

    As for the e-mail issue. Like I said, we are experiencing issue related to that but since it's not affection all the sites, I'd like to make sure that it's the case as well. Because of this, after reviewing site's configuration, I'd like to ask you for yet another small test:

    1) Please add following line to the "wp-config.php" file of your site (somewhere above the /* That's all, stop editing */" line):

    define( "MS_LOG_EMAILS", true );

    This will add an internal log of all e-mails that Membership 2 Pro is processing.

    2) Temporarily disable the "CB Change Mail Sender" plugin

    After that, please register another member and see if an e-mail has been delivered this time. If still not, please

    3) Try switching to SMTP for sending mails (while still keeping the CB Change Mail Sender disabled for testing). This can be done with any of these plugins:

    https://wordpress.org/plugins/easy-wp-smtp/

    https://wordpress.org/plugins/wp-smtp/

    With that set up, check again if the mails are being sent for new membership registrations.

    Let me know about results of these tests, please, as they'll confirm whether we are dealing with another case of the issue I mentioned previously or if that's something else that needs to be investigated.

    As for invoices. Both these members do have memberships properly assigned now and I understand that it was automatically assigned upon registration and payment. However, the invoices indeed doesn't seem to match the current membership status. I tried to replicate that on my end but wasn't able to but I also didn't find any reasons for that on your setup. I will need some helping hand with this so I have called out to our Second Line Support team so they could check it and assist us.

    Please do not disable the support access for now so they could access the site and review the case. We'll update you here (me or one of the SLS staff) as soon as we get to know more about the issue.

    Kind regards,
    Adam

  • Jake

    Hi,

    I completed the tasks you set and the confirmation email is still not being sent. They user receives the first email saying they have registered an account on the site, and they also receive a receipt for the payment but nothing else.

    As for the invoices. I tested with a couple of users.
    The first user (JakeC) when through fine. The payment went through and the billing section shows the invoice as paid.

    However, the invoice for the 2nd user I tested (JakeD) is only showing in the draft section, even though the payment has been completed.

  • Adam Czajczyk

    Hello Jake

    Thank you for your response.

    As for e-mails. This would confirm that we're dealing with another case of the issue I have mentioned before. That's already "on the table" and our developers are looking for a fix but, unfortunately, I'm not able to give you an ETA on this. I hope they'll be able to deal with that soon but the process of implementing such a fix might take a while as apart from tracking down the cause of the problem and creating a fix in the code, that must also be extensively tested to make sure that it is working and not affecting any other aspect of a plugin. I hope that this should be done soon, though.

    As for the invoices, I already passed that for a review to our 2nd-line team yesterday so we'll need to get some feedback from then on it. Please keep track of this ticket and either I or one of my colleagues will update you here as soon as we get to know more from them.

    Kind regards,
    Adam

  • Panos

    Hi Jake ,

    I can see that JakeD has 2 draft invoices, but I am not sure how those were created. Could you please provide some further information if there was something different during JakeD's registration? Was there any manual editing for example from admin?

    We had set temporarily some sandbox credentials as site seems to be in testing mode (they have been restored to your own credentials). We tested registering 2 members on your site and the invoices were correct, that's why I'm wondering if there was some manual change.

    In case there was none we would need to do some deeper debugging in your site. We would like to set again some sandbox credentials and we would need some ftp access. We created a new admin via support access (support access does not stay active for complex debugging) so you don't need to send admin access. You can send ftp credentials privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: "Attn: Panos Lyrakis"

    - FTP credentials
    host
    username
    password
    (and port if required)

    - link back to this thread for reference

    Kind regards!

  • Panos

    Thanks for sending this in Jake :slight_smile:

    Something that seems strange regarding the invoices, is that first transaction seems to have marked it as paid, but then a second IPN (which is marked as irrelevant), seems to have changed the status of it back.

    We will go ahead and add some check points so we can compare the invoice and subscription statuses after an IPN is received. But this will help when the same issue is repeated.

    One other option would be to check if you could fetch that IPN from your PayPal account. It might be a bit confusing, so I'll try explain it with steps:

    1. You need the transaction id. You can see the transaction logs in this page:
    yoursite.com/wordpress/wp-admin/admin.php?page=membership2-billing&show=logs&invoice=3481%2C3416

    2. In the Details column, hover over the little info i icon and should show the transaction details. Scroll till you find the txn_id and copy it.

    3. Then we need to search on paypal to find that IPN notification that was/were sent to your site for this transaction. So log in to your paypal account and go to this page:
    https://paypal.com/cgi-bin/webscr?cmd=_display-ipns-history

    4. In the date fields choose the last 28 days (I think that is the limit set from paypal). In the Transaction ID field paste the txn_id you copied as in the following screenshot :

    5. Click on the Message ID link in each row (if it has more than one rows). A page like the following would appear :

    6. Copy what is in the IPN Message text area and send it over via our contact form. Please do not share such information in this thread, please use our contact form for privacy:
    https://premium.wpmudev.org/contact/#i-have-a-different-question

    In the Subject use again : "Attn: Panos Lyrakis"

    In the message paste those messages and include the link back to this thread.

    If you find this not convenient, we can wait for next payment that has this issue. We would have those logs stored in your server ( as we will add those check points mentioned ) so we can then see what seems not to be right during the payment process :slight_smile:

    Kind regards!

  • Panos

    Hi again Jake :slight_smile:

    I have added the following mu-plugin:
    https://gist.github.com/wpmudev-sls/352e4dcf7ab4d2fb32a338bcfc14203a
    in your wordpress/wp-content/mu-plugins
    folder on your site.

    On each payment if should update the log file there with info that we can then use to re-send and investigate.

    Please keep in mind that this file will increase on each payment notification you receive from PayPal. So in case you receive many payments but don't replicate that issue you can delete the log file (ms-paypal.log). The mu-pluigin should re-create it on next payment with new information

    Kind regards!

  • Panos

    Thanks Jake !

    I used the ipn messages you shared, what I noticed is that the first message sets the invoice (3416) to paid, which is correct. The second message sent didn't change the 3416 invoice status, but it created a new pending one. That one seems is not sent when using sandbox account as I didn't get that in my test site.

    I have replaced file
    membership-pro/app/gateway/paypalstandard/class-ms-gateway-paypalstandard.php
    with the one attached here.

    Could you try once more and let us know if you still get this issue?

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.