hydrogenplatform / app_token_api
dev-main
2022-01-18 13:20 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-05-22 00:52:21 UTC
README
For more information, please visit https://www.hydrogenplatform.com/no-code
Requirements
PHP 5.5 and later
Installation
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please first follow the installation instructions. Then make sure you use the proper base URL:
Base URL
Follow steps to verify the base URL path:
- Go to Configuration file located under lib folder.
- Search for $host and change/verify the URL according to the environment.
Sandbox Base URL https://sandbox.hydrogenplatform.com
Production Base URL https://api.hydrogenplatform.com
Sample Code
Now you are ready to execute the following PHP code:
<?php require_once('./vendor/autoload.php'); $apiInstance = new com\hydrogen\admin\Api\AutoGenerateAppTokenApi( new GuzzleHttp\Client() ); $attribMap = array ( array( "name" => "public-key", "value" => "****" ), array( "name" => "client-id", "value" => "****" ), array( "name" => "card-id", "value" => "****" ) ); $appTokenConfig['appName'] = array(array('app_name'=>'pfm_cash_flow', 'auth_type'=>'password_credentials')) $appTokenConfig['basePath'] = \com\hydrogen\admin\Environment::PRODUCTION; $appTokenConfig['userAccessToken'] = ''; $appTokenConfig['attribMap'] = $attribMap; $appTokenConfig['isEmbed'] = true; $appTokenConfig['isCredsPassed'] = true; $appTokenConfig['clientId'] = '****'; $appTokenConfig['clientSecret'] = '****'; $appTokenConfig['username'] = "****"; $appTokenConfig['password'] = "****"; $appTokenConfig['auth_type'] = 'client_credentials'; try { $result = $apiInstance->getAppTokenUsingGET($appTokenConfig); print_r($result); } catch (Exception $e) { print_r($e->getMessage()); } ?>
Author
The Hydrogen Technology Corporation
https://www.hydrogenplatform.com
Generated using Swagger Codegen