0.2.1 2016-07-05 08:03 UTC

This package is not auto-updated.

Last update: 2023-12-09 14:58:22 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Install

Via Composer

$ composer require paybreak/rpc

Usage

class MyApi
{
    use \PayBreak\Rpc\Api;

    protected function getActions()
    {
        return [
            'ping' => [self::class, 'ping'],
        ];
    }

    protected function authenticate()
    {
        return true;
    }

    protected function getRequestAction()
    {
        return \PayBreak\Rpc\Request::getParam('action');
    }

    protected function getRequestParams()
    {
        return (array) \PayBreak\Rpc\Request::getParam('params');
    }
    
    protected function ping(array $params)
    {
        return ['pong' => true, 'request' => $params];
    }
}

$obj = new MyApi();

$obj->executeCall();

Basic demo

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email dev@paybreak.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.