Skip to content
Nocks driver for the Omnipay PHP payment processing library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Omnipay: Nocks

Nocks driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Nocks support for Omnipay.

Installation

The Nocks Omnipay driver is installed via Composer. To install, simply add it to your composer.json file:

{
    "require": {
        "nocksapp/omnipay-nocks": "^1.1.2"
    }
}

And run composer to update your dependencies.

Basic Usage

<?php

use Omnipay\Omnipay;

$accessToken = '';
$merchant = '';

$gateway = Omnipay::create('Nocks');
$gateway->setAccessToken($accessToken);
$gateway->setTestMode(true); // Use Nocks testmode/sandbox for testing

$response = $gateway->purchase([
	'merchant' => $merchant,
	'amount' => 10.00,
	'currency' => 'NLG',
	'sourceCurrency' => 'NLG',
	'returnUrl' => 'http://example.com/return',
	'callbackUrl' => 'http://example.com/callback',
])->send();

if ($response->isRedirect()) {
	$response->redirect();
}

For general usage instructions, please see the main Omnipay repository.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.