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)

sketch42 06-21-2004 05:27 PM

Quote:

Originally Posted by Amzadi
I offer subscriptions based on daily, weekly, monthly and yearly rates.
Daily - $4, Weekly - $21, Monthly - $60 & Yearly - $365
Now while the amounts may be excessive for your sites, look at the structure. It increases the daily cost for the shorter terms. If you're getting a lot of cancellations after the first subscription, this may be a good idea for you to use.

o no i was just wondering if with the subscription cancellation they get refunded as well

Amzadi 06-21-2004 05:42 PM

No, they don't. It just cancels future subscription payments and VB puts them back in their previous group when it expires.

sketch42 06-25-2004 12:46 PM

Quote:

Originally Posted by Amzadi
No, they don't. It just cancels future subscription payments and VB puts them back in their previous group when it expires.

BIG problem with subscription cancellations... they arent being taken out of the subscription... so i can only think that this is a prob with vb or the hack

insanctus 06-25-2004 12:58 PM

Quote:

Originally Posted by sketch42
BIG problem with subscription cancellations... they arent being taken out of the subscription... so i can only think that this is a prob with vb or the hack

Well if they paid why would you want them taken out till the paid time is up?

sketch42 06-25-2004 01:02 PM

Quote:

Originally Posted by insanctus
Well if they paid why would you want them taken out till the paid time is up?

because even afterwards like the month is up.... heck i even had a guy that reported a fraudulent purchase and the money was refunded .. yet he still wasnt removed

insanctus 06-25-2004 01:06 PM

That is vb , but at that point I would have banned him...... give them all ip info (if he claiming it is fake) and then let them take care of legal stuff.

sketch42 06-25-2004 01:12 PM

Quote:

Originally Posted by insanctus
That is vb , but at that point I would have banned him...... give them all ip info (if he claiming it is fake) and then let them take care of legal stuff.

hmm i never thought of that......

so this is a vb bug?

insanctus 06-25-2004 01:16 PM

It is not as much a bug as just not an option?

Boofo 06-25-2004 01:47 PM

Quote:

Originally Posted by insanctus
It is not as much a bug as just not an option?

Any word on the new version? ;)

sketch42 06-25-2004 04:24 PM

I thought i would update anyone else experiencing the issue with the refunded payments.. i hope noone minds....
Quote:

Originally Posted by Scott MacVicar
Paypal have changed the variables again without notifying customers. I've now updated the paypal script to handle the new reversal methods and it will be in 3.0.2.


Here's the FIX clickity click click click

trainer 06-25-2004 05:31 PM

Quote:

Originally Posted by insanctus
It is not as much a bug as just not an option?


can you get back to me on the contest hack?

Amzadi 06-25-2004 05:43 PM

Quote:

Originally Posted by sketch42
I thought i would update anyone else experiencing the issue with the refunded payments.. i hope noone minds....



Here's the FIX clickity click click click

Thanks for the link Sketch42

Cold Steel 06-28-2004 05:22 AM

Installed. Thanks!

heynurse 07-20-2004 04:10 PM

Does anyone have this installed on 3.0.3? I'm having difficulties getting it to work correctly?

I'm installing this on 3.0.3 and I'm having a problem with this step:

Step 3. Open includes/functions_subscriptions.php

It says to find:
Code:

