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
 * and the URL for redirection to the gateway
 * amount
 * currency

With each being passed to that URL so that the gateway extension can process the donation.

How You Can Help
Suggestions for improving security and better wiki-specific integration are welcome and encouraged. 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 will include matching gateways with the currency they accept. There is no data saved locally.

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, gwValue to pass the form's drop down menu values, and gwPage to pass the redirection URL. The form value must match the array key, the donation interface uses this key to decide which gateway the user has requested and send them to the right place.

Note: these hooks do not yet pass the currencies accepted by the gateway. This will be added in the next version.

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

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

PayflowPro 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 account settings should be edited in the included .inc file.

Paypal Gateway Settings
In the paypalGatewayPage function in paypal_gateway.php, replace shout%40fourkitchens%2ecom with your business email address, the one connected to your Paypal account. myname%40mybusinessurl%2ecome

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


 * All gateways need to pass currencies accepted as set by extension user (currently allows all currencies that are accepted by Paypal (and Payflow Pro)


 * Paypal Gateway needs generic URL with generic Paypal username values that can be changed by extension user


 * PayflowPro Gateway needs to handle address verification logic


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