This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join the live AMA session with Adam Silverstein on open source and WordPress core! Register Now →

How to Integrate Payment Gateway in Drupal 7

Updated on March 6, 2018

3 Min Read

Once you have build your ecommerce website with Drupal 7 and done setting up, more often than not you will need to set up a payment method for your customers so that they could finalize transactions on your store. For this, you need to integrate a payment gateway into the store.

integrate payment gateway in Drupal

In this tutorial, I’ll be using the Payment Module that makes it easy to set up payment methods on your site.

  1. Install and enable Required Modules
  2. Add Payment method
  3. Add a Field
  4. Create a Product
  5. Check Payments made

Install and Enable Required Modules

First, download the modules required for this method from the Payment module and PayPal Payment module page. Install them on your Drupal site and enable both of them, making sure all the dependency modules and sub-modules are downloaded and enabled as well.

Add Payment Methods

Once you’ve enabled the payment modules, you will need to add the payment methods. This can be done by going to Configuration > Payment. Here, select the Payment Method, then Add Payment Method.

add payment method

Now select PayPal Payments Standard.

paypal standards

Enter the title (you can name it anything) and enter your PayPal email address in the ‘PayPal account email address field’.

paypal details

Add Field

After you’ve enabled the payment gateway, you will need a field that displays the type of currency. To do this, navigate to Structure > Content types. From here, add a field using “Payment form” type.

payment form

In the field settings, select your desired currency.

select currency

Create Product

To create a product, simply add the content (product description, quantity, amount and tax rate) for the transaction button, and you’ll see the following fields below the body field in that content type.

create productThis is how your content type will look like.

example product

View Payments

You can also check all the payments that have been made on the product by navigating to content->find content and clicking on your product. Here you can view all the payments that have been made by selecting the payments tab on the top-right.

Conclusion

As seen from this tutorial, adding a Payment module makes it incredibly easy to integrate payment gateways. Please note that although I have only used PayPal for this example, the Payment module supports various other payment gateways as well. I hope you found this tutorial useful. If you have any questions, please leave a comment below.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now