Extension:DonationGateway

What Can This Extension Do?
The donation gateway is composed of a group of extensions that allow users to donate funds through various payment gateways and currency types. The process begins with a donation interface form. The form use the tag extension   which asks for the donation amount, currency and payment method (i.e., Paypal or credit card).

Each of the payment methods is an extension which handles all external communication with the payment service. Each gateway supplies the donation extension with following necessary information (through hooks);
 * form name value
 * form display name
 * currencies accepted
 * and the URL for redirection to the gateway

This user-supplied data is passed to that URL so that the gateway extension can process the donation.
 * amount
 * currency

How You Can Help
Suggestions for improving security and better wiki-specific integration are welcome and encouraged. Specific issues currently being addressed:
 * Caching of the special page. So far, no cache disabling method has ensured that users hitting the "back" button won't see the entered credit card number.
 * More efficient structure of the HTML output so it isn't a big parcel of markup
 * Saving data to the database
 * Check that a currency is offered by a gateway and present the user with only valid options (all gateways currently allow all currencies)

Also, other gateway extensions for other payment options are being developed, the more the merrier.

Current Status
A special page extension gateway for Payflow Pro is being tested and reviewed, as is a simple redirection to Paypal. The next version of the donation interface will include matching gateways with the currency they accept. There is no data saved locally and order numbers are random, this is being developed in the next phase.

Current Extensions:


 * donate_interface: tag extension to display form on Wiki Page
 * payflowpro_gateway: special page extension to accept credit cards through Payflow Pro
 * paypal_gateway: redirects donation to Paypal (in progress)

Usage
Add this tag to your Donate wiki page:

The hooks are set up on the extension_name.php page within the extension's directory. Two hooks are required. The gwValue to pass an (expandable) array of data including the form's drop down menu values and currencies accepted. And the gwPage to pass the redirection URL as an array elements. Both hooks must use the same key.

For example, the PayflowPro gateway is set up like this:

The Paypal gateway (and all subsequent extensions) are set up the same way:

Payflow Pro Gateway Special Page Settings and Options
There are two form markups included in the code for displaying the form - one is a table and one is using fieldsets. Both include classnames for easier CSSing. The fieldsets version is commented out by default but can be switched manually.

The message displayed at the top of the form can be edited in the payflowpro_gateway.i18.php file. It is the from_message option.

Payflow Pro user account settings are defined in the LocalSettings.php file. They are:

Paypal Gateway Settings
In the LocalSettings.php file:

Download instructions
COMING SOON

Installation
To install this extension, add the following to LocalSettings.php:

To Do

 * Donation Interface needs to check for currencies accepted by gateways


 * PayflowPro Gateway needs to handle address verification logic


 * Better methods for securing Payflow Pro gateway are welcome and encouraged.


 * Caching of the special page. So far, no cache disabling method has ensured that users hitting the "back" button won't see the entered credit card number.
 * More efficient structure of the HTML output so it isn't a big parcel of markup
 * Saving data to the database