====== Pay Now Buttons ======
====== Basics ======
===== How do I create a button? =====
- Register and activate your account with PayFast.
- Go to your [[https://www.payfast.co.za/acc/integration|Integration]] page.
- Click on the {{:icons:add.png}} icon next to the Pay Now Buttons heading.
- This will take you to the Create Button page.
- Fill in the details for the button you want to create (name, price etc.).
- Press "Create Button".
- This will generate the button code which you can then copy and paste into your website.
===== Can I accept donations with these buttons? =====
Yes, you can, but only if you are a registered NPO (Non Profit Organisation).
Unfortunately, we are prevented by South African law from accepting "donations" ala PayPal where the receiver is not a registered NPO.
===== Do you have an "add to cart" button? =====
Pay now buttons are intended for single item purchases and are not linked to a hosted shopping cart.
We don't currently have a hosted shopping cart solution and therefore don't have an "Add to cart" button.
====== Frequently Asked Questions (FAQs) ======
===== I get the error message "receiver must be a valid email address" when clicking on my pay now button! =====
==== Joomla ====
Is your website built using Joomla? If so, then this error is caused by the //Content - Email Cloaking// plugin in Joomla.
Turn it off by placing the following text in the "article" where the button is:
{emailcloak=off}
That will disable the cloaking for that specific article which will resolve this error.
==== WordPress ====
Is your website built using WordPress? If so, then this error is most likely caused by the //reCAPTCHA// plugin in WordPress.
Turn it off by changing the value of the receiver field in the Pay Now button code as below:
must be changed to:
That will disable the cloaking for that specific email address which will resolve this error.
===== How do I make the amount user-selectable? =====
To make a user enter-able amount on the pay now button, simply replace the amount field in the generated code with the following line:
Amount
===== How do I change the button to use a different image? =====
To change the image used in the Pay Now button, simply change the value of the //image// field in the generated code.
The Pay Now button will have an //image// field similar to the following (depending on your selection of button):
Simply change the // https://www.payfast.co.za/images/buttons/buynow_basic.gif // to a different URL for your image. Remember to update the //width// and //height// attributes to the correct values for your chosen image.