Submitted by admin on Fri, 09/06/2019 - 12:15

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

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

Installation and Configuration

Image removed.
  • Go to Configuration > Payment.
  • Click "Add payment method"
Image removed.
  • Choose "PayPal Payments Standard".
  • Enter a Title, such as "PayPal".
  • Enter your PayPal email into the "PayPal account email address" field.
Image removed.
  • 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:
Image removed.
  • On the field settings, choose the currency you want to use:
Image removed.

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:
Image removed.
  • Save the content.
  • This is how your content will appear on the site:
Image removed.
  • If people click the "Pay" button, they'll be redirected off your site and to Paypal.com:
Image removed.
  • Once the payment is finished, the user will be able see details of the payment:
Image removed.

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.
Image removed.

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

Summary

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.

Solutions Img