RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0] Fully Automated Donation Store System

Feid

Sorceror
Hmmmm

Well now I am getting

Code:
Fatal error: Call to undefined function apache_request_headers() in /public_html/paypal/donation_paypal_ipn_handler.php on line 250


And yes, tried to use the real paypal with a $1 credit card transaction.
 

ntony

Sorceror
Feid;819574 said:
Well now I am getting

Code:
Fatal error: Call to undefined function apache_request_headers() in /public_html/paypal/donation_paypal_ipn_handler.php on line 250


And yes, tried to use the real paypal with a $1 credit card transaction.

What is your PHP version? Is it older than PHP4.3.0 ? If so, please change apache_request_headers() as getallheaders(). But if you are not running it on Apache(i.e., IIS), you are unable to execute this function. I need to use a stream to read the headers for you.
 

ntony

Sorceror
For compatibility, I have made a patch to my IPN handler script. Web servers which are not running under Apache or not enabling apache_request_headers () function with get my script work.

Please download the new source from the attachment or from SVN. Thank you for report the problems!:D
 

LFFPicard

Sorceror
A couple of quick questions.

Will this script intergrate with a shopping cart system like zend cart or cube cart?
How much is this system liek the one running Demise (if you know)

IE, how exacly do you claim your donation? and how does the script tell the difference between them.

Ont he system i know you use the command [claimitem and a gump appears asking for your order number, postcode and amount you donated and then your donation is generated, is this system similier?

Thanks for your time.
 

ntony

Sorceror
LFFPicard;820670 said:
A couple of quick questions.

Will this script intergrate with a shopping cart system like zend cart or cube cart?
How much is this system liek the one running Demise (if you know)

IE, how exacly do you claim your donation? and how does the script tell the difference between them.

Ont he system i know you use the command [claimitem and a gump appears asking for your order number, postcode and amount you donated and then your donation is generated, is this system similier?

Thanks for your time.

Hi! Thanks for the questions!

I have no knowledge on the Zend cart and Cube cart. But I'm quite sure that you can integrate it with shopping cart system but you have to make the shopping cart is PayPal ready, and have "notify-url" value passed to PayPal when people checkout. I might work an Zend cart version if I have spare time.

I don't exactly know how does Demise's cart system work. But I think mine is different. Let me illustrate the workflow of my system.


- people visit your donation webpage
- they find their favourite item
- they input their account name on input field and click on the "Donate" button (single item only)
- donors are passed to PayPal's secure page to input their credit/debit card info or log into their PayPal account
- donors finish filling in the info and click pay on PayPal secure page
- PayPal processes the money thing for you and your donors
- PayPal sends an response to your listener, which is provided in my system, and listener checks everything for you including the money amount, item name and quantity (mostly within a minute)
- if everything is valid, the listener will store the information into MySQL database and log file.
- the listener also stores a record to the database about which items will your donors going to have bounding with the account name, which was inputted by donor before.
- your donors will then able to get their gifts by double clicking the "dontaion store stone" and claim the item in the gump
- after your donors have claimed the gift item, the record will be appeared as redeemed gift in webpage admin panel which you can always check without logging into the game



*the donation store stone and gump is in my scripts, you use command [add donationstorestone to place the stone anywhere in your shard



look at my shard's donation store page:
http://eng.hkuoshard.com/donation_store

a screenshot of the plain dull boring web admin page (which is good for mobile phone though)




I'm quite sure my system can be integrated with shopping cart and let people to donate for multiple gift items per transaction.
 

Attachments

  • ds.GIF
    ds.GIF
    44.5 KB · Views: 1,252

Vorspire

Knight
This system is coming along very nicely indeed :D
Impressive, even!

Keep up the good work.

One sugestion I have though, is that you should integrate the donation system with your WebSite CMS, if it has a Login Feature, so that donators don't have to constantly type in their account name, it would just link to their currently logged in account.
Although that raises the question "what if I want to donate for someone else?" - Simple, supply an option for that :D
 

LFFPicard

Sorceror
Thanks for the reply.

Looks nice,
I may give this a try when i get my website upa nd running and work ont eh shard.
My only thumbs down is the backend, but as it is all in php it should not bee too hard to brighten up :)

Thanks!
 

ntony

Sorceror
LFFPicard;820993 said:
Thanks for the reply.

Looks nice,
I may give this a try when i get my website upa nd running and work ont eh shard.
My only thumbs down is the backend, but as it is all in php it should not bee too hard to brighten up :)

Thanks!

Yeah! Hope it helps all very nice freeshards. These scripts are released under GPL 3.0. So, I'll be happy if you would submit a handy and fancy back-office for it.
 

Giraffe

Wanderer
Troubles With Subdomain

I am having troubles with it loading correctly on my website ... i did exactly as the readme says i loaded the SQL to the database ... Im just having issues with it going to the right spot. Its going to

www.Mywebsite.com/donate

It needs to go to Donate.Myebsite.com

Any idea on what i need to do?

Ive got it working it was a typo in my config but getting a couple smaller errors let me see what comes up
 

Giraffe

Wanderer
Itds giving me the following errors in adminpage.php when trying to add donation items

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/uomescom/public_html/Donate/admin_util.php on line 14

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/uomescom/public_html/Donate/admin_util.php on line 22

Fixed the problem it was in my mysqllib.php file thanks for the script !
 

mortenbub

Wanderer
does anyone have a easier one to set up than this? or can someone help me with the sql part, i am familiar, just kind of the basics of where to put some of these files
 

ashftw

Sorceror
Hello ntony - first of all let me just thank you for these great scripts.
However I am facing some problems in the admin panel with connecting to the sql db.

Trying to check this out but getting the following error

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'myuser'@'myserver.com' (using password: YES) in /home/myfolder/public_html/throwback/donate/mysqldb_lib.php on line 10

Line 10 of mysqldb_lib.php is:

$database = mysql_connect(DB_HOST,DB_USER,DB_PASS) or die();

Any help with it would be much appreciated.

Thanks again,

Ash


EDIT: Sorry, Im tired used the wrong DB User. MY POST IS SOLVED, Thankyou.
 

ashftw

Sorceror
Im getting this lovely set of errors instead now - to do with the MySQL driver in DonationStore.cs

Anybody know why this is being caused?

Code:
[Retrieve Donation Gift List] Error...
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] D
ata source name not found and no default driver specified
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode r
etcode)
   at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, Odb
