vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Reoccurring Paypal Subscriptions (https://vborg.vbsupport.ru/showthread.php?t=64834)

insanctus 05-06-2004 10:00 PM

Reoccurring Paypal Subscriptions
 
What this does (added in first post)

With the current vbulletin subscription set up, it only charges your members one time. So if you have a pay based site, or forum area they have to keep subscribing, and causing them to waste time and effort (and maybe you lose money)

What this does, is give you the option if you want one time payment (standard vb) or reoccurring payment.

When you choose reoccurring the script has them sign up for a reoccurring payment, as paypal sends you confirmation each time you get a subscription payment, your system will now update their access time.

This will save your members from having to resign up all the time and hopefully save you some money :)


For instance, say you have a paying member?s only area, and you want them to have to pay $10 a month.

With this you can charge per month and it handles all the charges, and every month they send another payment automatically your script gets updated and sets their new expiration.


This has been asked for many times and IMO should have been in to begin with.

Enjoy and I will help as I can.

Note from the new supporter: This hack is now being actively supported again. I have updated the install instructions to work for version 3.0.7, and we can now begin to work out any existing bugs. This code is still raw and has not been tested extensively due to the difficult nature of testing paypal transactions.

Skyline_GT 05-07-2004 06:19 AM

Nice..
very useful:D

insanctus 05-07-2004 06:22 AM

Most welcome :) , don't forget to click install if you use this :)

I have been using something simular on my site for some time, makes life so much easier.

FWF 05-07-2004 07:14 AM

awesome!

i agree this should have been included in vB 3, anywho...ive got this installed thanks for releasing it :D

*installs*

dkny 05-07-2004 07:46 AM

I get error:
Fatal error: Call to a member function on a non-object in /home/jb/public_html/forum/includes/functions_subscriptions.php on line 332

doesn't agree with this command:
$paypalextra = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "subscription AS subscription WHERE subscriptionid=$subscriptionid");

btw I ran ALTER TABLE `subscription` ADD `reoccur` VARCHAR( 10 ) DEFAULT '0' NOT NULL ;

Any suggestions?

insanctus 05-07-2004 07:49 AM

Quote:

Originally Posted by dkny
I get error:
Fatal error: Call to a member function on a non-object in /home/jb/public_html/forum/includes/functions_subscriptions.php on line 332

doesn't agree with this command:
$paypalextra = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "subscription AS subscription WHERE subscriptionid=$subscriptionid");

btw I ran ALTER TABLE `subscription` ADD `reoccur` VARCHAR( 10 ) DEFAULT '0' NOT NULL ;

Any suggestions?

Yes I am sorry about that (will update the txt, had it in there but right before saved power went out)

To fix find in includes/functions_subscriptions.php

Code:

function construct_payment($method, $cost, $currency, $subscriptionid, $title, $userid)
{
        global $vboptions;

Replace With

Code:

function construct_payment($method, $cost, $currency, $subscriptionid, $title, $userid)
{
        global $vboptions,$DB_site;


dkny 05-07-2004 07:51 AM

Wow that was the fastest reply EVER! Will try it now, thanks!

insanctus 05-07-2004 07:52 AM

lmao no trouble at all, I had it in then I had to redo the todo , power went out right before I hit save, this area is bad for power.

dkny 05-07-2004 07:53 AM

Yep that worked, you the man!

insanctus 05-07-2004 07:59 AM

Quote:

Originally Posted by dkny
Yep that worked, you the man!

Very cool :) I know alot had been after this. I had time since one my clients is MIA and I am waiting on a responce.

insanctus 05-07-2004 08:56 AM

Updated File If You Already Installed Do The Following.

Open /subscriptions/paypal.php And Find
Code:

if ($_POST['txn_type'] == 'web_accept' AND $_POST['payment_status'] == 'Completed')
Replace With
Code:

if ($_POST['txn_type'] == 'web_accept' AND $_POST['payment_status'] == 'Completed' OR $_POST['txn_type'] == 'subscr_payment' AND $_POST['payment_status'] == 'Completed')
Sorry about that, darn power.....

Boofo 05-07-2004 09:40 AM

I don't mean to sound simple here, but what does this actually do?

insanctus 05-07-2004 09:45 AM

Quote:

Originally Posted by Boofo
I don't mean to sound simple here, but what does this actually do?

Ok vbulletin paypal subscriptions only charges one time, so if you set up a monthly fee your users have to redo it every month or loss there forum access or what ever else you give them.

This takes it and turns it into reoccuring payments (if you choose that option)

This way they pay you every set ammount of time you picked for that subscription and it checks to see if it gets paid every month :)

