Title: Hatton National Bank Payment Gateway for WooCommerce
Author: Ayesh Karunaratne
Published: <strong>ጥር  28, 2019</strong>
Last modified: ጥቅምት  4, 2025

---

Search plugins

![](https://ps.w.org/woo-hnb/assets/banner-772x250.jpg?rev=3372859)

![](https://ps.w.org/woo-hnb/assets/icon-256x256.jpg?rev=2021935)

# Hatton National Bank Payment Gateway for WooCommerce

 By [Ayesh Karunaratne](https://profiles.wordpress.org/ayeshrajans/)

[Download](https://downloads.wordpress.org/plugin/woo-hnb.1.1.1.zip)

 * [Details](https://am.wordpress.org/plugins/woo-hnb/#description)
 * [Reviews](https://am.wordpress.org/plugins/woo-hnb/#reviews)
 *  [Installation](https://am.wordpress.org/plugins/woo-hnb/#installation)
 * [Development](https://am.wordpress.org/plugins/woo-hnb/#developers)

 [ድጋፍ](https://wordpress.org/support/plugin/woo-hnb/)

## ማብራሪያ

Hatton National Bank Payment Gateway for WooCommerce plugin is a free and open source
plugin to integrate Hatton National Bank Internet Payment Gateway with your WooCommerce
store.

### Features

 * Totally free! No need to buy a license.
 * Lightweight yet fully functional integration.
 * Written with modern PHP code, making the code light weight and easy to read.
 * Thoroughly and securely validates the payments upon receipt.
 * Security measures to prevent sensitive data exposure.
 * Translated to Sinhalese (සිංහල) and Tamil (தமிழ்) by native speakers.

### Prerequisites

 * PHP 7.1 or later
 * `Acquire ID`, `Merchant ID`, and `Password` obtained from HNB.

Note that PHP 5.6 and older versions no longer receive official security updates.
PHP 7.1 only receives security fixes, it is highly recommended that you use the 
latest PHP version. This plugin is tested with PHP versions upto [PHP 8.0](https://php.watch/versions/8.0).

### Configuration

Once enabled, you will see a _Settings_ link under the _HNB Gateway for WooCommerce_
plugin name. This button, or _WooCommerce Settings -> Payments -> HNB Online Payment_
will take you to the plugin configuration page.

In this page, enter the Acquirer ID, Merchant ID, and Password exactly as provided
by HNB.

### Functionality

When the customers are about pay for the order, they will see the option to pay 
by credit/debit cards via HNB payment gateway. User will be sent to HNB payment 
gateway to complete the payment.

Upon completion, user is sent back to your store, and depending on the transaction
status, user will either see the order-complete page, or sent back to the checkout
page with a message saying the payment failed.

If a transaction fails (card declined, configuration error, etc.), this plugin logs
an admin-note to the order. This note tries to put as much as possible information
for administrators to help resolve any problems. The error codes are available to
refer in the PDF file sent by HNB.

## Screenshots

 * [[
 * Enable the plugin
 * [[
 * WooCommerce Payments tab shows the new “HNB Online Payment” method
 * [[
 * Configure the payment gateway
 * [[
 * Payment option in the checkout page
 * [[
 * Payment configuration page
 * [[
 * HNB payment gateway page

## መጫን

#### Minimum Requirements

 * PHP 7.1 or later
 * `Acquire ID`, `Merchant ID`, and `Password` obtained from HNB.

#### Automatic installation

Automatic installation is the easiest option as WordPress handles the file transfers
itself, and you don’t need to leave your web browser. To do an automatic installation
of this plugin, log in to your WordPress dashboard, navigate to the Plugins menu
and click Add New.

In the search field type “WooCommerce – Hatton National Bank Payment Gateway” and
click Search Plugins. Once you’ve found our plugin you can view details about it
such as the point release, rating and description. Most importantly of course, you
can install it by simply clicking “Install Now”.

#### Manual installation

The manual installation method involves downloading our plugin and uploading it 
to your webserver via your favourite FTP application. The WordPress codex contains
[instructions on how to do this here](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

## የተለመዱ ጥያቄዎች

### Use this plugin on older PHP versions

As indicated above, this plugin requires PHP 7.1. This is a hard requirement, and
we are strict about this requirement. Touch cookies.

### I get a “Payment Error” message when I click “Proceed to payment”

A “Payment Error” (as opposed to “Payment declined”) often means there is something
wrong with your configuration. Double-check your Acquirer and Merchant IDs. You 
also need to make sure the site is accessible over public internet and is served
with HTTPS.

### How do I contribute?

Please head over to [GitHub repository](https://github.com/Ayesh/wordpress-woocommerce-hnb).
We use GitHub/Git, but individual releases are added to WordPress.org SVN repository.

## Reviews

![](https://secure.gravatar.com/avatar/d9b18ed03a026c84a1cb7a377e590e0bcc56a6dcef77daaa16564ee5101bdbf6?
s=60&d=retro&r=g)

### 󠀁[The best plugin for hnb bank payment gateway](https://wordpress.org/support/topic/the-best-plugin-for-hnb-bank-payment-gateway/)󠁿

 [isanka99](https://profiles.wordpress.org/isanka99/) ጥር 29, 2019

The best plugin for hnb bank payment gateway. easy to use. great job.

 [ Read all 1 review ](https://wordpress.org/support/plugin/woo-hnb/reviews/)

## Contributors & Developers

“Hatton National Bank Payment Gateway for WooCommerce” is open source software. 
The following people have contributed to this plugin.

Contributors

 *   [ Ayesh Karunaratne ](https://profiles.wordpress.org/ayeshrajans/)

[Translate “Hatton National Bank Payment Gateway for WooCommerce” into your language.](https://translate.wordpress.org/projects/wp-plugins/woo-hnb)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/woo-hnb/), check out
the [SVN repository](https://plugins.svn.wordpress.org/woo-hnb/), or subscribe to
the [development log](https://plugins.trac.wordpress.org/log/woo-hnb/) by [RSS](https://plugins.trac.wordpress.org/log/woo-hnb/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

**1.0**

 * Initial release.

**1.0.1**

 * Fix a missing sprintf() call in order notes.
 * Add class constant modifiers to gateway class constants.
 * Various code performance improvements with FQFN and FQCN tweaks.

**1.1**

 * Update plugin for PHP 6.3 compatibility.

## Meta

 *  Version **1.1.1**
 *  Last updated **7 ወሮች  ago**
 *  Active installations **10+**
 *  WordPress version ** 4.9 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 7.1 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/woo-hnb/)
 * Tags
 * [payment](https://am.wordpress.org/plugins/tags/payment/)[payment gateway](https://am.wordpress.org/plugins/tags/payment-gateway/)
   [sri lanka](https://am.wordpress.org/plugins/tags/sri-lanka/)[woo-commerce](https://am.wordpress.org/plugins/tags/woo-commerce/)
   [woocommerce](https://am.wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://am.wordpress.org/plugins/woo-hnb/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/woo-hnb/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/woo-hnb/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/woo-hnb/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/woo-hnb/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/woo-hnb/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/woo-hnb/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/woo-hnb/reviews/)

## Contributors

 *   [ Ayesh Karunaratne ](https://profiles.wordpress.org/ayeshrajans/)

## ድጋፍ

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/woo-hnb/)