PPDonate
Contents
Description
Create links to accept donations via PayPal.
The recipe was written for PmWiki.org to make it easy for recipe authors to accept donations via PayPal.
The recipe enables a new page action ?action=ppdonate. The link is redirected to a PayPal page where the Author or Maintainer of the recipe accepts donations.
A person can donate to the maintainer without being member of PayPal.
The recipe is currently enabled on pmwiki.org.
Installation
- Place the file ppdonate.phpΔ into your pmwiki/cookbook directory.
- Add to config.php such a line:
if($action=='ppdonate') include_once('cookbook/ppdonate.php');
Configuration - Internationalization
You can translate the following message in XLPage:
"Thank you for your support!" => "Merci pour votre soutien !",
Usage
On a recipe page, in the "recipe info" block near the top of the page, at the "Maintainer:" line there is a link to the Maintainer's profile page.
On his/her profile page, the Maintainer adds a PageTextVariable with his/her PayPal identifier. The recipe will read it in order to construct a URL address to the donation page on PayPal:
(:PPDonate: business=user@example.org currency_code=EUR:)
The PageTextVariable is "PPDonate".
You need to have one among these parameters (not both):
- "business" parameter: contains the alphanumerical PayPal account ID of the Maintainer like "ABC123XYZ".
- "hosted_button_id" parameter contains an identifier among your saved buttons.
The "currency_code" parameter contains the currency code, eg. EUR or GBP (default currency code: USD).
On the recipe page, the maintainer adds a link to the (same) page with the action "ppdonate" :
You can support the development of this module by [[{$Name}?action=ppdonate|donating]]. |
You can support the development of this module by donating. |
If a visitor follows the link, the browser will be redirected to the PayPal donation page.
- The "description" of the donation will appear as "WikiTitle (Group.Name)", that's how the Maintainer will know which recipe was helpful to the user.
- If the visitor makes a donation, the browser should return to the recipe page and a message "Thank you for your donation" should appear.
- If the visitor doesn't make a donation, the browser should return to the recipe page.
Notes
- The recipe was really written for the current configuration of the PmWiki.org Cookbook, and is enabled here.
- Maintainers may password-protect their profiles from editing to prevent errors (the profile pages should be readable without a password).
Change log / Release notes
- 20221029 update for recent PayPal configurations; allow for hosted buttons.
- 20170811 better i18n integration.
- 20150807 the "ppdonate" action now works also from the Profiles group.
- 20150805 initial release.
See also
- Cookbook /
- PayPalButtons Creating neat markup for otherwise sloppy PayPal button forms (stable)
- PayPalButtons2 A flexible PayPal "Buy Now" button markup (Works for contributor's account)
- PayPalCart Provides markup for PayPal shopping cart buttons. (in active use)
Contributors
- Recipe written and maintained by Petko (5ko@5ko.fr).
- If this recipe helps you or saves you time, you can help support its continued development by ♥ .
Comments
See discussion at PPDonate-Talk?
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.