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
18 changes: 9 additions & 9 deletions code-samples-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/create_payment.php"
"$ref":"./code_samples/php/v2.0.0/create_payment.php"
}
}
]
Expand All @@ -48,7 +48,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/get_available_payment_methods.php"
"$ref":"./code_samples/php/v2.0.0/get_available_payment_methods.php"
}
}
]
Expand All @@ -75,7 +75,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/get_payment_status.php"
"$ref":"./code_samples/php/v2.0.0/get_payment_status.php"
}
}
]
Expand All @@ -102,7 +102,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/chargeback.php"
"$ref":"./code_samples/php/v2.0.0/chargeback.php"
}
}
]
Expand All @@ -127,7 +127,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/cancel_payment.php"
"$ref":"./code_samples/php/v2.0.0/cancel_payment.php"
}
}
]
Expand All @@ -154,7 +154,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/create_payment_direct.php"
"$ref":"./code_samples/php/v2.0.0/create_payment_direct.php"
}
}
]
Expand All @@ -181,7 +181,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/set_colors.php"
"$ref":"./code_samples/php/v2.0.0/set_colors.php"
}
}
]
Expand All @@ -208,7 +208,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/set_logo.php"
"$ref":"./code_samples/php/v2.0.0/set_logo.php"
}
}
]
Expand All @@ -235,7 +235,7 @@
"lang":"PHP",
"label":"SDK",
"source":{
"$ref":"./code_samples/php/v1.0.0/get_access_token.php"
"$ref":"./code_samples/php/v2.0.0/get_access_token.php"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Gateway appearances can be change only in **PRODUCTION** mode.

## Logo

import setLogo from '!!raw-loader!@site/code_samples/php/v1.0.0/set_logo.php';
import setLogo from '!!raw-loader!@site/code_samples/php/v2.0.0/set_logo.php';

<CodeBlock language="php">{setLogo}</CodeBlock>

## Colors

import setColors from '!!raw-loader!@site/code_samples/php/v1.0.0/set_colors.php';
import setColors from '!!raw-loader!@site/code_samples/php/v2.0.0/set_colors.php';

<CodeBlock language="php">{setColors}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from '@site/src/components/Button';
import CodeBlock from '@theme/CodeBlock';
import getAvailablePaymentMethods from '!!raw-loader!@site/code_samples/php/v1.0.0/get_available_payment_methods.php';
import getAvailablePaymentMethods from '!!raw-loader!@site/code_samples/php/v2.0.0/get_available_payment_methods.php';

# Getting available methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This operation can be used with any payment method, but only if it is in `author

In the case of payment method `PAY_LATER`, this method can also be used if `authorization_status=AUTH_DONE` and at the same time payment `status=CUSTOMER_CREATION_IN_PROGRESS`.

import cancelPayment from '!!raw-loader!@site/code_samples/php/v1.0.0/cancel_payment.php';
import cancelPayment from '!!raw-loader!@site/code_samples/php/v2.0.0/cancel_payment.php';

<CodeBlock language="php">{cancelPayment}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The merchant can also make a full or partial return of the transaction through C
Returns can only be made on successful payments, including completed pre-authorisations, as well as on payments on which a return has already been made, and the amount of the return must not exceed the original amount of the payment (in the case of a pre-authorisation, it is the amount with which the pre-authorisation was confirmed).


import chargeBack from '!!raw-loader!@site/code_samples/php/v1.0.0/chargeback.php';
import chargeBack from '!!raw-loader!@site/code_samples/php/v2.0.0/chargeback.php';

<CodeBlock language="php">{chargeBack}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from '@site/src/components/Button';
import CodeBlock from '@theme/CodeBlock';
import createPayment from '!!raw-loader!@site/code_samples/php/v1.0.0/create_payment.php';
import createPayment from '!!raw-loader!@site/code_samples/php/v2.0.0/create_payment.php';

# Create Payment

Expand Down Expand Up @@ -55,7 +55,7 @@ $response = $tatrapayplus_api->initiatePayment(

### Redirect URI

Redirect URI is used as return address after customer finishes payment. This URI is necessary and is used to [process result of the payment](/docs/libraries/php/v1.0.0/process_payment).
Redirect URI is used as return address after customer finishes payment. This URI is necessary and is used to [process result of the payment](/docs/libraries/php/v2.0.0/process_payment).

If your application serves multiple locales with distinct URIs for example:
- https://example.com for one locale
Expand Down Expand Up @@ -168,7 +168,7 @@ $payment_id = $response_obj->getPaymentId();
$tatra_pay_plus_url = $response_obj->getTatraPayPlusUrl();
```

You should save `$payment_id` to your order associated with this payment. You will later need it to [retrieve status of payment](/docs/libraries/php/v1.0.0/process_payment).
You should save `$payment_id` to your order associated with this payment. You will later need it to [retrieve status of payment](/docs/libraries/php/v2.0.0/process_payment).
Then you have two options of displaying payment gateway:
1. Simply redirect user to gateway, field `$tatra_pay_plus_url`.
2. Show payme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Most of the implementation detail are already covered in [Developer portal docum

SDK provides a wrapper around API that can be used in following way:

import createPaymentDirect from '!!raw-loader!@site/code_samples/php/v1.0.0/create_payment_direct.php';
import createPaymentDirect from '!!raw-loader!@site/code_samples/php/v2.0.0/create_payment_direct.php';

<CodeBlock language="php">{createPaymentDirect}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To be able to use and test payment gateway you need to have **Client ID** and **

# Installation

Na inštaláciu PHP SDK je potrebné nainštalovať knižnicu `tatrapayplus/tatrapayplus_api_client` cez composer.
To install PHP SDK, you need to install `tatrapayplus/tatrapayplus_api_client` library via composer.

# Client initialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ConsoleLogger extends TatraPayPlusLogger
print $line;
}
}

```
### Step 2: Inject the Logger into the API

```php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import CodeBlock from '@theme/CodeBlock';
We recommend to use the "pre-authorization" transaction type when expecting an increased number of cancellation requests or partial cancellation of payments due to unavailability of goods/services, changes in the price of the order, etc.
If you want to use pre-authorization for card payments you can pass `is_pre_authorization: true` while initiating payment.

import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/php/v1.0.0/create_payment_pre_authorization.php';
import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/php/v2.0.0/create_payment_pre_authorization.php';

<CodeBlock language="php">{createPaymentPreAuthorization}</CodeBlock>

In case of payment by pre-authorisation, the merchant is obliged to ensure the termination/cancellation of the pre-authorisation by **calling the online interface within 7 days** from the date on which the pre-authorisation was made.
If the merchant performs a pre-authorisation transaction for the purpose of [registering the card for ComfortPay](/docs/libraries/php/v1.0.0/save_card), the transaction will not be cleared and will be released to the cardholder by the cardholder's bank within a few days.
If the merchant performs a pre-authorisation transaction for the purpose of [registering the card for ComfortPay](/docs/libraries/php/v2.0.0/save_card), the transaction will not be cleared and will be released to the cardholder by the cardholder's bank within a few days.
We do not recommend making a subsequent reversal of this type of transaction. This is due to the authorization message containing all the information for a future recurring payment.
There is a risk that the customer's bank will not retain this information as part of the cancellation of the transaction.


import confirmCancelPreAuthorization from '!!raw-loader!@site/code_samples/php/v1.0.0/confirm_cancel_pre_authorization.php';
import confirmCancelPreAuthorization from '!!raw-loader!@site/code_samples/php/v2.0.0/confirm_cancel_pre_authorization.php';

<CodeBlock language="php">{confirmCancelPreAuthorization}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ https://theredirecturl.com/redirect?paymentId=e43f85a2-b21f-4ec2-b0a1-0e449d6972

Based on received GET params you should retrieve status of payment as following:

import getPaymentStatus from '!!raw-loader!@site/code_samples/php/v1.0.0/get_payment_status.php';
import getPaymentStatus from '!!raw-loader!@site/code_samples/php/v2.0.0/get_payment_status.php';

<CodeBlock language="php">{getPaymentStatus}</CodeBlock>

Expand All @@ -47,7 +47,7 @@ Your implementation should take the appropriate action based on the value of `si
`$response['object']` of type `PaymentIntentStatusResponse` contains all the information based on structure described in [API reference](/docs/api/get-payment-intent-status).

The response also includes saved card information (if the customer chooses to save their card details).
More details on this feature can be found [💳 here 💳](/docs/libraries/php/v1.0.0/save_card).
More details on this feature can be found [💳 here 💳](/docs/libraries/php/v2.0.0/save_card).

## Periodical task

Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const config = {
},
{
label: "PHP",
href: "/docs/libraries/php/v1.0.0/",
href: "/docs/libraries/php/v2.0.0/",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/node/

<CodeBlock language="jsx">{createPaymentPreAuthorization}</CodeBlock>

V prípade platby prostredníctvom predautorizácie je obchodník povinný zabezpečiť ukončenie/zrušenie predautorizácie **zavolaním na online rozhranie do 7 dní** od dátumu, kedy bola predautorizácia vykonaná.
V prípade platby prostredníctvom predautorizácie je obchodník povinný zabezpečiť ukončenie/zrušenie predautorizácie **zavolaním na online rozhranie do 7 dní** od dátumu, kedy bola predautorizácia vykonaná.\
Ak obchodník vykoná transakciu predautorizácie za účelom [registrácie karty pre ComfortPay](/docs/libraries/node/v1.0.0/save_card), transakcia nebude zúčtovaná a bude držiteľovi karty uvoľnená bankou držiteľa karty v priebehu niekoľkých dní.
Neodporúčame vykonávať následné storno tohto typu transakcie. Je to z dôvodu, že autorizačná správa obsahuje všetky informácie pre budúcu opakovanú platbu.
Existuje riziko, že banka zákazníka si tieto informácie v rámci zrušenia transakcie neuchová.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Vzhľad brány je možné zmeniť iba v móde **PRODUCTION**.

## Logo

import setLogo from '!!raw-loader!@site/code_samples/php/v1.0.0/set_logo.php';
import setLogo from '!!raw-loader!@site/code_samples/php/v2.0.0/set_logo.php';

<CodeBlock language="php">{setLogo}</CodeBlock>

## Farby

import setColors from '!!raw-loader!@site/code_samples/php/v1.0.0/set_colors.php';
import setColors from '!!raw-loader!@site/code_samples/php/v2.0.0/set_colors.php';

<CodeBlock language="php">{setColors}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from '@site/src/components/Button';
import CodeBlock from '@theme/CodeBlock';
import getAvailablePaymentMethods from '!!raw-loader!@site/code_samples/php/v1.0.0/get_available_payment_methods.php';
import getAvailablePaymentMethods from '!!raw-loader!@site/code_samples/php/v2.0.0/get_available_payment_methods.php';

# Získanie dostupných metód

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Túto operáciu je možné použiť s akoukoľvek platobnou metódou, ale iba ak

V prípade platobnej metódy „PAY_LATER“ je možné túto metódu použiť aj vtedy, ak `authorization_status=AUTH_DONE` a zároveň platba obsahuje `status=CUSTOMER_CREATION_IN_PROGRESS`.

import cancelPayment from '!!raw-loader!@site/code_samples/php/v1.0.0/cancel_payment.php';
import cancelPayment from '!!raw-loader!@site/code_samples/php/v2.0.0/cancel_payment.php';

<CodeBlock language="php">{cancelPayment}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Obchodník môže vykonať úplné alebo čiastočné vrátenie platby cez CardP
Vrátenie platby je možné len pri úspešných platbách vrátane dokončených predautorizácií, ako aj pri platbách, pri ktorých už bolo vrátenie vykonané, pričom výška vrátenia nesmie presiahnuť pôvodnú sumu platby (v prípade predautorizácie ide o sumu, ktorou bola predautorizácia potvrdená).


import chargeBack from '!!raw-loader!@site/code_samples/php/v1.0.0/chargeback.php';
import chargeBack from '!!raw-loader!@site/code_samples/php/v2.0.0/chargeback.php';

<CodeBlock language="php">{chargeBack}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from '@site/src/components/Button';
import CodeBlock from '@theme/CodeBlock';
import createPayment from '!!raw-loader!@site/code_samples/php/v1.0.0/create_payment.php';
import createPayment from '!!raw-loader!@site/code_samples/php/v2.0.0/create_payment.php';

# Vytvorenie platby

Expand Down Expand Up @@ -56,7 +56,7 @@ $response = $tatrapayplus_api->initiatePayment(

### Presmerovanie na URI

`redirect_uri` je použitá ako návratová adresa zákazníka po vykonaní platby. Táto URI je povinná a slúži na [spracovanie výsledku platby](/docs/libraries/php/v1.0.0/process_payment).
`redirect_uri` je použitá ako návratová adresa zákazníka po vykonaní platby. Táto URI je povinná a slúži na [spracovanie výsledku platby](/docs/libraries/php/v2.0.0/process_payment).

Ak vaša aplikácia poskytuje viacero jazykov s odlišnými URI, ako napr.:
- https://example.com pre 1 jazyk
Expand Down Expand Up @@ -170,7 +170,7 @@ $payment_id = $response_obj->getPaymentId();
$tatra_pay_plus_url = $response_obj->getTatraPayPlusUrl();
```

Mali ste si uložiť `payment_id` k objednávke spojenej s danou platbou. Neskôr ho budete potrebovať pre [zistenie stavu platby](/docs/libraries/php/v1.0.0/process_payment).
Mali ste si uložiť `payment_id` k objednávke spojenej s danou platbou. Neskôr ho budete potrebovať pre [zistenie stavu platby](/docs/libraries/php/v2.0.0/process_payment).
Následne máte 2 možnosti pre zobrazenie platobnej brány:
1. Presmerujete zákazník na bránu, podľa url z atribútu `tatra_pay_plus_url`.
2. Zobrazenie v iframe. Pre detailné informácie o použití iframe zobrazenia prosím navštívte [Developer portál dokumentáciu](https://developer.tatrabanka.sk/apihub/#/apis/f438e906-7845-4bc1-a028-73d3f9547d2a/show/doc?mode=view&uri=iFrame-podpora)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Väčšina detailov implementácie je už zahrnutá v [Developer portál dokumen

SDK poskytuje wrapper okolo API, ktorý je možné použiť nasledujúcim spôsobom:

import createPaymentDirect from '!!raw-loader!@site/code_samples/php/v1.0.0/create_payment_direct.php';
import createPaymentDirect from '!!raw-loader!@site/code_samples/php/v2.0.0/create_payment_direct.php';

<CodeBlock language="php">{createPaymentDirect}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Aby ste mohli používať a testovať platobnú bránu, potrebujete **Client ID*

# Inštalácia

🚧 WIP 🚧
Na inštaláciu PHP SDK je potrebné nainštalovať knižnicu `tatrapayplus/tatrapayplus_api_client` cez composer.

# Vytvorenie API klienta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ConsoleLogger extends TatraPayPlusLogger
print $line;
}
}

```
### Krok 2: Vloženie loggeru do klienta

```php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import CodeBlock from '@theme/CodeBlock';
Odporúčame použiť typ transakcie „predautorizácia“ v prípade predpokladu zvýšeného počtu žiadostí o zrušenie alebo čiastočného zrušenia platieb z dôvodu nedostupnosti tovaru/služieb, zmien ceny objednávky a pod.
Ak chcete použiť predautorizáciu pre platby kartou, môžete pri iniciovaní platby zadať `is_pre_authorization: true`.

import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/php/v1.0.0/create_payment_pre_authorization.php';
import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/php/v2.0.0/create_payment_pre_authorization.php';

<CodeBlock language="php">{createPaymentPreAuthorization}</CodeBlock>

V prípade platby prostredníctvom predautorizácie je obchodník povinný zabezpečiť ukončenie/zrušenie predautorizácie **zavolaním na online rozhranie do 7 dní** od dátumu, kedy bola predautorizácia vykonaná.
Ak obchodník vykoná transakciu predautorizácie za účelom [registrácie karty pre ComfortPay](/docs/libraries/php/v1.0.0/save_card), transakcia nebude zúčtovaná a bude držiteľovi karty uvoľnená bankou držiteľa karty v priebehu niekoľkých dní.
V prípade platby prostredníctvom predautorizácie je obchodník povinný zabezpečiť ukončenie/zrušenie predautorizácie **zavolaním na online rozhranie do 7 dní** od dátumu, kedy bola predautorizácia vykonaná.\
Ak obchodník vykoná transakciu predautorizácie za účelom [registrácie karty pre ComfortPay](/docs/libraries/php/v2.0.0/save_card), transakcia nebude zúčtovaná a bude držiteľovi karty uvoľnená bankou držiteľa karty v priebehu niekoľkých dní.
Neodporúčame vykonávať následné storno tohto typu transakcie. Je to z dôvodu, že autorizačná správa obsahuje všetky informácie pre budúcu opakovanú platbu.
Existuje riziko, že banka zákazníka si tieto informácie v rámci zrušenia transakcie neuchová.


import confirmCancelPreAuthorization from '!!raw-loader!@site/code_samples/php/v1.0.0/confirm_cancel_pre_authorization.php';
import confirmCancelPreAuthorization from '!!raw-loader!@site/code_samples/php/v2.0.0/confirm_cancel_pre_authorization.php';

<CodeBlock language="php">{confirmCancelPreAuthorization}</CodeBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ https://theredirecturl.com/redirect?paymentId=e43f85a2-b21f-4ec2-b0a1-0e449d6972

Na základe prijatých parametrov GET by ste mali získať stav platby nasledovne:

import getPaymentStatus from '!!raw-loader!@site/code_samples/php/v1.0.0/get_payment_status.php';
import getPaymentStatus from '!!raw-loader!@site/code_samples/php/v2.0.0/get_payment_status.php';

<CodeBlock language="php">{getPaymentStatus}</CodeBlock>

Expand All @@ -47,7 +47,7 @@ Vaša implementácia by mala vykonať príslušné akcie na základe hodnoty `si
`$response['object']` typu `PaymentIntentStatusResponse` obsahuje všetky informácie na základe štruktúry opísanej v [API príručke](/docs/api/get-payment-intent-status).

Odpoveď obsahuje aj uložené informácie o karte (ak sa zákazník rozhodne uložiť údaje o svojej karte).
Viac podrobností o tejto funkcii nájdete [💳 tu 💳](/docs/libraries/php/v1.0.0/save_card).
Viac podrobností o tejto funkcii nájdete [💳 tu 💳](/docs/libraries/php/v2.0.0/save_card).

## Periodická úloha

Expand Down
Loading