vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Paypal Donations (With Instant Payment Notification) -- RC1 (Public Testing) (https://vborg.vbsupport.ru/showthread.php?t=54436)

Rebel38 06-22-2003 11:44 AM

Hi I'm getting this error when I try create a new button any idea what could be causing it?
Thaks
Rebel

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: INSERT INTO paypal_donatebuttons (id,
business,
item_name,
item_number,
image_url,
no_shipping,
return,
rm,
cancel_return,
no_note,
cn,
cs,
custom,
invoice,
tax,
currency_code,
amount,
submit_button) VALUES (NULL, '', 'Site Donations', '', '', '', 'http://www.mysite.com/forum1/paypal.php?action=success', '1', 'http://www.mysite.com/forum1/paypal.php?action=cancel', '', 'Comments', '1', 'mysite', 'Aus1', 'N/A', 'USD', '$200', 'http://www.mysite.com/donate.gif')
mysql error: Unknown column 'item_number' in 'field list'

mysql error number: 1054

Date: Sunday 22nd of June 2003 07:34:50 AM
Script: http://www.mysite.com/forum1/forum1/...ypal_admin.php
Referer: http://www.mysite.com/forum1/admin/p...n=make_button&

Dean C 06-22-2003 03:36 PM

You haven't installed the queries correctly as the item_number column does not exist :) ^^

Try

- miSt

ap0c 06-22-2003 05:56 PM

nice update on this Cloudrunner

Cloudrunner 06-22-2003 05:58 PM

Actually, the item_number column was removed for the guest posters portion of the hack...unfortunately, this is my fault, I forgot to remove that in the paypal_admin.php.

I will fix it and get the fixed archive up again.

bug found ;)

mist, okay, I'm not quite understanding again...you want the donation button to be displayed for xxx amount of (days, weeks, months, years, etc). and then upon expiration anyone who donated using that button get their awards and such removed right? What about the topten listing? do we want them removed from there as well?

I fix my post upstairs too...sorry, I thought it was funny :P

Okay to fix the donate_buttons query before I get the new archive up here:

edit: This bug has been fixed and is in the archive for 0.9.5 and later.

Cloudrunner 06-22-2003 06:52 PM

Found another bug, sorry!

edit: This bug has been fixed and is in the archive for 0.9.5 and later.

sHORTYWZ 06-24-2003 12:23 AM

definatly clicked on install on this one man.. looks GREAT..

question though, i had a friend of mine who wasn't registered on my board post a $1 donation at a test - everything is in the db correctly, however he isn't showing up on the contributor list.. nothing listed on there, not even guest. design or flaw?

Cloudrunner 06-24-2003 01:23 AM

until the donation is marked as "Complete" from paypal's IPN then nothing will show up on the contributors list. If after the payment_status column shows up as "Complete" for that transaction, the information still does not show on the contributors list then let me know cus then it would be a bug...Thanks

Crazy Pete 06-24-2003 01:27 AM

There appears to be a big discrepancy in the code for this when editing/adding buttons now. 0.9.2 worked fine, but it seems to be trying to find several columns which no longer exist...

Database error in vBulletin Control Panel 2.3.0:


Invalid SQL: INSERT INTO paypal_donatebuttons (id,
business,
item_name,
image_url,
no_shipping,
return,
rm,
cancel_return,
no_note,
cn,
cs,
custom,
invoice,
tax,
currency_code,
amount,
submit_button) VALUES (NULL, 'donations@expectedmiracles.com', 'emdonation', 'http://www.expectedmiracles.com/images/expect.1.jpg', '', 'http://www.expectedmiracles.com/forums/paypal.php?action=success', '1', 'http://www.expectedmiracles.com/forums/paypal.php?action=cancel', '', 'Comments:', '0', '', '', '', '', '', 'http://www.expectedmiracles.com/forums/images/donate.gif')
mysql error: Unknown column 'custom' in 'field list'


mysql error number: 1054


Date: Monday 23rd of June 2003 10:24:12 PM
Script: http://www.expectedmiracles.com/foru...ypal_admin.php
Referer: http://www.expectedmiracles.com/foru...make_button&s=

-and-

Database error in vBulletin Control Panel 2.3.0:


Invalid SQL: INSERT INTO paypal_donatebuttons (id,
business,
item_name,
item_number,
image_url,
no_shipping,
return,
rm,
cancel_return,
no_note,
cn,
cs,
custom,
invoice,
tax,
currency_code,
amount,
submit_button) VALUES (NULL, 'donations@expectedmiracles.com', 'emdonation', '', 'http://www.expectedmiracles.com/images/expect.1.jpg', '', 'http://www.expectedmiracles.com/forums/paypal.php?action=success', '1', 'http://www.expectedmiracles.com/forums/paypal.php?action=cancel', '', 'Comments:', '0', '', '', '', '', '', 'http://www.expectedmiracles.com/forums/images/donate.gif')
mysql error: Unknown column 'item_number' in 'field list'


mysql error number: 1054


Date: Monday 23rd of June 2003 10:20:54 PM
Script: http://www.expectedmiracles.com/foru...ypal_admin.php
Referer: http://www.expectedmiracles.com/forums/admin/paypal

I got it working but I had to remove those two lines of code from the paypal_admin file. Not sure what happened there or if you were aware of it just yet.

sHORTYWZ 06-24-2003 01:30 AM

It's showing up as completed in the DB.

Cloudrunner 06-24-2003 04:12 AM

Crazy Pete--

Both database errors were addressed already ;)

https://vborg.vbsupport.ru/showthrea...663#post411663

And a bug found as well after that one was addressed:

https://vborg.vbsupport.ru/showthrea...680#post411680

Shorty--Please contact me via on of the IM's listed in my profile. I need to take a look at your setup, I may have missed something, but my end is working fine.

Rebel38 06-24-2003 11:47 AM

Quote:

Yesterday at 05:58 AM Cloudrunner said this in Post #44
Actually, the item_number column was removed for the guest posters portion of the hack...unfortunately, this is my fault, I forgot to remove that in the paypal_admin.php.

I will fix it and get the fixed archive up again.

bug found ;)

mist, okay, I'm not quite understanding again...you want the donation button to be displayed for xxx amount of (days, weeks, months, years, etc). and then upon expiration anyone who donated using that button get their awards and such removed right? What about the topten listing? do we want them removed from there as well?

I fix my post upstairs too...sorry, I thought it was funny :P

Okay to fix the donate_buttons query before I get the new archive up here:

in paypal_admin.php find:
PHP Code:

  $DB_site->query("INSERT INTO paypal_donatebuttons (id,
                                                     business,
                                                     item_name, 

Replace that entire query with this:
PHP Code:

  $DB_site->query("INSERT INTO paypal_donatebuttons (id,
                                                     business,
                                                     item_name,
                                                     image_url,
                                                     no_shipping,
                                                     return,
                                                     rm,
                                                     cancel_return,
                                                     no_note,
                                                     cn,
                                                     cs,
                                                     invoice,
                                                     tax,
                                                     currency_code,
                                                     amount,
                                                     submit_button) VALUES (NULL, '"
                                                     
.addslashes($options['business_email'])
                                                     .
"', '"
                                                     
.addslashes($_POST['item_name'])
                                                     .
"', '"
                                                     
.addslashes($_POST['image_url'])
                                                     .
"', '', '"
                                                     
.addslashes($return)
                                                     .
"', '"
                                                     
.addslashes($_POST['rm'])
                                                     .
"', '"
                                                     
.addslashes($cancel_return)
                                                     .
"', '', '"
                                                     
.addslashes($_POST['cn'])
                                                     .
"', '"
                                                     
.addslashes($_POST['cs'])
                                                     .
"', '"
                                                     
.addslashes($_POST['invoice'])
                                                     .
"', '"
                                                     
.addslashes($_POST['tax'])
                                                     .
"', '"
                                                     
.addslashes($_POST['currency_code'])
                                                     .
"', '"
                                                     
.addslashes($_POST['amount'])
                                                     .
"', '"
                                                     
.addslashes($_POST['submit_button'])
                                                     .
"')"); 

then find this:
PHP Code:

$DB_site->query("UPDATE paypal_donatebuttons SET business = '" 

and replace that entire query with this:
PHP Code:

  $DB_site->query("UPDATE paypal_donatebuttons SET business = '"
                 
.addslashes($options['business_email'])
                 .
"', item_name = '"
                 
.addslashes($_POST['item_name'])
                 .
"', image_url = '"
                 
.addslashes($_POST['image_url'])
                 .
"', return = '"
                 
.addslashes($return)
                 .
"', rm = '"
                 
.addslashes($_POST['rm'])
                 .
"', cancel_return = '"
                 
.addslashes($cancel_return)
                 .
"', cn = '"
                 
.addslashes($_POST['cn'])
                 .
"', cs = '"
                 
.addslashes($_POST['cs'])
                 .
"', invoice = '"
                 
.addslashes($_POST['invoice'])
                 .
"', tax = '"
                 
.addslashes($_POST['tax'])
                 .
"', currency_code = '"
                 
.addslashes($_POST['currency_code'])
                 .
"', amount = '"
                 
.addslashes($_POST['amount'])
                 .
"', submit_button = '"
                 
.addslashes($_POST['submit_button'])
                 .
"' WHERE id = '"
                 
.$_POST['id']
                 .
"'"); 

The queries both end the line before
PHP Code:

echo "All good!"

The file is fixed, but won't be up until next update, so in the interrim use this to fix the problem.

Thanks Cloudrunner, it's working fine now, great hack to mate alot of people have been waiting for this,

Clicks install

Thanks again
Rebel

Crazy Pete 06-24-2003 01:39 PM

Quote:

Today at 01:12 AM Cloudrunner said this in Post #50
Crazy Pete--

Both database errors were addressed already ;)

https://vborg.vbsupport.ru/showthrea...663#post411663

And a bug found as well after that one was addressed:

https://vborg.vbsupport.ru/showthrea...680#post411680

Ahh, thanks for that. I s'pose it's always best to actually look and search in the thread first eh? :)

