PHPackages                             drsdre/laravel-hellocash - 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. drsdre/laravel-hellocash

ActiveLibrary[Payment Processing](/categories/payments)

drsdre/laravel-hellocash
========================

A Laravel package for integrating the HelloCash gateway

1.2(2y ago)1709[1 issues](https://github.com/drsdre/laravel-hellocash/issues)MITPHPPHP &gt;=7.2CI failing

Since Jan 1Pushed 2y ago2 watchersCompare

[ Source](https://github.com/drsdre/laravel-hellocash)[ Packagist](https://packagist.org/packages/drsdre/laravel-hellocash)[ Docs](https://github.com/drsdre/laravel-hellocash)[ RSS](/packages/drsdre-laravel-hellocash/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (7)Versions (17)Used By (0)

HelloCash for Laravel
=====================

[](#hellocash-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bef82f73776fa21e6e4b75679dd4585802230753d0ca85e4218b78fa197da442/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6472736472652f6c61726176656c2d68656c6c6f636173682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drsdre/laravel-hellocash)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/87609f81281cec972bc1d1527bbfc782da0c5354473724a4e6dbaed4ef39af72/68747470733a2f2f7472617669732d63692e6f72672f6472736472652f6c61726176656c2d68656c6c6f636173682e737667)](https://travis-ci.org/drsdre/laravel-hellocash)[![Quality Score](https://camo.githubusercontent.com/bffb74dfbdcbdaa9972bcd6bfd94d537b30b1e7f9ed4521730d3f921ba9439c7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6472736472652f6c61726176656c2d68656c6c6f636173682e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/drsdre/laravel-hellocash)

[![HelloCash logo](https://camo.githubusercontent.com/c53f83b4d6795e5439579490dddcbe9a176bd5d57610f128b3818a1a0d2838d3/687474703a2f2f7777772e62656c636173682e636f6d2f696d672f303138392f3232312e706e67 "HelloCash logo")](http://www.belcash.com/helloservices)

This package provides an interface for the [HelloCash](http://www.belcash.com/helloservices) API. It handles the **Invoices**, and **Payments**, as well as **Webhooks**.

Check out the documentation for more information:

**Note:** This project is not an official package, and I'm not affiliated with HelloCash in any way.

Table of Contents
-----------------

[](#table-of-contents)

- [Setup](#setup)
    - [Installation](#installation)
    - [Service Provider](#service-provider)
    - [Configuration](#configuration)
- [Handling Webhooks](#handling-webhooks)
    - [Extend the controller](#extend-the-controller)
    - [Define the route](#define-the-route)
    - [Exclude from CSRF protection](exclude-from-csrf-protection)
- [API Methods](#api-methods)
    - [Invoices](#invoices)
        - [Validate an invoice](#validate-an-invoice)
        - [Create an invoice](#create-an-invoice)
        - [Get the status of an invoice](#get-status-of-an-invoice)
        - [Get a list of invoices](#get-a-list-of-invoices)
        - [Remove an invoice](#remove-an-invoice)
    - [Transfers](#transfers)
        - [Validate a new transfer](#validate-a-new-transfer)
        - [Create a new transfer](#create-a-new-transfer)
        - [Replace a transfer](#replace-a-transfer)
        - [Get a list of transfers](#get-list-of-transfers)
        - [Find a transfer by id](#find-a-transfer)
        - [Cancel a transfer](#cancel-a-transfer)
        - [Authorize transfers](#authorize-transfers)
    - [Webhooks](#webhooks)
        - [Get an authorization code](#get-an-authorization-code)
- [Exceptions](#exceptions)
- [Tests](#tests)

Setup
-----

[](#setup)

#### Installation

[](#installation)

Install the package through Composer.

This package requires Laravel 5.0 or higher, and uses Guzzle to make API calls. Use the appropriate version according to your dependencies.

HelloCash for LaravelGuzzleLaravel~1.0~5.0~5.0~2.0~6.0~5.0~3.0~6.0~5.5```
composer require drsdre/laravel-hellocash

```

#### Service Provider

[](#service-provider)

This package supports auto-discovery for Laravel 5.5.

If you are using an older version, add the following service provider in your `config/app.php`.

```
'providers' => [
    drsdre\HelloCash\HelloCashServiceProvider::class,
]
```

#### Configuration

[](#configuration)

In `config/hellocash.php` the connection parameters are managed. It is recommended to use 'token' based authentication instead of 'credentials'.

```
return [
    'principal' => env('HELLOCASH_PRINCIPAL'),
    'credentials' => env('HELLOCASH_CREDENTIALS'),
    'token' => env('HELLOCASH_TOKEN'),
    'system' => env('HELLOCASH_SYSTEM'),
    'webhook_secret' => env('HELLOCASH_WEBHOOK_SECRET'),
];
```

The `principal` and `system` data you get from HelloCash. The 'token' you generate in the HelloCash portal in connection or through the 'connection' API endpoint.

> Read more about API authentication in the documentation:

Handling Webhooks
-----------------

[](#handling-webhooks)

HelloCash supports Webhooks, and this package offers a controller which can be extended to handle incoming notification events. Make sure to set the 'HELLOCASH\_WEBHOOK\_SECRET' environment parameter. This can be generated in the HelloCash portal connection settings or through 'connection' API endpoint.

> Read more about the Webhooks on the wiki:

### Extend the controller

[](#extend-the-controller)

You can make one controller to handle all the events, or make a controller for each event. Either way, your controllers must extend the `drsdre\HelloCash\WebhookController`. The webhook verification is handled automatically.

HelloCash send updates on transfers and invoices through the webhook. To handle those events, you controller must extend the `handleEventNotification` method.

```