case 'paypal':
$form['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$form['method'] = 'post';
$form['hiddenfields'] = "
<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />
<input type=\"hidden\" name=\"business\" value=\"$vboptions[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"$title Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"$item\" />
<input type=\"hidden\" name=\"amount\" value=\"$cost\" />
<input type=\"hidden\" name=\"currency_code\" value=\"$currency\" />
<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />
<input type=\"hidden\" name=\"return\" value=\"$vboptions[bburl]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />";
break;

But I can't find that exactly, I'm sure the code was modified since this hack was writtne, the closest thing to it is this:

Code:

case 'paypal':
$form['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$form['method'] = 'post';
$form['hiddenfields'] = "
<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />
<input type=\"hidden\" name=\"business\" value=\"$vboptions[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"$title Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"$item\" />
<input type=\"hidden\" name=\"amount\" value=\"$cost\" />
<input type=\"hidden\" name=\"currency_code\" value=\"$currency\" />
<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />
<input type=\"hidden\" name=\"shipping\" value=\"0.00\" />
<input type=\"hidden\" name=\"return\" value=\"$vboptions[bburl]/$vboptions[forumhome].php\" />
<input type=\"hidden\" name=\"notify_url\" value=\"$vboptions[bburl]/subscriptions/paypal.php\" />
<input type=\"hidden\" name=\"custom\" value=\"$userinfo[username]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />";
break;

This is what is supposed to be what is to replace the first set of code above:
Code:

case 'paypal':
$form['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$form['method'] = 'post';
/// Add In For Reacuring Payments
$paypalextra = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "subscription AS subscription WHERE subscriptionid=$subscriptionid");
if($paypalextra[reoccur]==0){// It is one time
$form['hiddenfields'] = "
<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />
<input type=\"hidden\" name=\"business\" value=\"$vboptions[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"$title Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"$item\" />
<input type=\"hidden\" name=\"amount\" value=\"$cost\" />
<input type=\"hidden\" name=\"currency_code\" value=\"$currency\" />
<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />
<input type=\"hidden\" name=\"return\" value=\"$vboptions[bburl]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />";
}else{
$form['hiddenfields'] = "
<input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\" />
<input type=\"hidden\" name=\"business\" value=\"$vboptions[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"$title Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"$item\" />
<input type=\"hidden\" name=\"currency_code\" value=\"$currency\" />
<input type=\"hidden\" name=\"ammount\" value=\"$cost\" />
<input type=\"hidden\" name=\"a3\" value=\"$cost\" />
<input type=\"hidden\" name=\"p3\" value=\"$paypalextra[length]\">
<input type=\"hidden\" name=\"t3\" value=\"$paypalextra[units]\">
<input type=\"hidden\" name=\"src\" value=\"1\">
<input type=\"hidden\" name=\"sra\" value=\"1\">
<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />
<input type=\"hidden\" name=\"return\" value=\"$vboptions[bburl]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />";
 
}
break;

Does anyone have any updated instructions for this step in 3.0.3? Any assistance would be greatly appreciated. Thanks

nexialys 07-20-2004 04:27 PM

you just need to find the corresponding lines, and that's all... put the missing lines.

the new version of 3.0.3 is adding some lines in the paypal reoccuring process that may answer the bugs with the older versions, that's why...

heynurse 07-20-2004 05:27 PM

Cool, thanks for the advice, but I've tried messing with the code, I keep getting all kinds of errors, I am a complete novice and don't know what the heck I'm doing when it comes to programing.

$$$$ If someone wants to figure this out, I'd pay them for their time and share it with the forum for free :) I'll pay you by paypal.

heynurse 07-20-2004 05:53 PM

duplicate post removed... oops

RapCheck 07-28-2004 01:56 AM

heynurse, I just upgraded to 3.03 myself, and re-adding hacks I ran into the same problem. This is what I put in, and everything appears to be working fine. I don't receive any errors at all. Hopefully it's correct.


PHP Code:

 case 'paypal'
$form['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$form['method'] = 'post';
/// Add In For Reacuring Payments
$paypalextra $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "subscription AS subscription WHERE subscriptionid=$subscriptionid");
if(
$paypalextra[reoccur]==0){// It is one time
$form['hiddenfields'] = "
<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />
<input type=\"hidden\" name=\"business\" value=\"
$vboptions[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"
$title Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"
$item\" />
<input type=\"hidden\" name=\"amount\" value=\"
$cost\" />
<input type=\"hidden\" name=\"currency_code\" value=\"
$currency\" />
<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />
<input type=\"hidden\" name=\"shipping\" value=\"0.00\" />
<input type=\"hidden\" name=\"return\" value=\"
$vboptions[bburl]/$vboptions[forumhome].php\" />
<input type=\"hidden\" name=\"notify_url\" value=\"
$vboptions[bburl]/subscriptions/paypal.php\" />
<input type=\"hidden\" name=\"custom\" value=\"
$userinfo[username]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />"
;
}else{
$form['hiddenfields'] = "
<input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\" />
<input type=\"hidden\" name=\"business\" value=\"
$vboptions[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"
$title Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"
$item\" />
<input type=\"hidden\" name=\"currency_code\" value=\"
$currency\" />
<input type=\"hidden\" name=\"ammount\" value=\"
$cost\" />
<input type=\"hidden\" name=\"a3\" value=\"
$cost\" />
<input type=\"hidden\" name=\"p3\" value=\"
$paypalextra[length]\">
<input type=\"hidden\" name=\"t3\" value=\"
$paypalextra[units]\">
<input type=\"hidden\" name=\"src\" value=\"1\">
<input type=\"hidden\" name=\"sra\" value=\"1\">
<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />
<input type=\"hidden\" name=\"return\" value=\"
$vboptions[bburl]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />"
;
 
}
break; 


por4x4 08-06-2004 02:26 PM

Trying to install this on 3.0.3, and am having trouble finding some of the code....

Instructions call to find -

Code:

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

But all I can find is this -

Code:

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

What to do?

sblum 08-06-2004 03:25 PM

I had the same problem, por4x4. I tried changing userid to userinfo and it didn't work. I'd get the paypal subscription and money, but their subscription was not activated.

por4x4 08-07-2004 04:13 PM

Quote:

Originally Posted by por4x4
Trying to install this on 3.0.3, and am having trouble finding some of the code....

Instructions call to find -

Code:

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

But all I can find is this -

Code:

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

What to do?

Buller? Buller? This is one of the BEST hacks of all time. Come awn, someone has got to know how to get this to work with 3.0.3!

RapCheck 08-13-2004 12:47 AM

guys, instead of replacing the whole section theres just one part that is added so just change
PHP Code:

global $vboptions

to
PHP Code:

global $vboptions,$DB_site

;)

por4x4 08-13-2004 02:33 AM

Quote:

Originally Posted by RapCheck
guys, instead of replacing the whole section theres just one part that is added so just change
PHP Code:

global $vboptions

to
PHP Code:

global $vboptions,$DB_site

;)

lol I knew it had to be an easy fix, but that was ridiculous! :D Thanks man!

Ted S 08-19-2004 10:42 PM

Great hack, it took only a few minutes to install on 3.0.3, thanks!

rs-host.net 08-19-2004 11:06 PM

I coded something like this for my site, but not a bad hack here.

Chazz Layne 09-01-2004 09:19 AM

Quote:

Originally Posted by dkny
you right I did skip this step, I modified it but I still cant get the members group to change plus they users dont show up in the subscription page. Any ideas what it could be?

Any updates on this problem from anyone? Having the same issue here, v3.0.1. Checked and rechecked the install...

Doug Quance 09-01-2004 06:11 PM

Rob-

I'm getting an error when executing the SQL query:


An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'webster3_forums.subscription' doesn't exist


Your thoughts?

BTW, I am running 3.0.3 with the vBadvanced CMPS... which script should I use?

Thanks so much for this hack... I am going to send you a few bucks for your time :)

Doug Quance 09-01-2004 06:30 PM

Btw... I've never seen an INSTALL button in the header of a thread before... how does that work? After all... the code I need to install is not on my local computer, but on a server...

Just curious.

Doug Quance 09-01-2004 07:36 PM

Well... I found that particular issue.... I had to change my query to "vb3_subscription"

Doug Quance 09-01-2004 08:23 PM

Well... everything seemed to go pretty well, until I tried purchasing a subscription. When (as a customer) I click the link to purchase, I go to:

https://www.paypal.com/cgi-bin/webscr

and that page displays:

Error Detected

The link you have used to enter the PayPal system is invalid. Please review the link and try again.


Any clues as to how to fix this?

I checked the code over as best as I can, and I can't see where the problem might be. :(

Doug Quance 09-01-2004 09:09 PM

I just discovered the problem only occurs when I select "reoccuring" in the ACP. If I uncheck it, it works fine...

Any ideas?

Yahhoon23 09-03-2004 05:39 AM

Just a quick question, maybe I could get an answer here.

I have it set for recurring subscriptions etc etc but one problem.

Whenever someone subscribes to my website, it gives them the option to provide a shipping address or not provide one. Well I want to make it where they have no option and it automatically provides the shipping address for me.

I have a Paypal donation button added on my website that auto-provides the shipping address but when you actually subscribe through the website and not the donation button you have the option to pick shipping address or no shipping address.

Any feedback would be great.

AidanII 09-04-2004 12:43 PM

I've been taking a quick look at the code for one or two purposes of my own...

Would it not make more sense to change

PHP Code:

if ($_POST['txn_type'] == 'web_accept' AND $_POST['payment_status'] == 'Completed' OR $_POST['txn_type'] == 'subscr_payment' AND $_POST['payment_status'] == 'Completed'

to be:

PHP Code:

if (($_POST['txn_type'] == 'web_accept' OR $_POST['txn_type'] == 'subscr_payment') AND $_POST['payment_status'] == 'Completed'

I beleive this is functionally the same, but does one less comparison. Yes, I'm being picky here, sometimes things like this just irk me a bit.

A possible addition might be setting up the POST request to Paypal to automatically submit the correct URL for the notification. I beleive the parameter is called "notify_url". This should automatically enable IPN for the transaction posted, regardless of the settings in the account - As long as it's capable of IPN of course!

AidanII 09-04-2004 12:49 PM

Quote:

Originally Posted by Doug Quance
Any clues as to how to fix this?

Doug, check the code you added to the includes/functions_subscriptions.php, in particular the bit under case 'paypal' after the case statement. Also check to see if it still works correctly for a one-off payment. If you're getting an error from that part, then ensure things like your paypal email address are set correctly in the configuration.

That would be my guess!

Doug Quance 09-04-2004 02:42 PM

Yes, it works fine until I select the recurring option... then I get the error message.

I don't really understand PHP, so I can't tell where the problem might exist...

idslamyou 09-08-2004 01:33 AM

I have had this installed for a month or so. I am just starting to get some members. They are able to subscribe and I get the notice from paypal about their payment, but their usergroup is not changing. I have doublechecked to make sure I have checked the additional usergroup to add them too. Can anyone help?

idslamyou 09-14-2004 03:55 PM

Can anyone help me with the problem I am having in the post above this? I have doublechecked all of the edits and still have the same problem or vbulletin not adding the user to the additional usergroup.

TIA

Illuvatar 10-01-2004 10:07 PM

Okay.....what in the world did I do wrong! lol

I copied the query in and ran it against the 'subscriptions' table, and after applying all the php edits, I get this when I attempt to update the subscriptions area in the admin cp.
Quote:

Invalid SQL: UPDATE subscription SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'Silver Subscriber Monthly',
description = 'Thank you for your interest in subscribing to WotR. Forum Benefits for the Silver Subscriber are:
A custom Avatar of your choice
A custom title of your choice
An additional avatar showing their status as subscribers and supporters of the site.',
length = '30',
units = 'D',
cost = 'a:3:{s:3:\"usd\";s:4:\"5.00\";s:3:\"gbp\";s:4:\"0 .00\";s:3:\"eur\";s:4:\"0.00\";}',
nusergroupid = '9',
active = '0',
reoccur = '0',
membergroupids = '',
forums = 'N;'
WHERE subscriptionid=1
mysql error: Unknown column 'reoccur' in 'field list'

mysql error number: 1054

Date: Friday 01st of October 2004 07:01:28 PM

jbroder 10-26-2004 09:37 PM

Hi,
I've never used a hack before, I usually just do my own thing. But, this one made things so much easier, I am really glad I downloaded.

I made some modifications to my install, so that the user could tell whether their subscription is going to be billed again or not. I added a cancel button right on the user cp for paid subscriptions, and when the user cancels through paypal, the subscriptionslog table is updated to show that the subscription has been cancelled.

I don't know if anyone else needs this, but here it is attached. I just wrote it today, so maybe there are errors I haven't found yet. For instance, my board only has rebilling transactions, so that might cause an issue on your board.

cheers!

version2 11-19-2004 01:29 PM

Quote:

Originally Posted by sketch42
I thought i would update anyone else experiencing the issue with the refunded payments.. i hope noone minds....



Here's the FIX clickity click click click

Hey, uh, everyone...I think I might see a problem here.

When I installed this last month my subscribers started subscribing. In my paypal register I can see the 'Subscription Creation' line as well as the 'Payment' line for each new subscriber. Well, a month later it is *almost* time for renewal and I am getting 'Subscription Creations' as well as payments again. And the first subscription creation still look like they are active and are not set to renew for a couple of days now.

What do I need to do?! Is this a problem? I dont really want to wait a couple to find out I am doublebilling all my subscribers.


All times are GMT. The time now is 06:23 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
  • Page Generation 0.01504 seconds
  • Memory Usage 1,882KB
  • 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
  • (7)bbcode_code_printable
  • (7)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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