Cloudrunner 06-24-2003 06:38 PM

Crazy Pete--

usually ;)

smile! Life is grand!

Rebel38--

Thank you for the kind words! But don't forget the second fix just below the database repair, or you won't be notified of any of your payments ;)

Cloudrunner 06-25-2003 01:31 AM

ALERT!!!

Right now as the code sits, There is a major bug in the code where nothing updates properly, you'll still recieve the donations and everything, but it's not displaying!

Please disable the link to your hack until I can get this fixed. I'm working on the problem with Shorty, and should get an updated release up soon!

Thank you for your patience and understanding on this!

)O( Cloudrunner )O(

Cloudrunner 06-25-2003 03:31 AM

All fixed!

Please download the new version. If you are running version 0.9.4 then all you have to do is upload the new files overwriting the old ones.

If you are running a version prior to 0.9.4 then you'll need to run the installer and upgrade from your version.

This update fixes a bug found by shortywz where a new donator does not show up on the main donators page. This has been fixed. I also cleaned up some more code, and a slight adjustment to the adminCP.

Cloudrunner 06-25-2003 03:44 AM

yak!

Sorry, missed a line...archive is updated again for 0.9.5...

if you downloaded paypal_donations(0.9.5).zip, then please download the new one: paypal_donations(0.9.5.beta--noscreens).zip

Thanks! (sorry about that ;))

)O( Cloudrunner )O(

Cloudrunner 06-25-2003 03:53 AM

Before I forget--

Shorty! Bro, yer the man! Thank you for giving me a hand on this one, I appreciated it greatly!

You all should thank shorty for finding the bug and helping me to fix it up, cus without him it woulda slipped through the cracks!

Thanks!

)O( Cloudrunner )O(

Crazy Pete 06-25-2003 01:26 PM

Thanks very much you guys! It's nice to see a really well thought-out hack with such great support for it.

Cloudrunner 06-28-2003 01:31 AM

Well, it looks as though most of the major bugs have been worked out so far, Please let me know how it is running for you all who have installed this hack.

If there is still no bugs found in the next week or so, I'll be moving this to a full release (this is due to the fact that most of the coding adjustments are mostly features and addons to this hack that I will be doing when I am able to, there are a few updates that I will be doing to this, but all in due time of course).

Please let me know of any problems, and of course any more suggestions to the hack so that I may add them to the ToDo List.

Thanks for the help and support guys!

)O( Cloudrunner )O(

Shepski 07-02-2003 12:57 PM

hiya, this is a great hack but i think i may have done something wrong. I have run thru the install and now sent some money to my account using visa but when I click continue on paypal to send me back to my site I get the following:
Code:

Database error in vBulletin 2.2.6:

Invalid SQL: INSERT INTO paypal_funds (id, date, donated) VALUES ('0E567297NG154303X', NOW(), '4.63')
mysql error:

mysql error number:

Date: Wednesday 02nd of July 2003 03:00:26 PM
Script: http://forums.dvd-swaps.co.uk/paypal.php?action=success
Referer:

it does seem to be updating my user profile to say how much i have donated so not sure what this mysql error is relating to.

Any ideas?

sHORTYWZ 07-02-2003 01:37 PM

noticed another problem, found another suggestions:

the width/height for the award banners is hardcoded into functions.php - probably shouldn't do that..

how about an option to completely disable award images? I tried setting the display to 0 days but that didn't work.

Cloudrunner 07-03-2003 03:27 PM

The awards display is disabled by the individual users....for now

I can fix the hardcode before Final release.....

As far as the database error, I'm not sure, it seems to be correct for the query, but will have to play with it some more....Gimme abit this weekend...

)O( Cloudrunner )O(

Shepski 07-04-2003 09:39 PM

right, may have found the problem with the mysql error.

if I try and add the query i posted before into the blank paypal_funds table it goes in fine. But, if I change the id to something else but it still starts with a 0 then I get the following error:
Code:

Error

SQL-query : 

INSERT INTO paypal_funds( id, date, donated )
VALUES (

'0E567297NG154303X', NOW( ) , '4.63'
)

MySQL said:

Duplicate entry '0' for key 1

Now when i go back and look at the data in the table I see:

id date donated
0 2003-07-04 4.63

id is only a single figure, not that long one its trying to put in. Does this give you any pointers as to where the problem may lie?

Cloudrunner 07-09-2003 10:56 PM

Sorry about being gone for abit there guys!

Been busy with the new kid and all.

Anyways, I've an idea of where to go with the DB problem, but am gonna have to test the theory this weekend (12 July) I'll get ya'll an ans2wer by Sunday evening.

Cloudrunner 07-09-2003 11:00 PM

Nevermind. Shepski, Thank you for the info. Found the problem right off!

Bug Fixed!

Run the following query in your DB manager:

Code:

ALTER TABLE `paypal_funds` CHANGE `id` `id` VARCHAR(255) DEFAULT '0' NOT NULL;

bouncer18 07-10-2003 02:07 AM

stoopid question

obviously i donate to my website (i own it)
how can i trick the Db into thinking i am a donating member so i can get my image to show next to my avatar?

i hope this post makes sense

Heffe2000 07-10-2003 03:56 AM

I currently use my ebay paypal account (since you can only have one), and whenever I get payment for an auction, it shows up in my totals for donations to my forum. While this to some might not be a bad thing, I don't want it to see that I have loads of cash available to the forum that I really don't.

I had many people ask where they could donate money to the forums over the past year, but now that I have the donation buttons on the forum, they all seem to not be able to find it ;).

