Adding a PayPal Button for deposits and Fees to your web site
In this help article we will be adding a PayPal button to a web page for the acceptance of a variable amount in payment for deposits or fees for your services. In this help article we assume that you already have a PayPal account and have already followed the help articles available on using the Using the Widget Library. You do not need to have PayPal integration set in your Direct Payments to use this type of feature.
The final result
We want to send our customers through to to a page where they can enter the amount for example a deposit, balance or fee (this can be preset by you in your PayPal account while creating the paypal button), so the customer can pay immediately through a page in your web site.
Note that if you create a button for a set amount you will need a different button for each amount you want to offer - for this reason we have selected an open field where the customer can enter the correct agreed amount while in checkout.
As with all financial transactions we advise you to do real-life testing with real money to ensure everything is working as you expect before making it live in your web site.
How to make it
Log into your paypal account and enter "Buy Now Button" (without the quotes) in the search box at the top of the page. Now click on the relevant result to take you through to the button creator page.
As you can see in our example we added text field of "Name" and changed the button text from Buy Now to Pay Now - however you can customise to suit your requirements.
When customised, click the button to create the button. This will show you a code window as seen below:
Select all the code text and copy it to your clipboard (right click and select Copy or Ctrl/Cmd +C). Now log into your account on theimagefile, to create a widget for the PayPal button. Follow Control Panel > My Web Site > Extras > Widget Library.
Paste the Paypal button code into the HTML area of the new widget and give the widget a name. A placeholder for the button will be automatically generated for while viewing within theimagefile domain name however the approximate sizing will be 250 pixels wide by 100 pixels in height. This will vary depending on the number of text fields you have added. Now click to save your widget.
All that is remaining is to add the widget to your chosen page or pages. You should add widgets Using the Rich Text Editor window. Fist add some text, then place the cursor where you want the widget to be displayed. Then click the "image" icon (highlighted in red) in the rich text editor toolbar. Select the widget you want to add and the placeholder image will be shown in the editor. Now Save all to save your changes. Remember your widget will only work if you are viewing the page using a CNAME - it will not show while theimagefile domain name is in the address URL.
Finally, test and test again.