Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Aaron10 on September 09, 2014, 01:49:06 PM

Title: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 09, 2014, 01:49:06 PM
Right now I have a paid subscription setup for $1/month but after completing the payment via paypal I'm having to manually change their membergroup. As of now there's only 2 so it's not a big deal but if there's a few people I'm going to have to manually revert them when their sub runs out. Here's my settings:

(http://i62.tinypic.com/2elzexh.png)

On the main paid subscriptions paid page it says Active: 0, Finished: 2. Shouldn't that be Active: 2 instead? Obviously I'm doing something wrong.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 09, 2014, 02:08:57 PM
Any Paid Subs errors in your error log?
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 09, 2014, 02:11:21 PM
No, error log is clean.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 09, 2014, 02:20:43 PM
If PayPal payment is successful, there are no Paid Subs errors, and subscription is not activated, that usually means your forum is not receiving IPN from PayPal.  Some mods and some hosts can block IPNs.  PP support can confirm if IPN is sent, and can determine if it's being blocked. 

Only other thing I can suggest is disable recurring payments.  It doesn't work on some hosts, and can cause problems with subscription activation.

No idea why you're showing completed subs instead of active.  If you can pm temporary admin access, I'll take a look.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 10, 2014, 11:40:44 AM
Sent.

Using hostgator for the record.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 11, 2014, 12:01:12 AM
Not sure what to make of it.  If I set up a new subscription, I can manually add/delete subscriber, but if I try to subscribe using PayPal, the subscription doesn't complete, but shows as finished, and will not allow me to manually subscribe that member (already subscribed).  The subscription does not show in member's paid subs.  No paid subs errors, and I believe the IPN is being received but processed incorrectly.  If IPN is blocked, subscription should show as 'payment pending', but it doesn't.

This looks like a clean 2.0.8 install, no mods, no update patches.  Were any mods installed then removed?  Any manual code edits?  When did you download and install 2.0.8?
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 11, 2014, 01:00:11 AM
Couple of suggestions before I go offline:

- Upload clean copies of subscriptions.php and /Sources/Subscriptions-PayPal.php from the current 2.0.8 install or large upgrade package.
- Use phpmyadmin to empty smf_log_subscribed and smf_subscriptions in your database.
- Contact PayPal support and ask them if they can confirm IPNs are being sent, and received by your forum.  They can check the 4-5 payments made tonight for $0.10.

I'll have another look tomorrow.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 11, 2014, 12:11:03 PM
I have a few manually edited in mods but none should interfere with paid subs:

Member Color Link (http://custom.simplemachines.org/mods/index.php?mod=111)
Spoiler BBCODE v1.1.3 (http://custom.simplemachines.org/mods/?mod=2330)
Change All Subjects (http://custom.simplemachines.org/mods/index.php?mod=1165)
Disable Subject Change (http://custom.simplemachines.org/mods/index.php?mod=2045)
nCode Image Resizer (http://custom.simplemachines.org/mods/?mod=1197)

I will try your suggestions thanks.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 17, 2014, 01:29:53 PM
So, possibly a bug?
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Arantor on September 17, 2014, 01:45:22 PM
There are several known bugs with paid subs, only no-one with the skills to actually debug them has ever been able to reproduce them...

All the fixes I applied in 2.1 were basically guesswork because I've *never* had any trouble with it myself.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 17, 2014, 02:44:26 PM
The problem we found was that after payment, rather than being in the Active category, people would be in the Completed category instead as if their subscription had finished. I guess I'll disable the option on my forum for now until 2.1 (or unless you guys are planning on releasing any fixes in 2.0.9+) and hopefully it fixes my problem, otherwise it's likely my host as I'm using unmodified files and paypal seems to be fine.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Arantor on September 17, 2014, 02:45:40 PM
As far as I know there are no fixes in 2.0.x precisely because no-one with the necessary skills to debug has ever been able to reproduce it.

Not for the want of trying, either. I've tried to reproduce the issues that have been reported, but never successfully managing it.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Aaron10 on September 17, 2014, 03:10:20 PM
If you want I can PM you admin login details on my forum like I did for krash if you want to check it out anyway. No idea what's causing it.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Arantor on September 17, 2014, 03:21:29 PM
Unfortunately the real information needed isn't actually properly logged by SMF and I really need to write a much deeper logging mod and then give it to someone to install and record what happens.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 17, 2014, 08:26:27 PM
Would need access to the database to pursue this further.  It looks like paid subs is receiving the IPN, processing it without error, and creating a broken subscription.  Manually adding/deleting a member subscription works fine, but doing it with PayPal breaks it, and there's no way to delete the broken subscription.  Doesn't appear to be a PayPal or host problem, it's something in the forum.
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Arantor on September 17, 2014, 08:43:16 PM
Yes, but you still need further logging information than the forum currently provides.

Did you check out the changes I put in 2.1 to see if any of them helped?
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 17, 2014, 11:07:51 PM
Haven't looked at 2.1 for a while.  Can the updated files be run in 2.0?
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Kindred on September 17, 2014, 11:13:22 PM
No...
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Arantor on September 18, 2014, 07:50:54 AM
Quote from: Krash on September 17, 2014, 11:07:51 PM
Haven't looked at 2.1 for a while.  Can the updated files be run in 2.0?


That's a shame because I specifically asked you on more than one occasion to take a look at it and see if it make a difference...
Title: Re: Paid Subscriptions not automatically changing membergroup
Post by: Sir Osis of Liver on September 18, 2014, 02:59:14 PM
2.1 doesn't work well in IE8, and if I use any other current browser in XP Pro, it cripples my system, so it would be difficult to tell if there actually was a problem in Paid Subs or if it was just a browser or system issue.  Also, as has been your experience, I've been unable to reproduce most of the Paid Subs problems I've looked at, it works fine on my test installs, so I expect 2.1 will also work well.  But I'll give it a try soon as I have some time.