PHPackages                             propa/psigate - 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. [API Development](/categories/api)
4. /
5. propa/psigate

ActiveLibrary[API Development](/categories/api)

propa/psigate
=============

PSIGate PHP API

v1.0.1(3y ago)51.2k5MITPHPPHP &gt;=5.3.0

Since Nov 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kulbakin/psigate)[ Packagist](https://packagist.org/packages/propa/psigate)[ RSS](/packages/propa-psigate/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

PSIGate PHP API
===============

[](#psigate-php-api)

PHP implementation of PSIGate XML Messenger and Account Manager API.

> **WARNING (2017-10-23)**
>
> Due to change in URL structure of API gateway, an incompatibility issue may arise when update to the most recent `dev-master` version from prior to 2017-10-23 one. Version history is introduced to address the issue (my mistake not to introduce it right away). If you want to use old version, i.e. not to introduce changes in your current code, change `dev-master`to `0.9` in your composer file. To avoid potential future compatibility, change `dev-master`to the most relevant current release.

General Information
-------------------

[](#general-information)

The library is a wrapper around [PSIGate XML API](http://psigate.com/pages/techsupport.asp) making input and result array structures reflect structure of XML documents PSIGate gateway expects. Refer to original PSIGate documentation to understand what parameters to set and what result values to expect.

Installation
------------

[](#installation)

The recommended way to install the library is through [Composer](https://getcomposer.org).

```
{
    "require": {
        "propa/psigate": "~1"
    }
}
```

Handling Exceptions
-------------------

[](#handling-exceptions)

If an error occurs during request processing, an exception is thrown. Exception code is initialized with corresponding PSIGate API error code (RPA-0002, RIV-0019 etc.) and exception message with corresponding error message, refer to PSIGate API documentation for the full list of error codes and associated messages.

There are several PHP API specific errors related to unexpected response format, cURL and other situations, their exception codes are prefixed with PAPI and CURL (e.g. PAPI-0001, PAPI-0002, CURL-0001, CURL-0006 etc).

Be aware that if exception is not thrown, it doesn't mean the operation was successful in general terms. E.g. *AMMessenger::chargeImmediate()*returns *Invoice* structure in result even though tranasaction is declined by processing gateway and credit card is not debited. There is *Messenger::analyseTransactionResult()* method which can be used for checking if data structure contains error information.

XML Messenger (XMLMessenger)
----------------------------

[](#xml-messenger-xmlmessenger)

XML Messenger allows to process real-time credit card transactions.

### Basic usage

[](#basic-usage)

```
