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.
In this tutorial, I’ll be using the Payment Module that makes it easy to set up payment methods on your site.
- Install and enable Required Modules
- Add Payment method
- Add a Field
- Create a Product
- 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.
Now select PayPal Payments Standard.
Enter the title (you can name it anything) and enter your PayPal email address in the ‘PayPal account email address 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.
In the field settings, select your desired currency.
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.
This is how your content type will look like.
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.
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.
Create interactive Drupal websites easily on the Cloud.
Host your website on optimized Drupal hosting servers.