PHPackages                             mitchdav/st-george-ipg - 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. mitchdav/st-george-ipg

AbandonedArchivedLibrary[Payment Processing](/categories/payments)

mitchdav/st-george-ipg
======================

A PHP client implementation of the St.George Internet Payment Gateway using the Webpay library.

1.0.0(8y ago)43.3k2[1 PRs](https://github.com/mitchdav/st-george-ipg/pulls)1MITPHPPHP &gt;=5.6

Since Aug 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mitchdav/st-george-ipg)[ Packagist](https://packagist.org/packages/mitchdav/st-george-ipg)[ RSS](/packages/mitchdav-st-george-ipg/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (5)Used By (1)

St.George IPG Client
====================

[](#stgeorge-ipg-client)

[![Build Status](https://camo.githubusercontent.com/5bf753328167ea5b21b442f2007b6d7b796efad80c9a05c6ac35092a785d87c2/68747470733a2f2f7472617669732d63692e6f72672f6d697463686461762f73742d67656f7267652d6970672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mitchdav/st-george-ipg)[![Latest Stable Version](https://camo.githubusercontent.com/e9878f99d9d20f38333887865487152a6b2d5fddc94576d41f1f253ea41a5d7a/68747470733a2f2f706f7365722e707567782e6f72672f6d697463686461762f73742d67656f7267652d6970672f762f737461626c652e737667)](https://packagist.org/packages/mitchdav/st-george-ipg)[![Total Downloads](https://camo.githubusercontent.com/d946c1c6fff61ca701a33893499429cc19363df8a61494d96c2e7764f91dd4e6/68747470733a2f2f706f7365722e707567782e6f72672f6d697463686461762f73742d67656f7267652d6970672f646f776e6c6f6164732e737667)](https://packagist.org/packages/mitchdav/st-george-ipg)[![License](https://camo.githubusercontent.com/bb007a32d384259983a33280da9fb5aecc5579d77531e4e933734da3fdf799a4/68747470733a2f2f706f7365722e707567782e6f72672f6d697463686461762f73742d67656f7267652d6970672f6c6963656e73652e737667)](https://packagist.org/packages/mitchdav/st-george-ipg)[![Coverage Status](https://camo.githubusercontent.com/05693ffd08101999e58e2872338a17f920d87a32f150033f1b856a4844740447/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d697463686461762f73742d67656f7267652d6970672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mitchdav/st-george-ipg?branch=master)

A PHP client implementation of the St.George Internet Payment Gateway using the WebService or Webpay extension.

Using this library, you can provide your St.George-issued credentials and begin charging cards instantly.

The library supports all features of the gateway, including:

- Purchases and refunds
- Pre-authorisations and completions
- Status checks on existing transactions
- Setting a client reference on the transaction
- Setting a comment on the transaction
- Setting the merchant description on the transaction (which will appear on the customer's bank statement)

The library has 2 providers to connect to St.George:

- WebService
- Extension

WebService
----------

[](#webservice)

The WebService is **by far** the easiest to integrate with, and just uses a simple HTTP client to connect to an API exposed by St.George.

### Requirements

[](#requirements)

- PHP &gt;= 5.6
- [Composer](https://getcomposer.org/)

If you run into SSL connection issues using the WebService provider on OS X, please check this [support thread](https://stackoverflow.com/a/26538127/7503569).

### Installation

[](#installation)

You can install the library in your project with Composer:

```
composer require mitchdav/st-george-ipg

```

### Initialising The Client

[](#initialising-the-client)

The WebService requires 2 credentials, which are your St.George-issued client ID, and an authentication token.

Copy your client ID into the `IPG_CLIENT_ID` environment variable, or modify the code below.

You can find the authentication token by logging into the [Merchant Administraction Console](https://www.ipg.stgeorge.com.au/StgWeb/merchants/), clicking on *Merchant Details* and then under *IPG Accounts* on the right, click your client ID and then go to the *authentication* tab.

In the list on the left, click on *configure* next to *Security Token*, and generate a token. Copy that value into the `IPG_AUTHENTICATION_TOKEN` environment variable, or modify the code below.

You can then initialise the client with the following:

```
