Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion code_samples/php/v2.0.0/create_payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"currency" => "EUR",
]),
"end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([
"variable_symbol" => "ORDER123456",
"variable_symbol" => "1",
"specific_symbol" => "2",
"constant_symbol" => "3",
]),
]),
"bank_transfer" => new Tatrapayplus\TatrapayplusApiClient\Model\BankTransfer(),
Expand Down
4 changes: 3 additions & 1 deletion code_samples/php/v2.0.0/create_payment_pre_authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"currency" => "EUR",
]),
"end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([
"variable_symbol" => "ORDER123456",
"variable_symbol" => "1",
"specific_symbol" => "2",
"constant_symbol" => "3",
]),
]),
"bank_transfer" => new Tatrapayplus\TatrapayplusApiClient\Model\BankTransfer(),
Expand Down
20 changes: 19 additions & 1 deletion docs/libraries/php/v2.0.0/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,31 @@ To be able to use and test payment gateway you need to have **Client ID** and **

# Installation

To install PHP SDK, you need to install `tatrapayplus/tatrapayplus_api_client` library via composer.
To install PHP SDK, you need to install `tatrapayplus/tatrapayplus_api_client` library via composer.\
Inside your `composer.json` file for your project, add new requirement:

```json
{
"name": "project name",
// ...
"require": {
// ...
"tatrapayplus/tatrapayplus_api_client": "2.0.0"
},
// ...
}
```

Afterwards, run command `composer install` to install new dependency.

# Client initialization

To start working with the API, you need to initialize the TatraPayPlusAPIApi with the following parameters:

```php
<?php
use Tatrapayplus\TatrapayplusApiClient\Api\TatraPayPlusAPIApi;

$tatrapayplus_api = new TatraPayPlusAPIApi(
"your-client-id",
"your-client-secret",
Expand Down
8 changes: 6 additions & 2 deletions docs/libraries/php/v2.0.0/save_card.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat
"currency" => "EUR",
]),
"end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([
"variable_symbol" => "ORDER123456",
"variable_symbol" => "1",
"specific_symbol" => "2",
"constant_symbol" => "3",
]),
]),
"card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([
Expand Down Expand Up @@ -72,7 +74,9 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat
"currency" => "EUR",
]),
"end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([
"variable_symbol" => "ORDER123456",
"variable_symbol" => "1",
"specific_symbol" => "2",
"constant_symbol" => "3",
]),
]),
"user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,31 @@ Aby ste mohli používať a testovať platobnú bránu, potrebujete **Client ID*

# Inštalácia

Na inštaláciu PHP SDK je potrebné nainštalovať knižnicu `tatrapayplus/tatrapayplus_api_client` cez composer.
Na inštaláciu PHP SDK je potrebné nainštalovať `tatrapayplus/tatrapayplus_api_client` cez composer.\
Do súboru `composer.json` pre váš projekt pridajte novú požiadavku:

```json
{
"name": "nazov projektu",
// ...
"require": {
// ...
"tatrapayplus/tatrapayplus_api_client": "2.0.0"
},
// ...
}
```

Následne spustite príkaz `composer install` pre inštaláciu balíka.

# Vytvorenie API klienta

Pre prácu s API potrebujete inicializovať TatraPayPlusAPIApi s nasledovnými parametrami:

```php
<?php
use Tatrapayplus\TatrapayplusApiClient\Api\TatraPayPlusAPIApi;

$tatrapayplus_api = new TatraPayPlusAPIApi(
"your-client-id",
"your-client-secret",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat
"currency" => "EUR",
]),
"end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([
"variable_symbol" => "ORDER123456",
"variable_symbol" => "1",
"specific_symbol" => "2",
"constant_symbol" => "3",
]),
]),
"card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([
Expand Down Expand Up @@ -72,7 +74,9 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat
"currency" => "EUR",
]),
"end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([
"variable_symbol" => "ORDER123456",
"variable_symbol" => "1",
"specific_symbol" => "2",
"constant_symbol" => "3",
]),
]),
"user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([
Expand Down