PDA

View Full Version : Paid Subscriptions - adding a query when payment is confirmed


neamtzuxl
01-14-2011, 04:10 PM
Hello. As the title says, I need to run a mysql query when the payment is confirmed and the user return to the forum.

Can someone please, PLEASE, point me to a direction? I can't find the hook location, neither where the actual php code lies inside vb files. Also, I need to know the name of the variable that indicates subscription's ID.

I would also like to customize the email that is being sent to the user after the purchase.

Many thanks!

--------------- Added 1295100872 at 1295100872 ---------------

Ok, I managed to make the plugin work. The problem is I can't get the variables for userid and user's email, they come blank. I'm using the following code:

global $vbulletin;

require_once('./global.php');

$uid = $vbulletin->userinfo['userid'];
$useremail = $vbulletin->userinfo['email'];


The above code goes inside a plugin located in the paidsub_build hook.

I also tried $bbuserinfo[userid], with the same results.

Any suggestion on getting those vars? Thanks.

neamtzuxl
01-15-2011, 06:36 PM
Solved it!

If anyone needs this, I got the vars by using $user[userid], $user[email] and $sub['subscriptionid'].