# OpenCart

OpenCart is one of the best eCommerce platform that was built to make online stores. It has had all ever need features and been highly recommended for small and medium size ecommerce businesses.

Integrating your OpenCart site with PayKun allows you to accept payments on your OpenCart site via the PayKun Payment Gateway. Collecting online payments can be very easy with PayKun. You can provide multiple payment options to your customer and a great checkout experience. Also, they will get all sorts of payment option that will make them buy on the spot.

### Prerequisite

Following things will be required before you can begin integration:

* Merchant ID
* Access Token & API Secret ([See how to generate](https://docs.paykun.com/technical-guide/api-encryption-key-guide))

### **Supports**

Opencart Version 2.X , 2.3.x, 3.X, 1.5.x Integration

### Download&#x20;

* For the Opencart version **2.X**, we have the ready Plugin available. Click [here ](https://github.com/paykun-code/Opencart-2.X)to download the ZIP file of the integration Kit.
* For the Plugin to Opencart version **2.3X**, go to GitHub from [here ](https://github.com/paykun-code/Opencart_2.3.x)and download the ZIP File.
* We have readily available easy to integrate plugin for OpenCart Version 3.X. Click [here ](https://github.com/paykun-code/Opencart-V3.X)to download the ZIP file for the **3.X** version and follow the below given easy integration steps.
* If you are using Opencart **1.5.X**, download the ZIP File from [here ](https://github.com/paykun-code/Opencart_1.5.x)and continue with the below-provided easy steps for integration.

### **Installation and Integration steps:**

1. Download the latest Source code zip file of the required version of the plugin from [here](https://github.com/paykun-code) and extract it to some temporary location.
2. Now copy the directory admin, catalog, system folder from the extracted zip.
3. Replace this directories on the location yourwebsite-opencart-installed-path/override admin directory and other too.
4. Now login to the admin panel and do the same as given in the screenshots below.
5. Log into [OpenCart](https://www.opencart.com/).
6. Navigate to the Admin Panel then to Extensions and Payments and install the PayKun gateway extension.
7. Click Edit next to PayKun and do the following:

   * Enter your PayKun Merchant ID, Access Token & Encryption Key. These can be generated from your [Dashboard](https://dashboard.paykun.com/login).
   * Change extension status to Enabled
   * Click Save to save the extension settings.<br>
8. Now you will be able to see Paykun Payment method in the checkout page.

### **Test your Integration (sandbox)**

{% hint style="info" %}
If you need it for testing purposes you can use our sandbox mode by sending “**isLive**” parameter to false.
{% endhint %}

If you need it for testing purposes you should login in Paykun dashboard using sandbox mode and get your testing [merchant Id](https://docs.paykun.com/technical-guide/api-encryption-key-guide) and [Device API key(access token).](https://docs.paykun.com/technical-guide/api-encryption-key-guide)

To test your integration in sandbox environment before going like, you can use our test environment (See how to create one) and use your test credentials, You just have to use **isLive**=**false** in your integration, You can use test card details provided [here ](https://docs.paykun.com/technical-guide/test-card-information)for testing purpose.

* [Log In](https://app.paykun.com/login) to your PayKun Dashboard
* ‘Go to’ the Merchant Account under the ‘Payment Gateway’ section (If you are first-time-login then you will see the ‘Become a Merchant’ option.)
* After the merchant account login, click on your profile picture.
* Select ‘Test mode’.
* Select "Generate Sandbox Account" to activate your sandbox account
* After activating sandbox account,you can click on "Sandbox Login" button to go to sandbox dashboard and use generated username and password login.
* Now you have to generate your Device API key from sandbox account from Setting-Security tab.
* You can get you Merchant Id clicking on profile icon from top right corner.
* Now you have to use this API key and Merchant ID in your Demo project for testing purposes. Note: Remember that you can login in Sandbox account from your Live account.

### **For Live environment**

If you want to do real transaction than set "**isLive**" parameter to **true** and use your Live MerchantId and AccessToken from Paykun dashboard.

### **For any Assistance**

In case of any query, please contact to <tech@paykun.com>

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paykun.com/technical-guide/ecommerce-integration/opencart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
