In this article you will be going to know about:


What is Drupal?


Drupal is content management software. It's used to make many of the websites and applications you use every day. Drupal has great standard features, like easy content authoring, reliable performance, and excellent security.


How to integrate your Drupal platform with your PayTabs account?


By following the below steps, you will integrate your system in no time, without even having a technical background.


This module requires no external dependencies. but you must ensure the 'Telephone' core module is enabled.


Installing the Plugin

  1. Log in to your merchant dashboard. 
  2. Navigate to the Developers menu.
  3. Go to “Drupal” under the “PRE-BUILT INTEGRATIONS” section. 
  4. Click on the link “here” as shown in the picture below.


  5. Then use one of the following methods to install the plugin:

Composer

  1. Open the project folder using the terminal app.
  2. Run the below command.
    composer require paytabscom/paytabs_drupal_commerce


FTP

  1. Upload your downloaded plugin from step 4 to the "/modules/contrib" directory within your Drupal installation directory.
  2. Extract the plugin file. The project's structure should be similar to the below: 

Activating the Plugin

  1. Go to 'Extend' as an administrator in Drupal.
  2. Check the checkbox 'Commerce Paytabs PT2' as in the picture below.


  3. Click on the button "Install" as in the picture below.

Configure the Plugin

  1. From your Drupal admin panel go to Administration > Commerce > Configurations > Payment Gateways
  2. Click on "Add payment gateway".
  3. Enter the Name field as "paytabs_payment".
  4. Then, choose "PayTabs Payment Gateway" from the field Plugin.
  5. Enter the Display name field as "PayTabs Payment Gateway".
  6. After that, choose "Test" or "Live" from the field Mode according to your integration environment (regard used profile in this integration).


  7. Enable the plugin by choosing the "Enabled" option


  8. Then provide the Merchant Profile Id field and Server key field as in your merchant dashboard. For more information about how to get your integration keys from your dashboard, please click here.
  9. Choose your region from the Merchant region field based on your merchant's account.


  10. Click the button Save.

How to upgrade the PayTabs plugin in Drupal to the latest version?


  1. Go to your Drupal admin panel and deactivate the old payment plugin, you already using for now then delete it. (From Administration > Commerce > Configurations > Payment Gateways > Click on Delete for "paytabs_payment" from Operation dropdown list).


  2. Then delete your uploaded files on your Drupal from the "/modules/contrib/" directory.
  3. Repeat the above steps on the "How to integrate your Drupal platform with your PayTabs account?" section.

How to know that you are using an old Drupal plugin (PT1)?


After logging in to your Drupal account, navigate to Administration > Commerce > Configurations > Payment Gateways, click on Edit for "paytabs_payment". Usually, you will see Merchant email and Secret key instead of Merchant Profile id and Server key, which was the old way of authenticating, and it’s deprecated and no longer used anymore.


What are PayTabs plugin configuration options?

Pay Page Mode Option

This option is not supported for all payment methods, it controls whether the transaction type is sale or auth.

Sale: Directly deduct the payment from the customer's bank account, credit to the merchant account. 

Auth: will be Authorized (hold) only on the customer's account to be captured later.




Integration Mode Option

This option enables you to display the PayTabs payment page as apart from (within) the checkout page, without needing to redirect the customer outside your website and redirect him back again.




Hide Shipping Address Option

In case you want to not force the customers to reenter both billing and shipping information, you may like to enable it.




The customer details are still required and must be passed, in case any of the details are missing or passed with invalid values; the hide_shipping option will be ignored and cardholder will be required to enter any of the missing details on the payment page


Order Status Option

This option controls what will be the order status on your system after it has been completed (authenticated/successful payment).




Be very careful when you change the Default option. Once you change it, you change the normal flow of the Order into the Drupal system, you may encounter some consequences based on the new value you set 


Condition Option

This option enables you to add some restrictions to the order. For example, allow orders from customers with specific email only, and so. 



How to find log messages to troubleshoot any issues?

In some cases, when you contact our technical support team for assistance, they require the log messages to assist you accordingly (or even you may want to troubleshoot the plugin behavior yourself), you will be able to find those log messages by navigating to the Administration > Reports > Recent log messages and find the messages with type "paytabs_drupal_commerce" as in the picture below