For instance, say you have a paying members only area, and you want them to have to pay $10 a month.

With this you can charge per month and it handles all the charges, and every month they send another payment automaticly your script gets updated and sets their new expiration.

The vbulletin subscriptions before only worked one time per click now you can do reoccuring :)

Hope that makes sence, if not I will drink some coffee and try again :)

Boofo 05-07-2004 09:51 AM

No, you explained it very well, thank you. I don't have any paypal subscriptions set up on my board but I will click install and install it anyway as this should be default in vb3. Good job! ;)

insanctus 05-07-2004 09:54 AM

Quote:

Originally Posted by Boofo
No, you explained it very well, thank you. I don't have any paypal subscriptions set up on my board but I will click install and install it anyway as this should be default in vb3. Good job! ;)

Many thanks :) , I prolly should write a better explination in first post.

Never know they may toss my code in the next update

[high]* insanctus laughs and dreams on.[/high]

Boofo 05-07-2004 10:07 AM

If this working in this version then?

Quote:

Originally Posted by insanctus
I have mine set up to do monthly reacuring on my personal site, the only thing it does not have so far is a check to see if paid monthly, so if they cancled I have to change it manualy.

This quote is from the other thread.

insanctus 05-07-2004 10:18 AM

Yes it is working in this version :) hence why the release.

I had to get some data built up on it.

Boofo 05-07-2004 10:22 AM

I thought so but I wanted to be sure. Again, excellent job! ;)

insanctus 05-07-2004 10:24 AM

Quote:

Originally Posted by Boofo
I thought so but I wanted to be sure. Again, excellent job! ;)

Never hurts to ask :) and most welcome.

I learned 'alot' about paypal in last 4 days or so, and I wanted to make sure I had the payments tight :)

TheEDIGuy 05-07-2004 01:48 PM

Excellent job. Clicking Install, and installing it right now, much to the delight of my monthly subscribers.

Thanks!

Erwin 05-07-2004 01:50 PM

The only thing keeping me from installing this is that I am sure the next vB3 update will have this, and I don't want to muck up the database with extra fields. :) On the other hand, great job. I will press install in the meantime.

Erwin 05-07-2004 02:01 PM

Ah, what the heck, I installed it. :)

Erwin 05-07-2004 02:08 PM

By the way, if the member wants to cease the reoccuring subscriptions, how does he or she do that? I need to provide instructions.

TheEDIGuy 05-07-2004 02:10 PM

One little typo in Step 3:

Quote:

<input type=\"hidden\" name=\"ammount\" value=\"$cost\" />
Only one M in there...

ranger2kxlt 05-07-2004 06:13 PM

what about something like.....another drop down right under the price on the subscription page...that says one time or reoccuring? that way they can choose if they want to pay once or for life? I would install that :-D

Thanks...looks like a useful hack (wish i could use that)

insanctus 05-07-2004 07:22 PM

Quote:

Originally Posted by Erwin
By the way, if the member wants to cease the reoccuring subscriptions, how does he or she do that? I need to provide instructions.

They log into their paypal, and hit cancle on that subscription. It will stop their payments , hence stoping the update of their time expire date.

Quote:

Originally Posted by ranger2kxlt
what about something like.....another drop down right under the price on the subscription page...that says one time or reoccuring? that way they can choose if they want to pay once or for life? I would install that :-D

