tripartie / webapi-phpclient
This package is abandoned and no longer maintained.
No replacement package was suggested.
The Tripartie Web API allows you to easily create Transaction templates.
1.0.3
2021-10-13 13:34 UTC
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2023-01-13 16:27:29 UTC
README
This document describes all use cases offered by the Tripartie Web API.
The Tripartie Web API allows you to easily create Transaction templates. A Transaction template allows a User (the Buyer) to safely initiate a Transaction pre-configured by another User (the Seller).
This allows you to add a Secured Payment button on your website pages.
Installation & Usage
Requirements
PHP 7.2 and later.
Installation
composer require tripartie/webapi-phpclient
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); use TripartieWebAPI\Configuration; use TripartieWebAPI\TransactionTemplatesApi; // Configure API key authorization: ClientIdAuth $config = Configuration::getDefaultConfiguration()->setApiKey('client-id', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = TripartieWebAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('client-id', 'Bearer'); $apiInstance = new TransactionTemplatesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $externalId = 'template-87'; // string | The Transaction template's External ID. try { $result = $apiInstance->fetch($externalId); print_r($result); } catch (Exception $e) { echo 'Exception when calling TransactionTemplatesApi->fetch: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://platform.preprod.tripartie.com
Class | Method | HTTP request | Description |
---|---|---|---|
TransactionTemplatesApi | fetch | GET /api/web/transaction-templates/ | Fetch |
TransactionTemplatesApi | create | POST /api/web/transaction-templates/ | Create |
UsersApi | unregister | DELETE /api/web/users/ | Unregister |
UsersApi | fetch | GET /api/web/users/ | Fetch |
UsersApi | register | POST /api/web/users/ | Register |
WebhooksApi | validate | GET /api/web/webhooks/ | Validate |
Models
- Error
- ModelTransactionTemplate
- ModelUser
- RequestCreateTransactionTemplate
- RequestCreateTransactionTemplatePackageFormat
- RequestRegisterUser
- Webhook
Authorization
ClientIdAuth
- Type: API key
- API key parameter name: client-id
- Location: URL query string
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0
- Package version:
1.0.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen