You are here: Home / Documentation / How To's / How to get paid using Plone

How to get paid using Plone

by nguyen — published Aug 07, 2009 03:15 PM, last modified Aug 16, 2016 10:50 AM
What payment methods you could set up on your Plone site

We have been asked a number of times how a Plone site could be made to accept payment, such as credit cards.

What We Cannot Do

IT is not able to store financial records, so we cannot use a method that requires IT servers to save or process credit card numbers, for example.

GetPaid for Plone

There is a GetPaid product for Plone ( or but because it is a very complex, fully-featured product we haven't felt the need to try it ourselves and so we cannot recommend it.  We certainly would not recommend using it if all you want to do is receive payment for one or two things, since GetPaid lets you handle inventory, shipping, and so on.

Use PayPal

You can, however, use PayPal ( to create a "Buy This" type of button that can be displayed on your Plone site.

Display a PayPal Button in a Portlet

The easiest place to locate the button is in a portlet.  Here are the steps to follow:

  • create an account with PayPal if you don't already have one
  • create a PayPal payment button 
  • copy to the clipboard the HTML code for your new PayPal button
  • on your Plone site, create a Static Text portlet, in the editor switch to HTML view, paste the HTML code, press Save

Displaying a PayPal Button in the Body of a Page

It's much harder to display a PayPal button in the body of a page, because by default Plone strips out what it considers to be "unsafe" HTML, JavaScript, and CSS from the body of pages.  PayPal buttons in the body of pages will get stripped out so that even though they still look like they're there, clicking on them will have no effect.

There are two ways of getting Plone to display PayPal buttons in the body of a page:

  1. Customize your Plone site's settings so that it relaxes its rules about what HTML, JavaScript, and CSS to strip out. This is a really really bad idea! That's why I'm not going to say more about it.
  2. Create a custom view for the Document content type (this is what a Page is) containing the PayPal button, then use the Page's "display" menu to select the new custom view. This is a much better method, so read on.
    1. In the ZMI, go to portal_skins. 
    2. With the Find tab, search for "document_view".
    3. Clone document_view.  You will be looking at the portal_skins/custom/document_view object now.
    4. Go up one level so that you are in the portal_skins/custom folder.
    5. Check the box next to document_view and press the Rename button. Rename it to paypal_button_view.
    6. Click on paypal_button_view to edit it.
    7. Either above or below the following:
              <p tal:condition="python: not text and is_editable"
                  This item does not have any body text, click the edit tab to change it.
              <metal:field use-macro="python:here.widget('text', mode='view')">
              Body text

      insert your PayPal button HTML code.
    8. Press Save.
    9. Back in the normal (non-ZMI) view of your site, navigate to the folder where you will want to create the page that is to show the PayPal button.  In the usual way, add a new Page, set the title, description and body of the page, press Save. Then in the Display menu, select your new paypal_button_view.  The page will now show your PayPal button, either above or below the body of the page (as you'd chosen to locate it).