cConnectionString constr, OdbcEnvironmentHandle environmentHandle)
   at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOption
s options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection own
ingObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
onnection owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow
ningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou
terConnection, DbConnectionFactory connectionFactory)
   at System.Data.Odbc.OdbcConnection.Open()
   at Server.Engines.PlayerDonation.DonationStore.GetDonationGiftList(String use
rname)

Thanks in advance
 

Giraffe

Wanderer
ashftw;824947 said:
Im getting this lovely set of errors instead now - to do with the MySQL driver in DonationStore.cs

Anybody know why this is being caused?

Code:
[Retrieve Donation Gift List] Error...
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] D
ata source name not found and no default driver specified
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode r
etcode)
   at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, Odb
cConnectionString constr, OdbcEnvironmentHandle environmentHandle)
   at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOption
s options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection own
ingObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
onnection owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow
ningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou
terConnection, DbConnectionFactory connectionFactory)
   at System.Data.Odbc.OdbcConnection.Open()
   at Server.Engines.PlayerDonation.DonationStore.GetDonationGiftList(String use
rname)

Thanks in advance

I am having the same set of errors i tried removing the SQL Driver requirement and i still got the same errors no changes at all
Ive checked and double checked my server address also tried it as a domain and as an IP
 

chrismed0

Wanderer
Fully Automated Donation System

A Problem with the script....

I have a few quetions about setting up the "Fully Automted Donation System". I don't script but I can follow instruction and edit what I need to. I also recognize some elements of a script for editing and know what I'm looking for most of the time. I have been working on a shard more as a project for the last couple of weeks and my kids and I and a couple of friends are playing on it ATM. With the posibility of growing to something much more. to help with this growth I thought the donation system would be interesting to play with and try to set up.



Before I get started I will let you know what I have set up:

~ System: Windows XP Pro SP3 (1 TB HD, 9800 GTOC Nvida PCIe, 4gb DDR2, AMD Athlon Dual Core)

~Internet Connection: DSL 10mg DL, 1MG UpLoad

~ALL my server stuff is running on Virtual PC w/addons (OS: Windows XP Pro gace 1gig mem and 20gig HD), (Router is set up w/port forwarding for web,MySQL,Apache,RunUO)

~RunUO Emulator: Running RunUO 2.0 Final, UO Client 7.0.4.4, shard login: thedaneuo.us Port:5000(everything working great)

~Custom Scripts so Far that are working:Custom Regions in a Box V4.0 Runuo 2.0 RC2, UOArchitect, Nerun's Distro, Jail System 2.0 by Xanthos, Knives Chat 3.0

