OpenCart 4.0

Introduction

OpenCart helps merchants set up a new user-friendly store in minutes. With the BillDesk OpenCart plugin, the merchant can start accepting seamless payments on this store.

Merchants can download the plugin with the following link.

Prerequisites

Ensure that the merchant has:

  • OpenCart version 4.0.2.3
  • PHP version 8.1
  • A zip file named oc_payment_billdesk.zip file of BillDesk extension, which they will get from BillDesk.

Dependency:

  • Create Indian currency (INR)
  1. Go to System → Localisation → Currencies.
  2. Click on “+” icon to Add New Currency.
screencapture-apache-wd-wp-admin-edit-php-2022-11-17-16_25_56.png
  1. Enter the details below:
ParameterValue
Currency TitleINR
CodeINR
Symbol Left
Value1.00
StatusEnable
  1. Click on Save Changes.
  • Set Default country as India and Currency as INR.
  1. In System → Settings, select Edit icon.
  2. In "Local" tab, select Country as India and Currency as INR.
ParameterValue
CountryIndia
StateMaharashtra
Time ZoneUTC (+00:00)
CurrencyINR

Integration Steps

Installation and Activation

Follow the steps below to install and activate the BillDesk OpenCart 4.0 plugin.

Installation

  1. In the sidebar, click on Extensions→ Installer.
  2. Click on Upload
  1. Select opencart4x_billdesk_plugin.ocmod.zip file of BillDesk extension and click on “+” icon to install

Extension Configuration

Post installation, merchant can configure the plugin to enable it and accept payments.

Enable BillDesk Extension

To enable BillDesk Extension:

  1. In the sidebar, click on Extensions → Extensions.
  2. Select Payments option from the drop-down box.
  1. Click “+” button of BillDesk.
  1. Go to Edit Extensions.
  1. Enter all merchant configuration details.

Ensure that the merchant has obtained necessary details like Merchant ID, Merchant Key, etc. from BillDesk. The configuration page looks as above.

  • Merchant Id - string - This is the unique ID created by BillDesk to identify the merchant.

  • Client Id - string - A client ID shared by BillDesk for accessing the Payment Gateway APIs.

  • Key ID - string - The unique identifier of the public key shared by BillDesk

  • Encryption Password - string - An encryption key that is used to protect the communication with Payment Gateway APIs.

  • Signing Password - string - A signing key that is used to protect the communication with Payment Gateway APIs.

  • Item Code - string - Item Code as shared by BillDesk team.

  • Merchant Logo - string - A URL or Base64 encoded logo of the merchant that will be visible on the payment dialog.

  • Payment Categories - string - Merchant can configure Allowed Payment categories at the BillDesk backend. This ensures that only the configured payment categories enabled for the merchant will be displayed. However, this option also allows the merchant to override the payment category configuration.
    For example, if a merchant wants to show cards as the only payment option, they can configure it using this setting. Merchant must mention all allowed payment methods as comma-separated values.
    Note: Payment methods can have dynamic names. The valid payment category codes are as follows:
    Allowed values: [card, emi, nb, upi, wallets, qr, gpay]

  • Child Window - number - Enables or disables the child window.

    • True/Enabled - If it is enabled, the modal opens the bank's page for processing in another window.

      • False/Disable - If it set to disabled, the modal redirects the merchant page to bank URLs for processing instead of opening them in another window.
  • Retry Count - number - Controls the number of payment re-attempts that should be allowed to users on failed payment.

  • Environment - string - Enables switching between the UAT or Production environments. Depending on this configuration, the plugin will connect to the UAT or production URLs.

  • Complete Status - Set it as "Processing".

  • Failed Status - Set it as "Failed".

  • Status - Enable status.

  • TEST PG CONNECTIVITY - Confirm the successful configuration by clicking on 'Test PG Connectivity'. If the configuration was not successful, check Troubleshooting for error code analysis.

  1. Click Save Changes.
👍

Success

At this stage, the BillDesk Extension is configured completely. Merchant will be able to pay via the BillDesk Payment Integration.

Features

BillDesk OpenCart extension comes with some exclusive features.

Payment

Placing an Order

  1. Go to the store.
  2. Add a product to the cart and click Checkout.
  3. Login or create an account.
  4. Enter shipping details and select BillDesk as the payment method option.
  1. Confirm the order.
  1. Continue completing the payment by BillDesk. After completing the payment, the user will be redirected to the Success page.

Refund

Product Refund

  1. Go to menu Sales → Orders.
  • Select any order with status “Completed” or “Processing”.
  1. Click on BillDesk tab.
  2. Enter Refund Amount
  • Two types of refunds:
    • Full refund
    • Partial refund
  1. Click on Refund button and the refund will be initiated.
  1. Upon successful refund, a confirmation message will be shown on the page.

Order Listing

View Order Details

  1. Go to menu Sales → Orders.
  1. Click on the view button of respective order will display the details of that order.

Troubleshooting

For OpenCart, the merchant can find the logs present at system/Maintenance/Error Logs, where the merchant can check the reason of failure.

To confirm that PG connection is established, go to the Configuration page and click on TEST PG CONNECTIVITY.

Case 1: PG connectivity is successful.

Case 2: PG connectivity is unsuccessful.

If an error occurs during the connection, please refer to the following table:

Error CodeError TypeError Description
GNAUE0006authentication_errorRequest from unauthorized IP.
ORIRE0001invalid_request_errorRequired parameter Merchant ID is missing.