1. Build Integration
Follow the step-by-step guide on how to integrate the Curlec Payment Gateway with your Magento 1.x and 2.x (Adobe Commerce) Extensions.
Follow the steps given below to integrate Curlec Payment Gateway with your Magento 1.x and 2.x Extensions.
- .
- .
Follow the steps given below to download and install Magento 1.x Extension.
-
the
Razorpay-1.2.1.tgz
file from the latest release. -
If you have Onepage Checkout (IWD or Fire Checkout),
the Source Code zip from the latest release. With Onepage Checkout you can gather the required information from the shopper and complete the checkout process quickly. When Onepage Checkout is enabled, the entire checkout process takes place on a single page.
You can install the repository in two ways:
- Go to Magento Connect Manager.
- Go to
Direct package file upload
. - Click
Choose File
and select the TGZ file from Step 1. - Click
upload
.
- Unzip and open the downloaded folder.
- Copy the app folder.
- Paste and merge it into the Magento root folder.
- Copy the js folder.
- Paste and merge it into the Magento root folder.
Once installed, navigate to Configuration and then to Payment Gateways and
to suit your needs.To configure your Magento store for Curlec:
-
Log in to your
. -
Click on the System tab and then select Configuration option from the drop-down list.
-
Click Payment Methods in the menu panel.
-
Scroll down. Click Curlec and enter your test mode
[KEY_ID]
and[KEY_SECRET]
. -
Select Yes for the Enabled option.
-
Click Save Config button. This activates your account in the Test Mode. You can use this account to make a few test payments to ensure a successful workflow.
Handy Tips
In test mode, no real money is deducted from your account.
- .
- .
- .
You can install the extension through two ways:
-
Install the extension on your Magento store using the Composer Package Manager. Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries.
-
Go to your installation root directory of Magento and execute the following command:
composer require razorpay/magentobin/magento module:enable Razorpay_Magento -
You can check if the installation was successful by executing the following command in the Magento root directory.
bin/magento module:statusHandy Tips
You should see
Razorpay_Magento
in the status. It might appear on the disabled modules list. -
Enable and deploy the Razorpay module using commands:
bin/magento module:enable Razorpay_Magentobin/magento setup:di:compilebin/magento setup:upgradebin/magento cache:flushbin/magento setup:static-content:deploy
Upgrade Magento Extension
If you are an existing extension user, you can
to the latest version using the composer.-
Download the
. Extract the zip.code.zip
file from the -
Place the
code
folder from Step 1 in yourapp
folder. If you're performing an update, replace/overwrite the existingcode
folder. -
Enable and deploy the Razorpay module using commands:
bin/magento module:enable Razorpay_Magentobin/magento setup:upgrade -
Install Magento cron jobs using the command:
bin/magento cron:install -
Enter the following command to compile the dependency code:
bin/magento setup:di:compile -
Enter the following command to upgrade the Razorpay Magento module from the Magento installation folder:
bin/magento setup:di:upgrade -
On the Magento admin dashboard, open Razorpay payment method settings and click Save Config.
Watch Out!
If you see the message
One or more of the Cache Types are invalidated: Page Cache.
highlighted in yellow on the Admin page, go to Cache Management and refresh cache types. -
Run the following command:
bin/magento cache:flush
To configure your Magento store for Curlec:
-
Log in to your
. -
Choose Stores on the Admin sidebar to the left. Now go to Settings → Configuration.
-
In the Configuration page, click on Sales on the left and choose Payment Methods.
-
In the Payment Methods page, navigate to Razorpay.
-
Enter your test mode [KEY_ID] and [KEY_SECRET]. These can be
. -
Select Yes for the option Enabled.
-
Click Save Config. This activates your account in the test mode. You can use this account to make a few test payments and ensure a successful workflow.
Handy Tips
In test mode, no real money is deducted from your account.
Webhooks are triggered when certain events occur. Subscribe to webhook events to receive notification (in the form of a webhook payload) when these events occur.
Setting up webhooks makes your integration more robust, and guards against issues arising from poor connectivity. The webhook URL is available on the plugin's settings page. You must copy it from there and use it to set up webhook on the
.Handy Tips
- If you are using Magento plugin version 3.4.1, ensure the webhook delay is set to a minimum of 300 seconds.
- Webhook is auto-configured on Magento plugin version 3.8.1-beta and above. For versions lower than 3.8.1-beta, you should .
To set up webhooks in the
:- Log in to the Curlec Dashboard.
- Navigate to Settings → Webhooks.
- Click + Add New Webhook.
- In the Webhook Setup modal:
-
Paste the URL copied from the Magento site.
Handy Tips
Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook set-up, you will notice an error. Please refer to the
section for alternatives to localhost. -
Enter the Secret you had provided on the Magento site. The secret is used to validate that the webhook is from Curlec. Do not expose the secret publicly. Know more about
. -
In the Alert Email field, enter the email address to which notifications must be sent in case of webhook failure.
-
Select only the
order.paid
event from the list of Active Events.
-
- Click Create Webhook.
Know more about
.Handy Tips
If the notification says Razorpay table is not set up correctly, please contact the
.Setup cron with Magento to execute Razorpay cronjobs for the following actions:
It will cancel the order created by Razorpay according to the timeout saved in the configuration if Cancel Pending Order is enabled.
Accepts response from Razorpay Webhook for events payment.authorized
and order.paid
and updates pending order to processing.
Install Magento cron jobs using the command:
bin/magento cron:install
Handy Tips
On the Dashboard, ensure that the payment status is captured
. Refer to the payment capture settings page to know how to
You can track the payment status in three ways:
To verify the payment status from the Dashboard:
- 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 as Captured.
Step 2:
Is this integration guide useful?
ON THIS PAGE