2017 © Pedro Peláez
 

library sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

image

hyperwallet/sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

  • Friday, May 25, 2018
  • by fkrauthan-hyperwallet
  • Repository
  • 4 Watchers
  • 0 Stars
  • 3,804 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 3 Open issues
  • 4 Versions
  • 45 % Grown

The README.md

Build Status Coverage Status Latest Stable Version PHP Version Require Packagist Downloads Packagist Downloads, (*1)

Hyperwallet REST SDK

A library to manage users, transfer methods and payments through the Hyperwallet v4 API., (*2)

For Hyperwallet v3 API calls, please use the latest SDK version 1.x.x. See [here|https://docs.hyperwallet.com/content/updates/v1/rest-api-v4] to learn about the differences between versions and the update process required to use REST API v4., (*3)

Prerequisites

Hyperwallet's PHP server SDK requires at minimum PHP 5.6 and above., (*4)

Installation

$ composer require hyperwallet/sdk

Documentation

Documentation is available at http://hyperwallet.github.io/php-sdk., (*5)

API Overview

To write an app using the SDK, (*6)

  • Register for a sandbox account and get your username, password and program token at the Hyperwallet Program Portal.
  • Add dependency hyperwallet/sdk to your composer.json., (*7)

  • Create a instance of the Hyperwallet Client (with username, password and program token), (*8)

    $client = new \Hyperwallet\Hyperwallet("restapiuser@4917301618", "mySecurePassword!", "prg-645fc30d-83ed-476c-a412-32c82738a20e");
    
  • Start making API calls (e.g. create a user), (*9)

    $user = new \Hyperwallet\Model\User();
    $user
    ->setClientUserId('test-client-id-1')
    ->setProfileType(\Hyperwallet\Model\User::PROFILE_TYPE_INDIVIDUAL)
    ->setFirstName('Daffyd')
    ->setLastName('y Goliath')
    ->setEmail('testmail-1@hyperwallet.com')
    ->setAddressLine1('123 Main Street')
    ->setCity('Austin')
    ->setStateProvince('TX')
    ->setCountry('US')
    ->setPostalCode('78701');
    
    try {
      $createdUser = $client->createUser($user);
    } catch (\Hyperwallet\Exception\HyperwalletException $e) {
      // Add error handling here
    }
    
  • Error Handling The HyperwalletException has an array of errors with code, message and fielName properties to represent a error.
    php try { ... } catch (\Hyperwallet\Exception\HyperwalletException $e) { // var_dump($e->getErrorResponse()); // var_dump($e->getErrorResponse()->getErrors()); foreach ($e->getErrorResponse()->getErrors() as $error) { echo "\n------\n"; echo $error->getFieldName()."\n"; echo $error->getCode()."\n"; echo $error->getMessage()."\n"; } }

Development

Run the tests using phpunit:, (*10)

$ composer install
$ ./vendor/bin/phpunit -v

Reference

REST API Reference, (*11)

License

MIT, (*12)

The Versions

25/05 2018

dev-master

9999999-dev http://hyperwallet.github.io/php-sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Florian Krauthan

rest sdk creditcard bankaccount ach payout hyperwallet

15/09 2016

dev-feature/user-status-transition-endpoint

dev-feature/user-status-transition-endpoint http://hyperwallet.github.io/php-sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Florian Krauthan

rest sdk creditcard bankaccount ach payout hyperwallet

26/07 2016

0.1.x-dev

0.1.9999999.9999999-dev http://hyperwallet.github.io/php-sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Florian Krauthan

rest sdk creditcard bankaccount ach payout hyperwallet

30/06 2016

0.1.0

0.1.0.0 http://hyperwallet.github.io/php-sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Florian Krauthan

rest sdk creditcard bankaccount ach payout hyperwallet