PHPackages                             tkhconsult/kina-pg-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. tkhconsult/kina-pg-sdk

ActiveLibrary[Payment Processing](/categories/payments)

tkhconsult/kina-pg-sdk
======================

Kinabank Payment Gateway SDK

v1.0.6(9mo ago)038[1 issues](https://github.com/tkhconsult/kina-pg-sdk/issues)MITPHPPHP &gt;=5.5

Since May 26Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/tkhconsult/kina-pg-sdk)[ Packagist](https://packagist.org/packages/tkhconsult/kina-pg-sdk)[ Docs](https://github.com/tkhconsult/kina-pg-sdk)[ RSS](/packages/tkhconsult-kina-pg-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Welcome to KinaBank Payment Gateway SDK 👋
=========================================

[](#welcome-to-kinabank-payment-gateway-sdk-)

[![GitHub issues](https://camo.githubusercontent.com/2004e4fa6b9837989c528b53766e91f6b58a7b9a4e2624df27b196f222b7458b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f546b68436f6e73756c742f6b696e612d70672d73646b)](https://github.com/TkhConsult/kina-pg-sdk/issues)[![Version](https://camo.githubusercontent.com/b32f8c57e8b7515fa6d8038de5caa35e862c8e3172e3f489165bf7ddba59aac0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746b68636f6e73756c742f6b696e612d70672d73646b2e737667)](https://packagist.org/packages/tkhconsult/kina-pg-sdk)

---

> Packagist package (library) to give any php-based website an access to the interface of KinaBank that merchant systems use to process credit card based e- commerce transactions using the standard CGI/WWW forms posting method. This interface transparently supports various cardholder authentication protocols such as 3-D Secure and Secure Code as well as legacy unauthenticated SSL commerce transactions.

#### 🏠 [Homepage](https://github.com/TkhConsult/kina-pg-sdk)

[](#-homepage)

#### [Demo](https://github.com/tkhconsult/kina-pg-sdk-demo)

[](#demo)

Install
-------

[](#install)

```
composer require tkhconsult/kina-pg-sdk
```

### Requirements

[](#requirements)

- PHP &gt;= 5.5
- OpenSSL &gt;=0.9.8

Usage
-----

[](#usage)

### Step 1. Environment configuration (not required)

[](#step-1-environment-configuration-not-required)

You can use one of the composer packages

```
composer require vlucas/phpdotenv
```

or

```
composer require symfony/dotenv
```

.env file

```
# Merchant ID / Card acceptor ID assigned by bank
KINA_BANK_MERCHANT_ID=xxxxxxxxxxxxxxx

# Merchant Terminal ID assigned by bank
KINA_BANK_MERCHANT_TERMINAL=xxxxxxxx

# Merchant primary web site URL
KINA_BANK_MERCHANT_URL='http://example.com'

# Merchant name (recognizable by cardholder)
KINA_BANK_MERCHANT_NAME='Merchant company name'

# Merchant company registered office address
KINA_BANK_MERCHANT_ADDRESS='Merchant address'

# File name of merchant secret key
KINA_BANK_MERCHANT_SECRET_KEY=secret.key

# Payment page type (embedded / hosted)
KINA_BANK_PAYMENT_PAGE_TYPE=embedded

# Default Merchant shop timezone
# Used to calculate the timezone offset sent to KinaBank
# Refer: https://www.php.net/manual/en/timezones.php
KINA_BANK_MERCHANT_TIMEZONE_NAME='Pacific/Port_Moresby'

# Merchant shop 2-character country code.
# Must be provided if merchant system is located
# in a country other than the gateway server's country.
KINA_BANK_MERCHANT_COUNTRY_CODE=PG

# Default currency for all operations: 3-character currency code
KINA_BANK_MERCHANT_DEFAULT_CURRENCY=PGK

# Default forms language
# By default are available forms in en
# If need forms in another languages please contact gateway
# administrator
KINA_BANK_MERCHANT_DEFAULT_LANGUAGE=en
```

### Step 2. Init Gateway client

[](#step-2-init-gateway-client)

#### Init Gateway client through configureFromEnv method

[](#init-gateway-client-through-configurefromenv-method)

```
