<URGENT> All Active PayPal Subscriptions Expired

Discussion in 'Troubleshooting' started by steveric, Dec 31, 2012.

  1. steveric

    steveric New Member

    Joined:
    Dec 22, 2008
    Messages:
    14
    We use Script Version: 3.1.4PRO

    http://manual.amember.com/PayPal_Standard_Plugin_Configuration says...

    The PayPal Recurring plugin behavior may appear strange, but it is correct. It sets the expiry date for any active subscription to a future date in the year 2012. When the subscription is cancelled, the expiry date is automatically set to yesterday's date - it disables subscription access automatically.

    Our member script used 31/12/2012 as end date on all recurring subscriptions.

    Now that this date has passed all active subscriptions have been put on EXPIRED.

    Result: No one can login in our membership site!

    How to solve this issue?

    Can we somewhere update this subscription end date? If so can you tell us what instructions to follow?

    Or do we need to upgrade amember?
  2. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    We too must have an answer NOW!
  3. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    I see in /amember/plugins/payment/paypal_r/paypal_r.inc.php on lines 478, 560 and 607 that

    $p['expire_date'] = '2012-12-31';
    $newp['expire_date'] = '2012-12-31';
    ORDER BY expire_date='2012-12-31' DESC, payment_id DESC");

    which shows where the date is set in the database... now how do we get it back to RECURRING is the question?

    Changing these and modifying the DB does nothing.

    I've started a ticket but they won't be back until the 4th.. by which time I'll be flooded with emails saying users can't get in!
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
  5. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    Think this might be a leap year bug?
  6. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    No, that particular user comment was misleading, it is not a leap issue but rather an internal system configuration which defined a far future date as an indicator of LIFETIME and/or recurring.

    The far future date was extended in future versions of aMember (to 2036 I believe) which is why only those running far outdated versions of aMember are impacted.

    I'm doing some testing now to see if there is a quick way to modify a source file to get around this as a short term fix.
  7. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    Ok... that did it... Thanks.

    Changing
    /amember/product.inc.php​
    from​

    define('RECURRING_SQL_DATE', '2012-12-31');​
    to ​
    define('RECURRING_SQL_DATE', '2036-12-31');​

    AND changing the users who have an expiration date of 2012-12-31 to 2036-12-31 returned them to RECURRING status and changes their state to Active! Thanks Skippy!​
  8. thestockbandit2

    thestockbandit2 New Member

    Joined:
    Sep 28, 2009
    Messages:
    15
    Had this same issue with 12-31-2012 expiring a number of PayPal recurring subscriptions. I now have 2 questions to clarify if you would be so helpful...

    1) changing the define('RECURRING_SQL_DATE', '2036-12-31'); string will not set a monthly recurring PayPal user to expire in 2036, right? What I'm needing is for their monthly payment to recur on the same date each month, but the previous post by mjmtaiwan leaves me needing to clarify. (Ex: Monthly subscription should read 12/30/2012 - RECURRING)

    2) once updated, the user's recurring date will be set properly again but the PayPal subscription has not been broken, correct? (looking in PayPal these subscriptions still appear active, just wanting to be sure aMember does not automatically cancel those subscriptions somehow until a payment actually fails).

    Thank you in advance!
  9. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Great to hear. Let me know if there is any other oddities you experience, hopefully this gets you sorted out until you are able to get a proper upgrade done to your environment as that is a very outdated version at this point.
  10. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    No, from what I can tell the Paypal side is OK... billing normally. I don't believe that amember sends any sort of cancelation notice to Paypal.

    As for the same issue occuring again in 2036, it will, but I'll be dead.

    I just changed all my 2012-12-31 expiring users to 2036-12-31 and did the change in product.inc.php and all the users are back to RECURRING. NO NEED to edit
    paypal_r.inc.php.​

    Many thanks to Skippy for the legwork.
  11. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    It is outdated, you are right. I have so many modifications I'll need to build the whole configuration from scratch. Had I known about this issue I would have spent my holiday time doing it.
  12. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    You need to make sure you are making the change to the product.inc.php AND updating the users payment records (ie. update amember_payments set expire_date = '2037-12-31' where expire_date = '2012-12-31')

    If you have a test environment available, certainly test their first. At minimum make sure you have a good backup of your files/db before you make any modifications/query updates.

    Once you have made the change you should see these users are showing as active and recurring again in your admin as mjmtaiwan stated.

  13. thestockbandit2

    thestockbandit2 New Member

    Joined:
    Sep 28, 2009
    Messages:
    15
    Thank you mjmtaiwan!

    Skippy, thank you as well. To be clear, you said "You need to make sure you are making the change to the product.inc.php AND updating the users payment records (ie. update amember_payments set expire_date = '2037-12-31' where expire_date = '2012-12-31')" ..... where do I modify that?
  14. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    You'll need to have access to your database. I use a desktop client to access our server but if you use a hosted server there should be a cpanel type interface. phpMyAdmin is a standard web interface for mysql.
  15. thestockbandit2

    thestockbandit2 New Member

    Joined:
    Sep 28, 2009
    Messages:
    15
    Btw Skippy, I've been concerned about an upgrade from 3.1.8 to 4.x based on previously documented warnings. Is it a stable upgrade or better to just completely reinstall? Clearly work is cut out by staying with an older version :), but until now it's been stable for us.
  16. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    4 is certainly a stable version, only caveat is if you require a plugin that is not yet available for v4.

    At minimum I would suggest getting to the latest build of the v3.x
  17. kellerwade

    kellerwade Member

    Joined:
    Jul 2, 2009
    Messages:
    35
    I had the same issue and am trying to fix it. I changed the product.inc.php, but the expiration date for thousands of members is still set for 2012-12-31. Do I need to MANUALLY change everyone's date to that 2037-12-31? Or is there a way to get it to change everyone at once?
  18. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    1. make sure you have a fresh backup of your database.

    2. in mysql run this sql command (or one similar for your situation) against your aMember database:

    Code:
    update amember_payments set expire_date = '2037-12-31' where expire_date = '2012-12-31'
    This will update all users that have an expiration date of 12-31-2012 to 12-31-2037 automatically for you.
  19. kellerwade

    kellerwade Member

    Joined:
    Jul 2, 2009
    Messages:
    35
    As a follow up to my above post a few hours ago, and I did make changes to the .php files mentioned.

    However, I tried to figure out how to change the thousands of existing members whose subs all expired at Midnight, and I can't. They are still marked as "expired" and the date is still set to 12-31-2012 for them.

    I had a programmer try to help, but he couldn't actually open the amember backup folder that is in the .cpgz or .gz format so we couldn't do, essentially, a "find & replace" command on the database for me to then "revert" to.

    I can spend 10-20 hours this week manually tediously changing all of the dates. Or I can wait for the aMember tech team to check in on Friday (or hopefully sooner!) and hope they have a quick solution. Or, maybe, there's an intermediate solution someone here can help me with.

    I have another copy of aMember I updated to 4.x, but I hadn't gotten to doing it with this, and I of course now regret it.

    Any help is appreciated, including anyone who knows if there's any chance their support team can be contacted before Jan. 4 when their support site says they'll be returning from time away.

    Thanks for the helpful threads above, by the way. It was nice to know I wasn't the only one with the issue and at least given one course of action to take. I just hope I don't need to manually change everyone from 12-31-2012 to 12-31-2037. That is a very tedious, long process.
  20. steveric

    steveric New Member

    Joined:
    Dec 22, 2008
    Messages:
    14
    You still need to run an update query as explained here

    http://www.amember.com/forum/thread...aypal-subscriptions-expired.16032/#post-61748

    http://www.amember.com/forum/threads/lifetime-subscription-expiry-date.14286/#post-54998

Share This Page