![]() |
Is this right (sql query) for Paid Subscriptions
Hi guys,
I'm trying to make it so that once a paid subscription is processed, my users reputation points are automatically updated to reflect the subscription they've bought (as well as their primary usergroup being upgraded). I have 2 subscriptions set up. Subscription 1 = 20 rep points Subscription 2 = 50 rep points Ok here's the idea for my (pseudo-) code. This would go at the end of payment_gateway.php if I'm not mistaken.... Code:
SELECT * from subscriptionlog WHERE userid=$userid AND status=1 Many thanks in advance, I'm quite desperate for this! DoA |
I've been looking at doing something similar myself. From my research into how the process works i'd suggest taking a look at class_paid_subscription.php.
line 338 contains a hook thats called once a user has completed payment for a subscription. PHP Code:
As a final note, try to use the vbulletin datamanagers for editing the users reputation as opposed to doing it manually. |
All times are GMT. The time now is 08:17 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|