Auto-login does not work.

  • Impression eStudio
  • Offline
  • Premium Member
  • Premium Member
More
6 years 2 months ago - 6 years 2 months ago #109405 by Impression eStudio
Replied by Impression eStudio on topic Auto-login does not work.
Hi,

I have the same problem.

I have enabled all the relative parameters (auto-login, auto reload user groups, allow user registration) and when the user returns from a successful payment using PayPal, he sees the page "Subscription Complete" with the message "You can now login to your account to access the allowed resources on our site."

Notice: The payment is being done in test mode.

Thanks
Last edit: 6 years 2 months ago by Impression eStudio.

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #109424 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Auto-login does not work.
That message actually can be changed. The question here is after being redirected to your site from PayPal, you are logged in or not?

If you are not logged in, there might be something on your site causing it. In that case, please send us super admin account and link to subscription form so that I can check and correct it

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Impression eStudio
  • Offline
  • Premium Member
  • Premium Member
More
6 years 2 months ago - 6 years 2 months ago #109575 by Impression eStudio
Replied by Impression eStudio on topic Auto-login does not work.
After I return from the successful payment from PayPal (sandbox) I am not logged in and the membership is always 0.

But I checked the issue a little more and I found that there is a problem in the file "components\com_osmembership\view\complete\html.php".

When this file is executed, the variable $rowSubscriber has some wrong values or not the final values.
For example I see that the property 'published' is 0 so the code for the auto login is not executed.
Also the property 'membership_id' is 0.
But in the email I receive the membership_id has the correct value.

Also if I go to the database and check the specific record then published=1 and the membership_id has the correct value.

I hope that I don't put you in troubles but I have problem with the auto login and the membership id displayed in the website completion page just after the payment and it seems that these issues are related.
Last edit: 6 years 2 months ago by Impression eStudio.

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #109617 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Auto-login does not work.
Hello

I am afraid of this issue could not be fixed, maybe it only happens with PayPal in test mode, so if it is possible, please try to test it in Live Mode to see how it goes. I will try to explain it below;

When someone makes payment for the subscription on PayPal website, two things happens:

1. Users are being redirected back to your website (subscription complete page)

2. PayPal notify Membership Pro about the payment (it is called IPN message in technical term). Membership Pro needs to validate the payment and in case it is valid, Membership Pro willl update published to 1, generate Membership ID, sending email

If step #1 happens before step #2 complete, we will face the issue you are having. So maybe in your test, you are returning back to your site too fast. Try to wait for a moment before click on the link from PayPal to return back to your site and it will work as expected

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Impression eStudio
  • Offline
  • Premium Member
  • Premium Member
More
6 years 2 months ago #109620 by Impression eStudio
Replied by Impression eStudio on topic Auto-login does not work.
Hi and thank you for your answer,

I wait till PayPal redirects me automatically, so it is the maximum time to wait till I return to the website.
Anyway, can you tell which is the file that executes the step 2?

Thanks

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #109621 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Auto-login does not work.
The file is components/com_osmembership/plugins/os_paypal.php

Regards,

Tuan

Please Log in or Create an account to join the conversation.