Thanks...looks like a useful hack (wish i could use that)

I may in the future, sounds like an interesting idea.

insanctus 05-07-2004 07:23 PM

Quote:

Originally Posted by TheEDIGuy
One little typo in Step 3:

Only one M in there...

Actually that <input type=\"hidden\" name=\"ammount\" value=\"$cost\" /> is useless any how :)

Subscriptions uses a3

Majik? 05-07-2004 09:16 PM

Excellent addition.. :up: I'll never know why some things weren't inluded originally.

Erwin 05-08-2004 12:59 AM

I agree... if you make the checkbox on the subscription page itself, it would make it easier to implement. Great hack nonetheless.

insanctus 05-08-2004 01:14 AM

I think that would be a sepperate hack, and the two would conflict.

Reason is, say you as admin want it to be reoccuring, then their check box is in effect useless.

Plus lets face it most members are not bright enough to read all of what they are doing in the first place.

Fluous 05-08-2004 01:33 AM

Okay, before I install this I have a couple questions.

When the month comes, where do they pay? From their usercp? Like if they bought a month. It expires how would they go about renewing it. If it's from paypal, then what would be the difference of a manual one. Or does it automatically just take it out. *what I'm thinking*. And what if they hit the bunkers...aka below zero in their account. I know that paypal accounts can go negative, but would this stop it upon hitting 0? Doesn't matter to me jw.

But now that I rethought and figures it pays every month itself. It's all good and I'll install. :)

insanctus 05-08-2004 01:36 AM

Quote:

Originally Posted by Fluous
Okay, before I install this I have a couple questions.

When the month comes, where do they pay? From their usercp? Like if they bought a month. It expires how would they go about renewing it. If it's from paypal, then what would be the difference of a manual one. Or does it automatically just take it out. *what I'm thinking*. And what if they hit the bunkers...aka below zero in their account. I know that paypal accounts can go negative, but would this stop it upon hitting 0? Doesn't matter to me jw.

But now that I rethought and figures it pays every month itself. It's all good and I'll install. :)

It auto bills them if you select reoccur, if they hit 0 and it shows as pending, they do not get updated time limit until their payment goes thru (so they would lose access while not paid)

Fluous 05-08-2004 02:17 AM

Thank you. Was wondering how that little part worked :).

aloha 05-08-2004 06:21 AM

Thanks insanctus! Erwin... just keep the install button clicked :P

Erwin 05-08-2004 06:40 AM

I've set it up. :) Let's see how it goes.

insanctus 05-08-2004 07:27 AM

Quote:

Originally Posted by Erwin
I've set it up. :) Let's see how it goes.

It is working good on mine :) ..

dkny 05-08-2004 09:40 AM

I installed this excellent hack. I have a test account set up. The problem I have, even before installing this hack is that the members dont show up in the subscription section in admin, plus there group doesn't chang (from Regular member to Paid Member). I went to MYPHPadmin and the Subscriptionlog tables are blank. I tried it with a few test accounts. Anyone have the same problem? I need this fixed, I'm willing to pay.

insanctus 05-08-2004 09:45 AM

Quote:

Originally Posted by dkny
I installed this excellent hack. I have a test account set up. The problem I have, even before installing this hack is that the members dont show up in the subscription section in admin, plus there group doesn't chang (from Regular member to Paid Member). I went to MYPHPadmin and the Subscriptionlog tables are blank. I tried it with a few test accounts. Anyone have the same problem? I need this fixed, I'm willing to pay.

Sounds like you did not edit paypal.php :) Step 4

insanctus 05-08-2004 09:56 AM

After some thought, I may add in some more on this.

For my uses I and I think others would like it, is one time of so much , then so much each time after. :)

I will play with it when wake.

insanctus 05-08-2004 10:43 AM

Here is an example of what it would look like.

So say you wanted to charge them $50 at first then $10 a month each month after this would allow that.

I will release this update once I get a chance to test it.


All times are GMT. The time now is 12:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01417 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete