2017 © Pedro Peláez
 

library helios-hpp-sdk

Helios HPP payment system PHP SDK

image

helios-api/helios-hpp-sdk

Helios HPP payment system PHP SDK

  • Wednesday, November 30, 2016
  • by redwhitelabel
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

Helios Hosted Payment Page SDK for PHP

NOTICE: This branch is under active development.

This repository contains the open source PHP SDK that allows you to access the Helios HPP from your PHP app. Documentation fo Helios API documentation.dp.ag., (*1)

Installation

The Helios HPP PHP SDK can be installed with Composer. Run this command:, (*2)

composer require helios/helios-hpp-sdk

Usage

Note: This version of the Helios HPP SDK for PHP requires PHP 5.6 or greater., (*3)

Simple transaction registration example., (*4)

$heliosApp = new \HeliosHpp\HeliosHpp(['accountId' => '{account-id}', 'url' => '{helios-hpp-url}']);
$payment = new \HeliosHpp\Model\Payment('{account-id}', 'USD', 1000);

try {
    $createdPayment = $heliosApp->createPayment($payment);
} catch(\HeliosHpp\Exception\HeliosHppException $exception) {
    // When Helios HPP returns an error
    echo 'Helios HPP returned an error: ' . $exception->getMessage();
    exit;
} catch(\HeliosHpp\Exception\PaymentBodyException $exception) {
    // When Helios HPP returns invalid response
    echo 'Helios HPP returned invalid response: ' . $exception->getMessage();
    exit;
}

echo 'Payment Token ' . $createdPayment->getToken() 

WebHook registration., (*5)

$heliosApp = new \HeliosHpp\HeliosHpp(['accountId' => '{account-id}', 'url' => '{helios-hpp-url}']);

try {
    $paymentStatusChange = $heliosApp->registerWebHook();
} catch(\HeliosHpp\Exception\WebHookRequestException $exception) {
    // When Helios HPP call or payload is invalid
    echo 'Helios HPP called with invalid request: ' . $exception->getMessage();
    exit;
}

echo 'Payment Status event type' . $paymentStatusChange->getEventType(); 

Tests

  1. Composer is a prerequisite for running the tests. Install composer globally, then run composer install to install required files.
  2. The tests can be executed by running this command from the root directory:
$ ./vendor/bin/phpunit

By default the tests will send live HTTP requests to the Helios HPP server. If you are without an internet connection you can skip these tests by excluding the internet group., (*6)

$ ./vendor/bin/phpunit --exclude-group internet

License

Please see the license file for more information., (*7)

The Versions

30/11 2016
30/11 2016
30/11 2016
17/11 2016

dev-feature/DG-1182-Simple-SDK

dev-feature/DG-1182-Simple-SDK https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios

17/11 2016

dev-feature/DG-1337-SDK-PHP-full

dev-feature/DG-1337-SDK-PHP-full https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios

28/10 2016

0.0.4

0.0.4.0 https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios

28/10 2016

dev-hotfix/0.0.4

dev-hotfix/0.0.4 https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios

28/10 2016

0.0.3

0.0.3.0 https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios

25/10 2016

0.0.2

0.0.2.0 https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios

25/10 2016

0.0.1

0.0.1.0 https://github.com/helios-api/php-helios-hpp-sdk

Helios HPP payment system PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Szymczak

sdk helios