~ Domain Name from GoDaddy: binded to my Static IP Address

~Servers: Running Apache 2.2.14, PHP 5.3.1 (Also installed phpmyadmin), MySQL Server 5.1


That is pritty much the run down of everything. I have never worked with any of this on a professional level, only at home and am more familar with Apache and php but have never set up a MySQL database. Again, I can't write php script either. I usualy use an editor to make my php pages if I don't just html.


File Structure:
To make it easier my website root directory is located in:

"c:\myuo\scripts\custom\mywebsite"

The actual web server itself is "C:\mysite"

My php is: "C:\php"

The MySQL is: "C:\Program Files\MySQL"



How I installed everything

Fist, I installed Apache (no problems have done before and tested)

Then, I installed PHP (again, test with the phpinfo page and displayed fine)

Ran RunUO to make sure no problems with server with where my web root dir was.

Googled how to install MySQL and followed instructions. With the MySQL promt I created a test data base with one entry and then had it display the entry. No problems or errors.

Then I installed phpmyadmin(again googled how to install because I have never used phpmyadmin). I could do "http://localhost/phpadmin" and it would pull up the phpmyadmin control panel. So from here I thought I had everything installed corectly.

This is were I start having problems

I made a test.php page for the "test" database I had created and then typed into my browser.

No errors like"404" or "500", staus bar showed done, but nothing. Blank page.

I checked the MySQL promt again andhad it display the database. Ok no errors. I looked over the php.ini ... looks fine. Checked the httpd.conf file...loks fine also. Still no display.

Thought maybe it was the php script I used so moved on to your script for donations.

Put the 2 folders into my root directory. ( the "cs" and "web")

Used the phpmyadmin page this time to create the database "thedanedatabase".

Created a new user with the right privlages for the database.

Exicuted the schema.sql file in the phpmyadmin with no errors (said it was succesful) and everything showed up ok as far as I can tell.

Edited the files described in your instructions.

Restarted my RunUO server so scripts would pick up and make sure there were no problems (no errors starting up server)

Try to access the adminpage.php and all I see are 2 blank fields ... no errors reported or anyting.

This is the symtoms or a problem I'm having.

I will include the code to the files that have been edited, minuse any sensitive information, if needed if no one has an idea of what mite be wrong for further review on a replay to this post.

If anyone can assist, Thank you VERY much.....
 

ntony

Sorceror
Giraffe;824999 said:
I am having the same set of errors i tried removing the SQL Driver requirement and i still got the same errors no changes at all
Ive checked and double checked my server address also tried it as a domain and as an IP

Hi Giraffe and ashftw,

Have you granted the MySQL database access right and privileges to the database user used by RunUO script?

Supposed you haven't done it yet, and you don't have PhpMyAdmin installed on your server. Login to MySQL server in console mode:

You should have provided database owner name and password to MySQL server during installation
Code:
mysqladmin -u [COLOR="Red"]db_user[/COLOR] password  [COLOR="Red"]db_passwd[/COLOR]

After you have logged into MySQL server, run this command. (modify the coloured text before you execute it.)
Code:
GRANT SELECT, INSERT, DELETE, UPDATE ON [COLOR="Blue"]hkuoshard_example_db[/COLOR].* TO [COLOR="Blue"]example_username[/COLOR]@'[COLOR="Blue"]localhost[/COLOR]' IDENTIFIED BY '[COLOR="Blue"]example_password[/COLOR]';

If your MySQL database is not located on the same machine as your RunUO, you should chance the 'localhost' to your RunUO server's IP.
 

ntony

Sorceror
chrismed0;825083 said:
A Problem with the script....

I have a few quetions about setting up the "Fully Automted Donation System". I don't script but I can follow instruction and edit what I need to. I also recognize some elements of a script for editing and know what I'm looking for most of the time. I have been working on a shard more as a project for the last couple of weeks and my kids and I and a couple of friends are playing on it ATM. With the posibility of growing to something much more. to help with this growth I thought the donation system would be interesting to play with and try to set up.



Before I get started I will let you know what I have set up:

~ System: Windows XP Pro SP3 (1 TB HD, 9800 GTOC Nvida PCIe, 4gb DDR2, AMD Athlon Dual Core)

~Internet Connection: DSL 10mg DL, 1MG UpLoad

~ALL my server stuff is running on Virtual PC w/addons (OS: Windows XP Pro gace 1gig mem and 20gig HD), (Router is set up w/port forwarding for web,MySQL,Apache,RunUO)

~RunUO Emulator: Running RunUO 2.0 Final, UO Client 7.0.4.4, shard login: thedaneuo.us Port:5000(everything working great)

