From e07093f1edc8c5e1d02ccaa56fd536e9cc52f447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=BDubom=C3=ADr=20Samotn=C3=BD?= Date: Mon, 12 May 2025 13:21:22 +0200 Subject: [PATCH 1/2] triv: update code samples after new project testing --- code_samples/php/v2.0.0/create_payment.php | 4 +--- .../php/v2.0.0/create_payment_pre_authorization.php | 4 +--- docs/libraries/php/v2.0.0/save_card.mdx | 8 ++------ .../current/libraries/php/v2.0.0/save_card.mdx | 8 ++------ 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/code_samples/php/v2.0.0/create_payment.php b/code_samples/php/v2.0.0/create_payment.php index 0b1c994..9a0aa67 100644 --- a/code_samples/php/v2.0.0/create_payment.php +++ b/code_samples/php/v2.0.0/create_payment.php @@ -19,9 +19,7 @@ "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ - "variable_symbol" => "ORDER123456", - ]), + "end_to_end" => "ORDER123456", ]), "bank_transfer" => new Tatrapayplus\TatrapayplusApiClient\Model\BankTransfer(), "user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([ diff --git a/code_samples/php/v2.0.0/create_payment_pre_authorization.php b/code_samples/php/v2.0.0/create_payment_pre_authorization.php index f9a8de5..6566011 100644 --- a/code_samples/php/v2.0.0/create_payment_pre_authorization.php +++ b/code_samples/php/v2.0.0/create_payment_pre_authorization.php @@ -12,9 +12,7 @@ "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ - "variable_symbol" => "ORDER123456", - ]), + "end_to_end" => "ORDER123456", ]), "bank_transfer" => new Tatrapayplus\TatrapayplusApiClient\Model\BankTransfer(), "card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([ diff --git a/docs/libraries/php/v2.0.0/save_card.mdx b/docs/libraries/php/v2.0.0/save_card.mdx index 1bf3c50..922d328 100644 --- a/docs/libraries/php/v2.0.0/save_card.mdx +++ b/docs/libraries/php/v2.0.0/save_card.mdx @@ -19,9 +19,7 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ - "variable_symbol" => "ORDER123456", - ]), + "end_to_end" => "ORDER123456", ]), "card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([ "card_holder" => "Janko Hrasko", @@ -71,9 +69,7 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ - "variable_symbol" => "ORDER123456", - ]), + "end_to_end" => "ORDER123456", ]), "user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([ "first_name" => "Janko", diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/save_card.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/save_card.mdx index 47e379f..55cad09 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/save_card.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/save_card.mdx @@ -19,9 +19,7 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ - "variable_symbol" => "ORDER123456", - ]), + "end_to_end" => "ORDER123456", ]), "card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([ "card_holder" => "Janko Hrasko", @@ -71,9 +69,7 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ - "variable_symbol" => "ORDER123456", - ]), + "end_to_end" => "ORDER123456", ]), "user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([ "first_name" => "Janko", From 73c949e19bf2986ce480ba041dedb25f50fe04df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=BDubom=C3=ADr=20Samotn=C3=BD?= Date: Mon, 12 May 2025 14:09:52 +0200 Subject: [PATCH 2/2] triv: add composer installation instructions --- code_samples/php/v2.0.0/create_payment.php | 6 +++++- .../create_payment_pre_authorization.php | 6 +++++- docs/libraries/php/v2.0.0/index.mdx | 20 ++++++++++++++++++- docs/libraries/php/v2.0.0/save_card.mdx | 12 +++++++++-- .../current/libraries/php/v2.0.0/index.mdx | 20 ++++++++++++++++++- .../libraries/php/v2.0.0/save_card.mdx | 12 +++++++++-- 6 files changed, 68 insertions(+), 8 deletions(-) diff --git a/code_samples/php/v2.0.0/create_payment.php b/code_samples/php/v2.0.0/create_payment.php index 9a0aa67..8bd5a9f 100644 --- a/code_samples/php/v2.0.0/create_payment.php +++ b/code_samples/php/v2.0.0/create_payment.php @@ -19,7 +19,11 @@ "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => "ORDER123456", + "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ + "variable_symbol" => "1", + "specific_symbol" => "2", + "constant_symbol" => "3", + ]), ]), "bank_transfer" => new Tatrapayplus\TatrapayplusApiClient\Model\BankTransfer(), "user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([ diff --git a/code_samples/php/v2.0.0/create_payment_pre_authorization.php b/code_samples/php/v2.0.0/create_payment_pre_authorization.php index 6566011..1d987db 100644 --- a/code_samples/php/v2.0.0/create_payment_pre_authorization.php +++ b/code_samples/php/v2.0.0/create_payment_pre_authorization.php @@ -12,7 +12,11 @@ "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => "ORDER123456", + "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ + "variable_symbol" => "1", + "specific_symbol" => "2", + "constant_symbol" => "3", + ]), ]), "bank_transfer" => new Tatrapayplus\TatrapayplusApiClient\Model\BankTransfer(), "card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([ diff --git a/docs/libraries/php/v2.0.0/index.mdx b/docs/libraries/php/v2.0.0/index.mdx index fc904e1..f5cbbfa 100644 --- a/docs/libraries/php/v2.0.0/index.mdx +++ b/docs/libraries/php/v2.0.0/index.mdx @@ -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 + 10.0, "currency" => "EUR", ]), - "end_to_end" => "ORDER123456", + "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ + "variable_symbol" => "1", + "specific_symbol" => "2", + "constant_symbol" => "3", + ]), ]), "card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([ "card_holder" => "Janko Hrasko", @@ -69,7 +73,11 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => "ORDER123456", + "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ + "variable_symbol" => "1", + "specific_symbol" => "2", + "constant_symbol" => "3", + ]), ]), "user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([ "first_name" => "Janko", diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx index 54edac3..40d9d2d 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx @@ -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 + 10.0, "currency" => "EUR", ]), - "end_to_end" => "ORDER123456", + "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ + "variable_symbol" => "1", + "specific_symbol" => "2", + "constant_symbol" => "3", + ]), ]), "card_detail" => new Tatrapayplus\TatrapayplusApiClient\Model\CardDetail([ "card_holder" => "Janko Hrasko", @@ -69,7 +73,11 @@ $initiate_payment_request = new Tatrapayplus\TatrapayplusApiClient\Model\Initiat "amount_value" => 10.0, "currency" => "EUR", ]), - "end_to_end" => "ORDER123456", + "end_to_end" => new Tatrapayplus\TatrapayplusApiClient\Model\E2e([ + "variable_symbol" => "1", + "specific_symbol" => "2", + "constant_symbol" => "3", + ]), ]), "user_data" => new Tatrapayplus\TatrapayplusApiClient\Model\UserData([ "first_name" => "Janko",