Skip to content
Home » Blog » Paynow Integration – Installation

Paynow Integration – Installation

In the last tutorial we got keys from Paynow, in this one we will go through installation of Paynow SDK or library in your project

Select your project type from below

Project Type

  1. PHP Installation
  2. Java Installation
  3. JavaScript Installation
  4. Python Installation

PHP Installation

I will touch on these scenarios:

  • Composer
  • Manual Installation

Also make sure curl extension is enabled in your PHP

1. Composer

Type the following command to install paynow php sdk

Bash
composer require paynow/php-sdk

Then include it in you project like this

PHP
<?php
require_once 'path/to/vendor/autoload.php';
// your code here

If you are using Laravel include it like this

PHP
<?php
use \Paynow\Payments\Paynow;
// your code here

Thats it!

2. Manual Installation

If you don’t have composer installed then Download Paynow Here

Extract it into your project directory then type this into your code

PHP
<?php
require_once 'path/to/library/autoloader.php';
// Do stuff

Example: Manual Installation

If your your folder structure is like this

Markdown
- Paynow
- checkout.php
- success.php
- cart.php

Then you include Paynow like this(inside checkout.php)

PHP
<?php
require_once './Paynow/autoloader.php';

Java Installation

You need Java SDK 7 or high for it to work and you can either use

Gradle:

Groovy
repositories {
  mavenCentral()
}
dependencies {
  compile 'zw.co.paynow:java-sdk:1.1.1'
}

Or Maven:

Groovy
<dependency>
    <groupId>zw.co.paynow</groupId>
    <artifactId>java-sdk</artifactId>
    <version>1.1.1</version>
</dependency>

Javascript Installation

Bash
npm install --save paynow

or

Bash
yarn add paynow

Python Installation

Bash
pip install paynow

And BAM you have access to Paynow!!!

Congratulations we have finished the boring stages now we move to the interesting stuff

image