PaypalDonationExtension
From PeacockWiki
(Difference between revisions)
Revision as of 10:36, 5 April 2007 (edit) Trevorp (Talk | contribs) (→Design) ← Previous diff |
Revision as of 13:31, 6 April 2007 (edit) Trevorp (Talk | contribs) Next diff → |
||
Line 8: | Line 8: | ||
===Features=== | ===Features=== | ||
*Allows users to complete a form allowing them to make a payment via PayPal. | *Allows users to complete a form allowing them to make a payment via PayPal. | ||
+ | *Allows visitors to view a list of donors. | ||
===Design=== | ===Design=== | ||
- | +--------+ | + | +--------+ +------+ |
- | | PayPal | | + | | PayPal | | List | |
- | +--------+ | + | +--------+ +------+ |
- | | | + | | / |
+------+ +-----+ +=====+ +-----+ +=====+ +-----+ | +------+ +-----+ +=====+ +-----+ +=====+ +-----+ | ||
| Wiki |---| PPE |----= API =---| FRE |---= API =---| Ind | | | Wiki |---| PPE |----= API =---| FRE |---= API =---| Ind | | ||
Line 33: | Line 34: | ||
====Database==== | ====Database==== | ||
- | New table: Donations | + | <pre>CREATE TABLE `wiki`.`donations` ( |
- | *item_number - Autonumber, used for item number for paypal | + | `item_number` int(11) NOT NULL auto_increment, |
- | *UserID - lyricwiki user id | + | `user_id` text NOT NULL, |
- | *RequestTime - time donation form submitted | + | `request_time` datetime NOT NULL default '0000-00-00 00:00:00', |
- | *firstname | + | `firstname` text NOT NULL, |
- | *lastname | + | `lastname` text NOT NULL, |
- | *address1 | + | `address1` text NOT NULL, |
- | *address2 | + | `address2` text NOT NULL, |
- | *city | + | `city` text NOT NULL, |
- | *state | + | `state` text NOT NULL, |
- | *zip | + | `zip` text NOT NULL, |
- | + | `email` text NOT NULL, | |
- | *amount - amount to donate | + | `amount` double NOT NULL default '0', |
- | *comment - donor comment | + | `comment` text NOT NULL, |
- | *anonymous - anonymous donation? | + | `anonymous` tinyint(1) NOT NULL default '0', |
- | *Validated - true after sucessfull ipn from paypal | + | `validated` tinyint(1) NOT NULL default '0', |
- | *IPNResults - All data from paypal - Filled in after transaction | + | `ipn_results` longtext NOT NULL, |
- | *payment_date - Date of transaction - Filled in after transaction | + | `payment_date` datetime NOT NULL default '0000-00-00 00:00:00', |
- | *payment_gross - Total money sent - Filled in after transaction | + | `payment_gross` double NOT NULL default '0', |
- | *payer_email - email of paypal user - Filled in after transaction | + | `payer_email` double NOT NULL default '0', |
- | *mc_fee - transfer fee - Filled in after transaction | + | `mc_fee` double NOT NULL default '0', |
- | *mc_gross - total recieved - Filled in after transaction | + | `mc_gross` double NOT NULL default '0', |
+ | `country` text NOT NULL, | ||
+ | PRIMARY KEY (`item_number`) | ||
+ | ) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;</pre> | ||
==Usage== | ==Usage== | ||
Line 60: | Line 64: | ||
===Example=== | ===Example=== | ||
see [[Special:Donate]] | see [[Special:Donate]] | ||
+ | |||
+ | see [[Special:Donors]] | ||
This demo uses the [http://www.sandbox.paypal.com/ PayPal sandbox]. To sucessfully test the product you must register with a paypal [http://developer.paypal.com/ developer account], and create a sandbox Business account with the email address tp@pt.com, as well as a personal account for testing. | This demo uses the [http://www.sandbox.paypal.com/ PayPal sandbox]. To sucessfully test the product you must register with a paypal [http://developer.paypal.com/ developer account], and create a sandbox Business account with the email address tp@pt.com, as well as a personal account for testing. |
Revision as of 13:31, 6 April 2007
LyricExtension is an extension for Mediawiki that provides features facilitating the notation of song lyrics in the wiki.
Contents |
Details
- Version 0.0
- Date 5 Apr 2007
- Tested on MediaWiki 1.7.1, PHP 5.1.6 (apache2handler), MySQL 5.0.24a-Debian_9ubuntu0.1-log
Features
- Allows users to complete a form allowing them to make a payment via PayPal.
- Allows visitors to view a list of donors.
Design
+--------+ +------+ | PayPal | | List | +--------+ +------+ | / +------+ +-----+ +=====+ +-----+ +=====+ +-----+ | Wiki |---| PPE |----= API =---| FRE |---= API =---| Ind | +------+ +-----+ +=====+ +-----+ +=====+ +-----+ | | +----------+ +----------+ | Database | | Database | +----------+ +----------+
- PPE Paypal Donation Extension
- Facilitates paypal donations, and recording of transactions
- Provides an API to allow access to donation info
- FRE Financial Reports Extension
- Allows treasurer to enter financial details
- Retrieves data from donations and provides (monthly) reports on financial status
- Provides an API to allow information to be used for status indicators, other reporting engnes etc.
- Ind Indicators/progress bars etc.
Database
CREATE TABLE `wiki`.`donations` ( `item_number` int(11) NOT NULL auto_increment, `user_id` text NOT NULL, `request_time` datetime NOT NULL default '0000-00-00 00:00:00', `firstname` text NOT NULL, `lastname` text NOT NULL, `address1` text NOT NULL, `address2` text NOT NULL, `city` text NOT NULL, `state` text NOT NULL, `zip` text NOT NULL, `email` text NOT NULL, `amount` double NOT NULL default '0', `comment` text NOT NULL, `anonymous` tinyint(1) NOT NULL default '0', `validated` tinyint(1) NOT NULL default '0', `ipn_results` longtext NOT NULL, `payment_date` datetime NOT NULL default '0000-00-00 00:00:00', `payment_gross` double NOT NULL default '0', `payer_email` double NOT NULL default '0', `mc_fee` double NOT NULL default '0', `mc_gross` double NOT NULL default '0', `country` text NOT NULL, PRIMARY KEY (`item_number`) ) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
Usage
Example
see Special:Donate
see Special:Donors
This demo uses the PayPal sandbox. To sucessfully test the product you must register with a paypal developer account, and create a sandbox Business account with the email address tp@pt.com, as well as a personal account for testing.
Installation
copy files into place
Insert the following line into the end of 'LocalSettings.php' (before the '?>')
require("extensions/???.php");
To check to see if it is installed properly, visit your Version page, eg Special:Version.
You should see the following items:
- Extensions:
- Other:
- Paypal Donation Extension (version 0.0.1), Adds a special page allowing users to donate money to the wiki., by Trevor Ian Peacock
- Extension functions:
- LyricExtension and paypalSetup
- Other:
Releases
Todo
- Interface to allow hiding of ads
- Donations in other currencies
RoadMap
0.2 No Date
- Interface to allow hiding of ads
- Donations in other currencies
History
0.1 9 April 2007
- Ability to make donations
- Recording of donors details, and receipt
- API to allow other extensions