PHPackages                             mynameiszanders/cashflows - 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. mynameiszanders/cashflows

AbandonedArchivedLibrary[API Development](/categories/api)

mynameiszanders/cashflows
=========================

Cashflows PHP API Library.

1.0.0-rc1(11y ago)09MITPHPPHP &gt;=5.4

Since Aug 15Pushed 11y ago1 watchersCompare

[ Source](https://github.com/mynameiszanders/cashflows)[ Packagist](https://packagist.org/packages/mynameiszanders/cashflows)[ Docs](https://github.com/mynameiszanders/cashflows)[ RSS](/packages/mynameiszanders-cashflows/feed)WikiDiscussions develop Synced 5d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Cashflows PHP API Library
=========================

[](#cashflows-php-api-library)

PHP library for communicating with Cashflows' API, for [Nosco Systems](https://noscosystems.com) by [Zander Baldwin](https://github.com/mynameiszanders), version `1.0.0-RC1`.

Available API Requests
----------------------

[](#available-api-requests)

Although each request object can be instantiated stand-alone from its respective class, it's easier to create it through a dedicated method in the Client (`Nosco\Cashflows\Client`) object - which automatically sets the Auth ID and password for each request.

The available dedicated methods, and their corresponding request classes, are:

Dedicated MethodRequest Object Class`paymentRequest()``Nosco\Cashflows\Request\Payment`.`mobilePaymentRequest()``Nosco\Cashflows\Request\Payment\Mobile`.`continuousPaymentRequest()``Nosco\Cashflows\Request\Payment\Continuous`.`alternativeRecurringPaymentRequest()``Nosco\Cashflows\Request\Payment\AlternativeRecurring`.`voidRequest()``Nosco\Cashflows\Request\Void`.`refundRequest()``Nosco\Cashflows\Request\Refund`.`verificationRequest()``Nosco\Cashflows\Request\Verification`.Sending Requests
----------------

[](#sending-requests)

Each request object has a set of attributes that must be filled-in before the request can be sent, and these are documented in Cashflows' *Remote API Integration Guide* (version 1.7 April 2014).

The attributes can be entered using the `attribute()` method of the request object, and the API call can be sent with the `send()` method. Once an API call is successful, an `Nosco\Cashflows\Response\Authorised` response object is returned from the `send()` method.

Catching Errors
---------------

[](#catching-errors)

The following is the Exception tree; only exception classes in leaf nodes are thrown, all others are for group-catching. All exceptions are prefixed with the namespace `Nosco\Cashflows\Exceptions`.

- `BaseException` **never** thrown (group-catch only).
    - `Validation`.
    - `Transport`.
    - `CashflowsSystem`.
    - `Response` **never** thrown (group-catch only).
        - `Response\InvalidResponse`.
        - `Response\NotAuthorised` **never** thrown (group-catch only).
            - `Response\NotAuthorised\Blocked`.
            - `Response\NotAuthorised\Cancelled`.
            - `Response\NotAuthorised\Declined`.
            - `Response\NotAuthorised\InvalidRequest`.

Example Usage
-------------

[](#example-usage)

```
