← back

Getting Started : OpenCart


A. Important Notes

1. Please take note that this tutorial is for:

  • Merchant with OpenCart 2.0 to 2.2.
  • For OpenCart version 2.3, please refer here 
  • For OpenCart version below 2.0, plase refer here
  • Merchants with OpenCart account.

2. Before you proceed with the tutorial, please take note that the steps that you need to do to complete the tutorial are:

  • Download the senangPay OpenCart plugin.
  • Next, upload the plugin files to OpenCart via cPanel / FTP.
  • Then, enable senangPay setting from OpenCart.
  • Get your Merchant ID, Secret Key & OpenCart + senangPay URL for the integration from senangPay Dashboard.
  • Insert your Merchant ID & Secret Key to your OpenCart.
  • Insert your Return URL and Callback URL to your senangPay dashboard.

B. Download the senangPay OpenCart plugin

1. Please download the plugin below.

2. The files name is senangpayopencartplugin.zip.

3. Extract the zip files.

4. You will see 2 folders in the extract files under the folder “upload” which are the folder “admin” and “catalog.” Please take note that these are the files that you need to upload to your OpenCart folder in the server later.

Screen Shot 2015-08-10 at 3.51.47 PM


C. Check the existing Payment Gateway with OpenCart

Now, you need to login to your OpenCart and check whether the senangPay payment gateway is already in the list or not. By default, senangPay will not be in the list.

1. Please login to your OpenCart.

Screen Shot 2015-08-10 at 3.57.18 PM

2. On the menu, go to Extensions > Payments.

Screen Shot 2015-08-10 at 3.58.40 PM

3. You will see a list of existing payment gateways that are already registered with OpenCart. Please take note that senangPay is not yet in the list.

Screen Shot 2015-08-10 at 4.01.13 PM


D. Upload the senangPay OpenCart plugin files to OpenCart

Now, you need to upload both folders “admin” and folder “catalog” to your OpenCart folder in your server. You can do this via your cPanel login or via FTP software.

1. Login to your FTP ( or cPanel ) of your server where you host your OpenCart.

2. Browse your OpenCart folder. You will notice that the “admin” and “catalog” folders are already existed in the server.

Screen Shot 2015-08-10 at 4.10.22 PM

3. Open your OpenCart folder and you will see both “admin” and “catalogue” folder.

Screen Shot 2015-08-10 at 4.11.07 PM

4. Copy both of the “admin” and “catalog” folders that you have uploaded before and upload the folders to the server.

Screen Shot 2015-08-10 at 3.51.47 PM


E. Check senangPay Payment Gateway in the list

After you replace both folders, you need to check in your OpenCart Payment list whether the senangPay Payment Gateway is listed or not. You should see senangPay listed if you have uploaded both folders.

1. Please login to your OpenCart.

Screen Shot 2015-08-10 at 3.57.18 PM

2. On the menu, go to Extensions > Payments.

Screen Shot 2015-08-10 at 3.58.40 PM

3. You should see that the senangPay Payment Gateway is already in the list with status “Disabled.”

Screen Shot 2015-08-10 at 4.20.09 PM


F. Enable senangPay OpenCart plugin

Next, you need to enable the senangPay plugin as the plugin is currently disabled. First, you will need to install the senangPay plugin.

1. Go to the Payment listing.

2. On the senangPay list, click the green icon to install.

Screen Shot 2015-08-10 at 4.22.18 PM

3. You should see a response from OpenCart telling you that your installation is successful.

Screen Shot 2015-08-10 at 4.23.23 PM

4. The previous green icon will change to red color. This means that your senangPay plugin is already installed.

Screen Shot 2015-08-10 at 4.24.23 PM

5. On the senangPay list, click on the blue icon to edit.

Screen Shot 2015-08-10 at 4.25.57 PM

6. You will see a new page with spaces to fill.

Screen Shot 2015-08-10 at 4.27.18 PM

7. You need to get the Merchant ID and Secret Key from your senangPay Dashboard.


G. senangPay Shopping Cart integration link

Next, you need to get your Merchant ID and Secret Key.

1. Login to your senangPay Dashboard.

2. Go to Menu > Settings > Profile.

3. Scroll down the page until you see the “Shopping Cart Integration Link” section.

4. Copy the “Merchant ID” number and the “Secret Key” number.

5. Next, you need to insert your OpenCart URL inside the Return URL field in the senangPay Dashboard. The URL is :

  • The URL above is based on the assumption that you have installed OpenCart in your base directory.
  • Please change yourwebstore.com to your domain name accordingly.

6. Then, insert your Callback URL field as follows:


7. Lastly, click ‘Save’. For more info on Callback URL, read here.


H. OpenCart Setting

Now, this is almost the last part. Finalizing the OpenCart setting.

1. On the previous senangPay setting page, insert the information that you have copied before.

2. Insert your “Merchant ID” that you copied from your senangPay Dashboard.

3. Insert your “Secret Key” that you copied from your senangPay Dashboard.

Screen Shot 2015-08-10 at 4.32.40 PM

4. On the Order Status, select “Processed”. You can also select other preference based on your business process. The order status is the new status for the order after the payment was made.

Screen Shot 2015-08-10 at 4.39.53 PM

5. On the Status, select “Enable”

Screen Shot 2015-08-10 at 4.42.13 PM

6. Last, click “Save,” on the top right of the setting page.

Screen Shot 2015-08-10 at 4.43.21 PM

7. When you go back to the payment listing page, you’ll see that the senangPay payment gateway is already enabled.

Screen Shot 2015-08-10 at 4.44.10 PM


I. Testing your integration

Now, this is the last part. You need to test your integration whether its working or not.

1. Go to your OpenCart front end store.

2. Select any product, and add to cart.

3. Then, proceed to Checkout.

4. You will see senangPay in the Payment Method tab as below.

Screen Shot 2015-08-10 at 5.02.31 PM

5. When you confirm order, you will be directed to senangPay Payment Form.

6. Congratulations, your Online Business is now on another triumph level!


J. If you are not using the default theme of OpenCart

1. If you are not using the default theme of OpenCart, then, you need to create a folder called ‘payment’ in your theme folder and copy files “senangpay_failed.tpl” and “senangpay.tpl” into your theme folder.

2. Make sure the folder catalog/view/theme/your_theme_folder/payment/ contains the 2 files.


K. How do I know that I’m not using the default theme for OpenCart

If your site does not look like the image below, then you are not using the default theme.



L. Common mistake

If you encounter the error as below:

Notice: Error: Could not load template /home/xxxxx/public_html/xxxxx/catalog/view/theme/xxxxx/payment/senangpay.tpl! in /home/xxxxx/public_html/xxxxx/system/storage/modification/system/engine/loader.php on line 86
  • please refer to the section “If you are not using the default theme of OpenCart” above and check that you have copied the 2 files in your theme payment folder.


M. Previously known issue

1. Previously, we received several complaints regarding the absence of order/purchase on the merchant’s website, but senangPay has recorded the purchase on the Transaction list in the Dashboard.

2. Merchant can search for the mysteriously “missing” order by going to the “Missing order” list in the OpenCart admin page.

3. However, this issue has been fixed in our latest plugin.

Please take note that :

  • The current supported language for this plugin is ENGLISH only.
  • The “$” in OpenCart is equal to “RM” in senangPay Dashboard.
  • The plugin is designed for OpenCart 2.0 and above. For version below 2.0, please refer here.