wpify/benefitplus-sdk

dev-master 2022-08-01 07:04 UTC

This package is auto-updated.

Last update: 2024-04-16 10:09:47 UTC


README

OpenAPI dokumentace k Platební bráně Benefit Plus v2.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.2.1
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "http://github.com/wpify/benefitplus-sdk.git"
    }
  ],
  "require": {
    "wpify/benefitplus-sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/./vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$x_api_key = "x_api_key_example"; // string | Jedinečný bezpečnostní klíč eshopu. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-API-Key)
$eshop_guid = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Jedinečný GUID eshopu. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#{eshopGUID})
$eshop_order_guid = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Jedinečné GUID eshop objednávky, přidělené registračním endpointem. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#{eshopOrderGUID})
$body = new \BenefitPlus\Model\PGv2CancelRequest(); // \BenefitPlus\Model\PGv2CancelRequest | DTO obsahující informace o rušené objednávce. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1125744719/DTO+PGv2+Cancel+Request)

try {
    $result = $apiInstance->eshopsEshopGUIDEshopordersEshopOrderGUIDCancelPost($x_api_key, $eshop_guid, $eshop_order_guid, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->eshopsEshopGUIDEshopordersEshopOrderGUIDCancelPost: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$x_api_key = "x_api_key_example"; // string | Jedinečný bezpečnostní klíč eshopu. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-API-Key)
$eshop_guid = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Jedinečný GUID eshopu. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#{eshopGUID})
$eshop_order_guid = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Jedinečné GUID eshop objednávky, přidělené registračním endpointem. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#{eshopOrderGUID})

try {
    $result = $apiInstance->eshopsEshopGUIDEshopordersEshopOrderGUIDGet($x_api_key, $eshop_guid, $eshop_order_guid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->eshopsEshopGUIDEshopordersEshopOrderGUIDGet: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$body = new \BenefitPlus\Model\PGv2EshopOrderRequest(); // \BenefitPlus\Model\PGv2EshopOrderRequest | DTO obsahující informace o registrované objednávce. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1125646362/DTO+PGv2+Eshop+Order+Request)
$x_api_key = "x_api_key_example"; // string | Jedinečný bezpečnostní klíč eshopu. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-API-Key)
$eshop_guid = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Jedinečný GUID eshopu. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#{eshopGUID})

try {
    $result = $apiInstance->eshopsEshopGUIDEshopordersPost($body, $x_api_key, $eshop_guid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->eshopsEshopGUIDEshopordersPost: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$x_confirm_code = "x_confirm_code_example"; // string | Ověřovací kód (zaslaný pomocí SMS uživateli). [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-ConfirmCode)
$x_e_shop_id = "x_e_shop_id_example"; // string | GUID eshopu, ze kterého je požadavek zaslán. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopID)
$x_e_shop_order_guid = "x_e_shop_order_guid_example"; // string | Jedinečné GUID eshop objednávky, přidělené registračním endpointem. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopOrderGUID)
$body = new \BenefitPlus\Model\PGv2ConfirmRequest(); // \BenefitPlus\Model\PGv2ConfirmRequest | DTO obsahující informace o potvrzení objednávky. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1125449831/DTO+PGv2+Confirm+Request)
$x_return_url = "x_return_url_example"; // string | Url, které máme poslat na platební bránu ČSOB (při inicializaci platby na platební bráně). Na tuto url vrátí platební brána ČSOB řízení, jakmile uživatel dokončí proces platby v UI platební brány ČSOB.  Používá se při platbě doplatku privátní kartou na platební bráně ČSOB. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-Return-URL)

try {
    $result = $apiInstance->uiConfirmPost($x_confirm_code, $x_e_shop_id, $x_e_shop_order_guid, $body, $x_return_url);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->uiConfirmPost: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$x_bp_card_number = "x_bp_card_number_example"; // string | Číslo BP karty, ve formátu s pomlčkami. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-BPCardNumber)
$x_e_shop_id = "x_e_shop_id_example"; // string | GUID eshopu, ze kterého je požadavek zaslán. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopID)
$x_e_shop_order_guid = "x_e_shop_order_guid_example"; // string | Jedinečné GUID eshop objednávky, přidělené registračním endpointem. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopOrderGUID)

try {
    $apiInstance->uiNewconfirmcodePost($x_bp_card_number, $x_e_shop_id, $x_e_shop_order_guid);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->uiNewconfirmcodePost: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$x_bp_card_number = "x_bp_card_number_example"; // string | Číslo BP karty, ve formátu s pomlčkami. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-BPCardNumber)
$x_e_shop_id = "x_e_shop_id_example"; // string | GUID eshopu, ze kterého je požadavek zaslán. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopID)
$x_e_shop_order_guid = "x_e_shop_order_guid_example"; // string | Jedinečné GUID eshop objednávky, přidělené registračním endpointem. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopOrderGUID)

try {
    $result = $apiInstance->uiOrderPost($x_bp_card_number, $x_e_shop_id, $x_e_shop_order_guid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->uiOrderPost: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new BenefitPlus\Api\DefaultApi(
    // 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()
);
$x_bp_card_number = "x_bp_card_number_example"; // string | Číslo BP karty, ve formátu s pomlčkami. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-BPCardNumber)
$x_e_shop_id = "x_e_shop_id_example"; // string | GUID eshopu, ze kterého je požadavek zaslán. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopID)
$x_e_shop_order_guid = "x_e_shop_order_guid_example"; // string | Jedinečné GUID eshop objednávky, přidělené registračním endpointem. [Online dokumentace je dostupná zde](https://benefit-kelnero.atlassian.net/wiki/spaces/NPBBP/pages/1448902683/Platebn+br+na+pro+e-shopy+v2+-+HTTP+hlavi+ky+a+URL+parametry#X-EShopOrderGUID)

try {
    $result = $apiInstance->uiPreorderPost($x_bp_card_number, $x_e_shop_id, $x_e_shop_order_guid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->uiPreorderPost: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://inside.benefit-plus.eu/api_PG/v2

Class Method HTTP request Description
DefaultApi eshopsEshopGUIDEshopordersEshopOrderGUIDCancelPost POST /eshops/{eshopGUID}/eshoporders/{eshopOrderGUID}/_cancel Stornování objednávky ze strany eshopu.
DefaultApi eshopsEshopGUIDEshopordersEshopOrderGUIDGet GET /eshops/{eshopGUID}/eshoporders/{eshopOrderGUID} Zjištění stavu objednávky ze strany eshopu.
DefaultApi eshopsEshopGUIDEshopordersPost POST /eshops/{eshopGUID}/eshoporders Zaregistrování objednávky ze strany eshopu.
DefaultApi uiConfirmPost POST /_ui/_confirm Pokusí se již existující objednávku zaplatit.
DefaultApi uiNewconfirmcodePost POST /_ui/_newconfirmcode Zašle zákazníkovi nový potvrzovací kód (SMS zprávu) k již existující objednávce.
DefaultApi uiOrderPost POST /_ui/_order Vytvoří objednávku.
DefaultApi uiPreorderPost POST /_ui/_preorder Nasimuluje vytvoření objednávky.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author