Membership Upgrades

Hi All,

I've checked the forum extensively but can't find the answer to PayPal and automatic membership upgrades. I ran a live test, paypal gave me payment confirmation, I went back into the site only to find that I was still a promotion member.

Is there something I have to manually do?  I am using IPN

Quote · 5 Jun 2009

http://www.boonex.com/unity/forums/#topic/Paypal-and-Membership-Levels.htm

Quote · 5 Jun 2009

Hi Prolaznik,

I went to that forum first.  After reading it you will realise that there was no real resolution to this problem.  Can anybody else suggest what I need to do.

1.  My paypal web address prefix is https, but in admin panel I have selected http, is this a problem?

2.  I only used $1 to perform the test, is this amount too small?

Quote · 5 Jun 2009

You can use sandbox from paypal so you won't have to use your own money, eventho it's your account, paypal still charges their fees......Go to darrenpowless.com for a video tutorial on paypal set up...Hope this helps...

Quote · 5 Jun 2009

well don't know what to tell you it works on my site

Quote · 5 Jun 2009

Aaaarrrrgggg, I am having the same problem.

Did you find a solution?

Quote · 3 Jul 2009

Your test users must be set to "standard" by admin for testing.

Code reads Profilememlevels table and will always pull active data and if promo is still not expired then it reads that.

So if your test member still has 3 days left on the promo then nothing will change till then.

Lets assume for a second that the code works great out of the box and that your paypal settings and admin payment settings are wrong.


With this assumption, lets make promo expire in a few minutes:

pen phpmyadmin and go to table "Profiles" and find ID of test member.

the ID is 7


\\\\\\\\\\\\\\

now goto Profilememlevels and find the entry for ID 7

fields:

IDMember = 7

IDLevel = 3

DateStarts = irrelevant

DateExpires = 2009-07-04 4:06:03


set the date and time to a few minutes from now and after that the next entry for ID 7 with IDLevel 4 will kick in

You can do this with all your Membership levels to test so you dont have to wait a day lol

I also like to use my clean the ProfileMemLevels table mod so I know there are no other entries.

To use, make duplicate, then open inc/membership_levels.inc.php

in function setMembership
change:

if($membershipID == MEMBERSHIP_ID_STANDARD)
{
//return if already Standard

if($currentMembership['ID'] == MEMBERSHIP_ID_STANDARD) return true;

//delete any present and future memberships

db_res("
DELETE    FROM ProfileMemLevels
WHERE    IDMember = $memberID
AND    (DateExpires IS NULL OR DateExpires > NOW())");

if(mysql_affected_rows($GLOBALS['MySQL']->link) > 0)
{
return true;
}
else
{
return false;
}
}


to:

if($membershipID == MEMBERSHIP_ID_STANDARD)
{
// mrp moved the delete here where the work is done
db_res( "DELETE    FROM `ProfileMemLevels` WHERE `IDMember` = '$memberID'" );

//mrp added for setting people to standard
$dateStarts = time();
$dateExpires = 'NULL';
db_res("
INSERT ProfileMemLevels (IDMember, IDLevel, DateStarts, DateExpires, TransactionID)
VALUES ($memberID, $membershipID, FROM_UNIXTIME($dateStarts), FROM_UNIXTIME($dateExpires), $transactionID)");

if(mysql_affected_rows($GLOBALS['MySQL']->link) <= 0) return false;

return true;
//mrp added for setting people to standard written for mysql4
}

With the above mod in place, log in as admin and goto a users profile and when you set people to standard all other entries are really deleted.

If you do not have another entry for ID 7 then  your paypal settings are wrong.

I have video tutorials to help you mrpowless.com
Quote · 4 Jul 2009

TY Daren!  :)

Quote · 16 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.