1. Build Integration
Steps to integrate your Drupal Commerce website with the Razorpay Payment Gateway.
Follow the steps below to integrate Razorpay Payment Gateway with your Drupal Commerce website.
- .
- .
- .
Follow the steps given below to upload the plugin:
- the
drupal_commerce_razorpay.zip
. - Log in to your and navigate to Extend.
- Click + Add new module.
- Add the module from URL or click Choose file and select the .zip file downloaded previously.
- Click Continue.
You have successfully uploaded the plugin.
Handy Tips
Alternatively, you can skip this step and simply run composer require 'drupal/drupal_commerce_razorpay:^1.0'
in your drupal directory to download the plugin. You can view the downloaded file in the contrib
folder.
Follow the steps given below to install the plugin:
- On your Drupal Commerce Dashboard, navigate to Extend.
- Search for Razorpay in the Filter section.
- Select Commerce Razorpay and click Install.
Follow the steps given below to configure the plugin:
-
On your Drupal Commerce Dashboard, navigate to Commerce.
-
Click Configuration.
-
In the Payment section, select Payment gateways.
-
Click + Add payment gateway.
-
In the Name section, enter Razorpay and select Razorpay as the Plugin.
-
Select Test Mode to test the integration and enter the test Key ID and Secret generated from the
.Handy Tips
To go live with the integration and start accepting real payments:
- Select Live Mode.
- Generate and replace the test keys with the live keys in the integration. Click Save.
-
Select the Payment Action based on your requirement. Set the Payment Action to Authorize and Capture to auto-capture payments. If you want to capture payments manually, set the Payment Method to Authorize.
-
Select Enabled in the Status section.
-
Click Save.
Handy Tips
If you want to edit any fields, navigate to Commerce → Configuration. Select Payment Gateway and click Edit.
You have successfully integrated the Razorpay Payment Gateway with your Drupal Commerce website.
Handy Tips
- Webhooks are auto-configured when you enter and submit the API key ID during the installation. You can verify if webhooks are enabled on your .
- The
payment.authorized
,payment.failed
andrefund.created
events are auto-configured. You do not have to configure it on the Razorpay Dashboard.
You can track the payment status from the Dashboard or poll our APIs.
- Log in to the and navigate to Transactions → Payments.
- Check if a
payment_ID
has been generated and note the status. In case of a successful payment, the status is marked ascaptured
.
You can
to check the payment status.Step 2:
Is this integration guide useful?