99SIVTEC 07-10-2003 03:51 PM

I have a couple quick questions.

First Awesome hack, i've been looking for somehting like this for ages. Thank you for the aparent hard work.

I have several vbulletin sites all on the same server. They form a lose network as they all cover niches of the same industry. Problem being how can I use this hack on more than one site since paypal only allows you to point to one paypal.php file? Can I use this one file for all of my sites somehow? Would this make the totals and such global? If so cool, if not no big deal. I'm just wondering if it would work if I installed it on several sites, but paypal only pointed to the one paypal.php file.

Thank you in advance

bouncer18 07-11-2003 12:20 AM

bug i found

i had a user donate a penny

where it says in the postbit user has donated
it shows up as

Has donated $ to date.

notice no value....

sHORTYWZ 07-11-2003 12:59 AM

This is because paypal deducts a one cent fee for a one cent donation hence, zero donation.

Cloudrunner 07-11-2003 03:35 AM

Bouncer --

Simply manually insert your information into the tables:

paypal_funds
paypal_contributors

and then change the donate field in your user table under your username to read '1'.

Heffe --

Currently, due to the way paypal has IPN setup with only one IPN per paypal account, there is no way to avoid this circumstance. I have asked paypal if they are planning on implementing a multiple site IPN, but thus far I have not received an answer.

