|
Cookbook /
PayPalButtonsSummary:Creating neat markup for otherwise sloppy PayPal button forms
Version: pmwiki-2.1beta25
Prerequisites: PayPal Merchant Account & admin access
Status: Works for me
Maintainer:XES
Votes:
Questions answered by this recipeHow can I insert encrypted PayPal "Buy Now Buttons" on my PmWiki pages? DescriptionPayPal allows merchants to register for free. If you are a registered PayPal merchant, you can request "Buy Now Buttons" -- a non-dynamic instant-shopping-cart feature. If you sell something for a flat price, this is a reasonable method to encourage online payments. The encrypted button code is ugly and rather PmWiki-markup-unfriendly, so I've come up with a way for a PmWiki admin to allow PayPal buttons on their site. This method requires admin access to the site, by adding button code supplied by PayPal into the local/config.php file.
Example Code:
Markup('myButton', 'inline', '/\\(:myButton:\\)/e', "Keep(\"<form action=
'https://www.paypal.com/cgi-bin/webscr' method='post'>
<input type='hidden' name='cmd' value='_s-xclick'>
<input type='image' src='https://www.paypal.com/en_US/i/btn/x-click-but01.gif'
border='0' name='submit' alt='Make payments with PayPal - it\'s fast, free and secure!'>
<input type='hidden' name='encrypted' value='-----BEGIN PKCS7-----MIIHXwYJKoZ
IhvcNAQcEoIIHUDCCB0wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJ
...
Note: Encrypted text clipped for example. There's a lot of it.
...
QEBBQAEgYAES1LUdkBEDc/aizNGSANHPGJu+XmYmzdBKgooP9PM7bwdhQKa9OyFh//
ua5bfkrSnQ7vh9LQYSIt3pnLyH/bT5lJ0zFn+gFj6DmQeHSAMXtJ0TQblTfl6QBv+jX+G49
vgnyPCTqNPJIFL59f412i+R6URk/Duar5htot8v3qafQ==-----END PKCS7-----
'>
</form>\")");
NotesWith slight modification, this idea could allow users to add the encrypted buttons themselves, but I haven't done that. It would make very very ugly PmWiki markup -- see PayPalButtons2 for user-friendly UNencrypted PayPal button markup. PmWiki access is not needed to edit prices on unencrypted PayPal buttons. Merchant beware. Release Notes
CommentsSee AlsoContributorsUser notes? : 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. |