| Drupal

drupal-paymentsHere at OSTraining we've given significant coverage to Drupal Commerce. You can watch a video class with nearly 30 lessons and download a book, "Building E-commerce Sites with Drupal Commerce".

However, Drupal Commerce is an enterprise-quality solution and a good number of OSTraining members have asked for simpler solutions.

For those members, we often recommend the Payment module, which makes it easy to add e-commerce fields to your content.

Payment supports about half-a-dozen gateways (PayPal, Stripe, iDEAL, Authorize.net, Ogone, Rabo OmniKassa).

In this tutorial, we'll show you how to use the Payment module, together with PayPal.

Installation and Configuration

  • Go to Configuration > Payment.
  • Click "Add payment method"
  • Choose "PayPal Payments Standard".
  • Enter a Title, such as "PayPal".
  • Enter your PayPal email into the "PayPal account email address" field.
  • By default, there are two default payment options, "Collect on delivery" and "No payment required". If you don't want users to be able to choose those options, you can go to Configuration > Payment > Payment methods and you can disable them.

Add a field to the content type

  • Go to Structure > Content types
  • Add a field using the "Payment form" type:
  • On the field settings, choose the currency you want to use:

Create a product

  • Click Add content and choose a content item you want to add a PayPal button to.
  • Under the Body, in the fields area, you'll be able to enter the product details:
  • Save the content.
  • This is how your content will appear on the site:
  • If people click the "Pay" button, they'll be redirected off your site and to Paypal.com:
  • Once the payment is finished, the user will be able see details of the payment:

Seeing the payments

After people have made purchases on your site, you'll be able to see and organize all the payments.

  • Go to Content > Find Content
  • Click the Payments tab in the top-right corner.
  • You'll now be able to see all the payments that have been made, including their status.

Payments does also integrate with Views (the image see above uses Views) so you can create your own layouts to see payments.


The Payment module is a basic, but effective alternative to Drupal Commerce.

Particularly if you don't want to require user registration or do significant configuration of your site, Payment is a good option for collecting money via your Drupal site.

About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.