99SIVTEC --

Yes, you can use this script globally across your sites, but it will require some slight modifications to the system, and requires that they all be on the same server. I don't think I'll be implementing this however due to time constraints on my part, but it would simply require that the other sites use the main site's paypal.php, ppfunc.php, and ppverify.php files, and also to read off the main site's database. It wouldn't be too hard to do I don't think, but I just don't have the time at the moment.

Shorty --

thank you for answering that one. You are correct. Paypal has a minimum fee of $0.01, so if you donate 0.01, and paypal deducts 0.01, and the mathematical law of 1-1=0 remains in effect, then it stands to reason that the total amount of the donation will be $0.00.

I am debating removing the fee paypal deducts from the user's donation to show what they intended to donate instead of the total minus the fee....still weighing the pros and cons of this scenario.

As for the rest of you ;)

I'll be gone this entire weekend, so further updates will not be occurring probably until next weekend. I have a highland games to go to. So while I'm out there drumming with the pipes in me kilt, I'll be thinking about...well...the competition ;)

Enjoy!

)O( Cloudrunner )O(

kaotic 07-12-2003 06:14 PM

First of all, thanks for the great hack. But I'm curious, do you still plan to integrate this with Lesane's Store Hack?

Cloudrunner 07-13-2003 08:08 AM

It is planned yes, but I've not had time to even sleep properly with the new baby....He's starting to sleep longer during the night, so hopefully I'll be able to sleep better myself shortly, when that happens, production will again be in ernest ;). Until then I'm working on it as I get the chance and can think straight...who'da thought that sleep was something you need to actually function properly...

sHORTYWZ 07-13-2003 10:39 AM

Alright, I have a strange problem

INSERT INTO paypal_contributors( userid, username, avatarurl, datelast, amount, guest_ip )
VALUES (

'166', 'Jaago', 'images/avatars/0/160.gif', NOW( ) , '23.97', NULL
)

MySQL said:

Duplicate entry '127' for key 1

Why would key 1 be entering 127, when the query says 166.

Here is what has happened recently :

I received an echeck payment, which went into the DB as "pending" - ever since then, no donations have been able to enter the db because of strange problems like this.. i have more info cloud, if you can send me an AIM msg when you get around.

Cloudrunner 07-13-2003 05:04 PM

Another update....Thanks for finding the prob Shorty.

run the following in your DB manager:

Code:

ALTER TABLE `paypal_contributors` CHANGE `userid` `userid` INT( 255 ) DEFAULT '0' NOT NULL;
Enjoy!

)O( Cloudrunner )O(

sHORTYWZ 07-13-2003 07:53 PM

Alright, just thought of something.. do funds/goals ever expire?

I don't know how to go about it.. but otherwise in about six months I'm going to have 2 pages of goals and my frontpage is going to say that we need to raise $1000 worth of donations..

bouncer18 07-13-2003 08:08 PM

yea i manually entered it into my DB

but what i was saying was maybe add an IF THEN statement to it so it atleast shows up as $0.00 rather then just $

Heffe2000 07-13-2003 10:28 PM

What would be the chance of this running on 2 seperate VB setups, on 2 different domains, via one paypal account? (I'm guessing that it won't, or would be too difficult...).

Could you use the donation name to route to a different paypal.php or something?

I'm setting up a new domain with a seperate VB running on it, and would like donations to show up on there & the older forums.

If paypal would allow you to have multiple accounts, this would be irrelevent, but since they restrict you to one (even if you have 2 people living in the same house with seperate accounts, you can have them blocked...).

0zone 07-14-2003 05:27 AM

great hack, thanks a lot!

0zone 07-14-2003 06:20 AM

Umm, one problem, the buttons aren't showing up.

http://www.avriltalk.com/forums/paypal.php


All times are GMT. The time now is 12:19 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.10948 seconds
  • Memory Usage 1,934KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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