~Custom Scripts so Far that are working:Custom Regions in a Box V4.0 Runuo 2.0 RC2, UOArchitect, Nerun's Distro, Jail System 2.0 by Xanthos, Knives Chat 3.0

~ Domain Name from GoDaddy: binded to my Static IP Address

~Servers: Running Apache 2.2.14, PHP 5.3.1 (Also installed phpmyadmin), MySQL Server 5.1


That is pritty much the run down of everything. I have never worked with any of this on a professional level, only at home and am more familar with Apache and php but have never set up a MySQL database. Again, I can't write php script either. I usualy use an editor to make my php pages if I don't just html.


File Structure:
To make it easier my website root directory is located in:

"c:\myuo\scripts\custom\mywebsite"

The actual web server itself is "C:\mysite"

My php is: "C:\php"

The MySQL is: "C:\Program Files\MySQL"



How I installed everything

Fist, I installed Apache (no problems have done before and tested)

Then, I installed PHP (again, test with the phpinfo page and displayed fine)

Ran RunUO to make sure no problems with server with where my web root dir was.

Googled how to install MySQL and followed instructions. With the MySQL promt I created a test data base with one entry and then had it display the entry. No problems or errors.

Then I installed phpmyadmin(again googled how to install because I have never used phpmyadmin). I could do "http://localhost/phpadmin" and it would pull up the phpmyadmin control panel. So from here I thought I had everything installed corectly.

This is were I start having problems

I made a test.php page for the "test" database I had created and then typed into my browser.

No errors like"404" or "500", staus bar showed done, but nothing. Blank page.

I checked the MySQL promt again andhad it display the database. Ok no errors. I looked over the php.ini ... looks fine. Checked the httpd.conf file...loks fine also. Still no display.

Thought maybe it was the php script I used so moved on to your script for donations.

Put the 2 folders into my root directory. ( the "cs" and "web")

Used the phpmyadmin page this time to create the database "thedanedatabase".

Created a new user with the right privlages for the database.

Exicuted the schema.sql file in the phpmyadmin with no errors (said it was succesful) and everything showed up ok as far as I can tell.

Edited the files described in your instructions.

Restarted my RunUO server so scripts would pick up and make sure there were no problems (no errors starting up server)

Try to access the adminpage.php and all I see are 2 blank fields ... no errors reported or anyting.

This is the symtoms or a problem I'm having.

I will include the code to the files that have been edited, minuse any sensitive information, if needed if no one has an idea of what mite be wrong for further review on a replay to this post.

If anyone can assist, Thank you VERY much.....

Hi chrismed0,

I have replied to your mail. Please check.
 

Giraffe

Wanderer
ntony;825143 said:
Hi Giraffe and ashftw,

Have you granted the MySQL database access right and privileges to the database user used by RunUO script?

Supposed you haven't done it yet, and you don't have PhpMyAdmin installed on your server. Login to MySQL server in console mode:

You should have provided database owner name and password to MySQL server during installation
Code:
mysqladmin -u [COLOR="Red"]db_user[/COLOR] password  [COLOR="Red"]db_passwd[/COLOR]

After you have logged into MySQL server, run this command. (modify the coloured text before you execute it.)
Code:
GRANT SELECT, INSERT, DELETE, UPDATE ON [COLOR="Blue"]hkuoshard_example_db[/COLOR].* TO [COLOR="Blue"]example_username[/COLOR]@'[COLOR="Blue"]localhost[/COLOR]' IDENTIFIED BY '[COLOR="Blue"]example_password[/COLOR]';

If your MySQL database is not located on the same machine as your RunUO, you should chance the 'localhost' to your RunUO server's IP.

I am using the Webhost Host Gator They run on a linux server and do not require a driver i removed the driver lines in Donationstore.cs ... I have granted access to my server's IP and have the SQL servers IP address as the location in my store script. but no matter what i try i get the same lines as listed before anything else we can think of? ... I'm thinking im probably just going to have to do the manual thing ... unfortunately
 

ntony

Sorceror
Giraffe;828933 said:
I am using the Webhost Host Gator They run on a linux server and do not require a driver i removed the driver lines in Donationstore.cs ... I have granted access to my server's IP and have the SQL servers IP address as the location in my store script. but no matter what i try i get the same lines as listed before anything else we can think of? ... I'm thinking im probably just going to have to do the manual thing ... unfortunately

The driver is for .NET Framework. I suppose you need the driver line. Maybe your case is exceptional.
 
Top