If you’ve not done so already, create your donation button…
The button ID, if present, is the 7 digit numeric value usually at the end of the third line of code (e.g. '2851382'). If this is not present you may have an encryped value instead (this has a value containing a long string of characters, with -BEGIN near the start of the value). Either one of these can be used in this plugin.
The image URL is the "src" usually on the 4th line (e.g. 'https://www.paypal.com/enGB/i/btn/btndonateCC_LG.gif').
To display your PayPal Button on your WordPress site you will need to insert the following code, where appropriate, into your theme…
<?php simple_paypal_donate('2851382','https://www.paypal.com/en_GB/i/btn/btn_donateCC_LG.gif'); ?>
In the above example, I’ve used my credentials, but you will need to use the details that I suggested you note before, as supplied by PayPal.
The first parameter is your button ID or encrypted value (either will work) and the second parameter is the image URL.
If you wish to ensure that your code still works correctly, even if Simple PayPal Donate is switched off, you can use the following format of code…
<?php if (function_exists('simple_paypal_donate')) simple_paypal_donate('2851382','https://www.paypal.com/en_GB/i/btn/btn_donateCC_LG.gif'); ?>
Alternatively, since version 1.2 you can specify the button ID using the parameter id=. When using this method you can use additional sub-parameters. These are...
target= : override the standard link `TARGET` of `_BLANK`.
alt= : change the default image `ALT` text. This can't include an ampersand, otherwise it will be interpreted as an additional sub-parameter.
When using multiple sub-parameters, they must be seperated with an ampersand.
For example...
<?php simple_paypal_donate('id=2851382&target=_self&alt=Donate!','https://www.paypal.com/en_GB/i/btn/btn_donateCC_LG.gif'); ?>
As the first parameter we have specified thre sub-parameters - the button ID, the link TARGET and the ALT text.




