diff --git a/code-samples-map.json b/code-samples-map.json index 11d140a..53a9539 100644 --- a/code-samples-map.json +++ b/code-samples-map.json @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] @@ -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" } } ] diff --git a/code_samples/php/v1.0.0/cancel_payment.php b/code_samples/php/v2.0.0/cancel_payment.php similarity index 100% rename from code_samples/php/v1.0.0/cancel_payment.php rename to code_samples/php/v2.0.0/cancel_payment.php diff --git a/code_samples/php/v1.0.0/chargeback.php b/code_samples/php/v2.0.0/chargeback.php similarity index 100% rename from code_samples/php/v1.0.0/chargeback.php rename to code_samples/php/v2.0.0/chargeback.php diff --git a/code_samples/php/v1.0.0/confirm_cancel_pre_authorization.php b/code_samples/php/v2.0.0/confirm_cancel_pre_authorization.php similarity index 100% rename from code_samples/php/v1.0.0/confirm_cancel_pre_authorization.php rename to code_samples/php/v2.0.0/confirm_cancel_pre_authorization.php diff --git a/code_samples/php/v1.0.0/create_payment.php b/code_samples/php/v2.0.0/create_payment.php similarity index 100% rename from code_samples/php/v1.0.0/create_payment.php rename to code_samples/php/v2.0.0/create_payment.php diff --git a/code_samples/php/v1.0.0/create_payment_direct.php b/code_samples/php/v2.0.0/create_payment_direct.php similarity index 100% rename from code_samples/php/v1.0.0/create_payment_direct.php rename to code_samples/php/v2.0.0/create_payment_direct.php diff --git a/code_samples/php/v1.0.0/create_payment_pre_authorization.php b/code_samples/php/v2.0.0/create_payment_pre_authorization.php similarity index 100% rename from code_samples/php/v1.0.0/create_payment_pre_authorization.php rename to code_samples/php/v2.0.0/create_payment_pre_authorization.php diff --git a/code_samples/php/v1.0.0/get_access_token.php b/code_samples/php/v2.0.0/get_access_token.php similarity index 100% rename from code_samples/php/v1.0.0/get_access_token.php rename to code_samples/php/v2.0.0/get_access_token.php diff --git a/code_samples/php/v1.0.0/get_available_payment_methods.php b/code_samples/php/v2.0.0/get_available_payment_methods.php similarity index 100% rename from code_samples/php/v1.0.0/get_available_payment_methods.php rename to code_samples/php/v2.0.0/get_available_payment_methods.php diff --git a/code_samples/php/v1.0.0/get_payment_status.php b/code_samples/php/v2.0.0/get_payment_status.php similarity index 100% rename from code_samples/php/v1.0.0/get_payment_status.php rename to code_samples/php/v2.0.0/get_payment_status.php diff --git a/code_samples/php/v1.0.0/set_colors.php b/code_samples/php/v2.0.0/set_colors.php similarity index 100% rename from code_samples/php/v1.0.0/set_colors.php rename to code_samples/php/v2.0.0/set_colors.php diff --git a/code_samples/php/v1.0.0/set_logo.php b/code_samples/php/v2.0.0/set_logo.php similarity index 100% rename from code_samples/php/v1.0.0/set_logo.php rename to code_samples/php/v2.0.0/set_logo.php diff --git a/docs/libraries/php/v1.0.0/appearances.mdx b/docs/libraries/php/v2.0.0/appearances.mdx similarity index 81% rename from docs/libraries/php/v1.0.0/appearances.mdx rename to docs/libraries/php/v2.0.0/appearances.mdx index 5c0be24..6094fa0 100644 --- a/docs/libraries/php/v1.0.0/appearances.mdx +++ b/docs/libraries/php/v2.0.0/appearances.mdx @@ -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'; {setLogo} ## 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'; {setColors} diff --git a/docs/libraries/php/v1.0.0/available_methods.mdx b/docs/libraries/php/v2.0.0/available_methods.mdx similarity index 93% rename from docs/libraries/php/v1.0.0/available_methods.mdx rename to docs/libraries/php/v2.0.0/available_methods.mdx index cedc7ae..e36a77b 100644 --- a/docs/libraries/php/v1.0.0/available_methods.mdx +++ b/docs/libraries/php/v2.0.0/available_methods.mdx @@ -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 diff --git a/docs/libraries/php/v1.0.0/cancel_payment.mdx b/docs/libraries/php/v2.0.0/cancel_payment.mdx similarity index 95% rename from docs/libraries/php/v1.0.0/cancel_payment.mdx rename to docs/libraries/php/v2.0.0/cancel_payment.mdx index 257f05b..b1b574d 100644 --- a/docs/libraries/php/v1.0.0/cancel_payment.mdx +++ b/docs/libraries/php/v2.0.0/cancel_payment.mdx @@ -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'; {cancelPayment} diff --git a/docs/libraries/php/v1.0.0/chargeback.mdx b/docs/libraries/php/v2.0.0/chargeback.mdx similarity index 90% rename from docs/libraries/php/v1.0.0/chargeback.mdx rename to docs/libraries/php/v2.0.0/chargeback.mdx index f7d7767..56d80fc 100644 --- a/docs/libraries/php/v1.0.0/chargeback.mdx +++ b/docs/libraries/php/v2.0.0/chargeback.mdx @@ -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'; {chargeBack} diff --git a/docs/libraries/php/v1.0.0/create_payment.mdx b/docs/libraries/php/v2.0.0/create_payment.mdx similarity index 97% rename from docs/libraries/php/v1.0.0/create_payment.mdx rename to docs/libraries/php/v2.0.0/create_payment.mdx index d7bd370..7731208 100644 --- a/docs/libraries/php/v1.0.0/create_payment.mdx +++ b/docs/libraries/php/v2.0.0/create_payment.mdx @@ -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 @@ -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 @@ -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 diff --git a/docs/libraries/php/v1.0.0/errors_handling.mdx b/docs/libraries/php/v2.0.0/errors_handling.mdx similarity index 100% rename from docs/libraries/php/v1.0.0/errors_handling.mdx rename to docs/libraries/php/v2.0.0/errors_handling.mdx diff --git a/docs/libraries/php/v1.0.0/google_apple_pay.mdx b/docs/libraries/php/v2.0.0/google_apple_pay.mdx similarity index 93% rename from docs/libraries/php/v1.0.0/google_apple_pay.mdx rename to docs/libraries/php/v2.0.0/google_apple_pay.mdx index c380489..20d10ce 100644 --- a/docs/libraries/php/v1.0.0/google_apple_pay.mdx +++ b/docs/libraries/php/v2.0.0/google_apple_pay.mdx @@ -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'; {createPaymentDirect} diff --git a/docs/libraries/php/v1.0.0/index.mdx b/docs/libraries/php/v2.0.0/index.mdx similarity index 85% rename from docs/libraries/php/v1.0.0/index.mdx rename to docs/libraries/php/v2.0.0/index.mdx index 36e53bc..fc904e1 100644 --- a/docs/libraries/php/v1.0.0/index.mdx +++ b/docs/libraries/php/v2.0.0/index.mdx @@ -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 diff --git a/docs/libraries/php/v1.0.0/logging.mdx b/docs/libraries/php/v2.0.0/logging.mdx similarity index 99% rename from docs/libraries/php/v1.0.0/logging.mdx rename to docs/libraries/php/v2.0.0/logging.mdx index c24eff8..b60c8c4 100644 --- a/docs/libraries/php/v1.0.0/logging.mdx +++ b/docs/libraries/php/v2.0.0/logging.mdx @@ -47,7 +47,7 @@ class ConsoleLogger extends TatraPayPlusLogger print $line; } } - +``` ### Step 2: Inject the Logger into the API ```php diff --git a/docs/libraries/php/v1.0.0/pre_authorization.mdx b/docs/libraries/php/v2.0.0/pre_authorization.mdx similarity index 89% rename from docs/libraries/php/v1.0.0/pre_authorization.mdx rename to docs/libraries/php/v2.0.0/pre_authorization.mdx index ca0f73f..6507ed8 100644 --- a/docs/libraries/php/v1.0.0/pre_authorization.mdx +++ b/docs/libraries/php/v2.0.0/pre_authorization.mdx @@ -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'; {createPaymentPreAuthorization} 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'; {confirmCancelPreAuthorization} diff --git a/docs/libraries/php/v1.0.0/process_payment.mdx b/docs/libraries/php/v2.0.0/process_payment.mdx similarity index 97% rename from docs/libraries/php/v1.0.0/process_payment.mdx rename to docs/libraries/php/v2.0.0/process_payment.mdx index 2a60d0b..a547d67 100644 --- a/docs/libraries/php/v1.0.0/process_payment.mdx +++ b/docs/libraries/php/v2.0.0/process_payment.mdx @@ -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'; {getPaymentStatus} @@ -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 diff --git a/docs/libraries/php/v1.0.0/save_card.mdx b/docs/libraries/php/v2.0.0/save_card.mdx similarity index 100% rename from docs/libraries/php/v1.0.0/save_card.mdx rename to docs/libraries/php/v2.0.0/save_card.mdx diff --git a/docusaurus.config.js b/docusaurus.config.js index cc58478..8c0bd45 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -116,7 +116,7 @@ const config = { }, { label: "PHP", - href: "/docs/libraries/php/v1.0.0/", + href: "/docs/libraries/php/v2.0.0/", }, ], }, diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/node/v1.0.0/pre_authorization.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/node/v1.0.0/pre_authorization.mdx index 8789b59..a54ec39 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/node/v1.0.0/pre_authorization.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/node/v1.0.0/pre_authorization.mdx @@ -9,7 +9,7 @@ import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/node/ {createPaymentPreAuthorization} -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á. diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/appearances.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/appearances.mdx similarity index 81% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/appearances.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/appearances.mdx index c68a488..d08ab8f 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/appearances.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/appearances.mdx @@ -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'; {setLogo} ## 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'; {setColors} diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/available_methods.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/available_methods.mdx similarity index 93% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/available_methods.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/available_methods.mdx index ef1bc3f..5c9b15c 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/available_methods.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/available_methods.mdx @@ -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 diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/cancel_payment.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/cancel_payment.mdx similarity index 95% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/cancel_payment.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/cancel_payment.mdx index e99df1c..bb009a4 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/cancel_payment.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/cancel_payment.mdx @@ -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'; {cancelPayment} diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/chargeback.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/chargeback.mdx similarity index 90% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/chargeback.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/chargeback.mdx index 91f50ff..221572a 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/chargeback.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/chargeback.mdx @@ -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'; {chargeBack} diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/create_payment.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/create_payment.mdx similarity index 97% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/create_payment.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/create_payment.mdx index bba5ec5..9e7a60b 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/create_payment.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/create_payment.mdx @@ -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 @@ -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 @@ -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) diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/errors_handling.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/errors_handling.mdx similarity index 100% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/errors_handling.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/errors_handling.mdx diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/google_apple_pay.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/google_apple_pay.mdx similarity index 94% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/google_apple_pay.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/google_apple_pay.mdx index e400cb2..f518b28 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/google_apple_pay.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/google_apple_pay.mdx @@ -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'; {createPaymentDirect} diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/index.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx similarity index 85% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/index.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx index fdc246a..54edac3 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/index.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/index.mdx @@ -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 diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/logging.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/logging.mdx similarity index 99% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/logging.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/logging.mdx index 5b68532..09a6ef5 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/logging.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/logging.mdx @@ -47,7 +47,7 @@ class ConsoleLogger extends TatraPayPlusLogger print $line; } } - +``` ### Krok 2: Vloženie loggeru do klienta ```php diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/pre_authorization.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/pre_authorization.mdx similarity index 87% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/pre_authorization.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/pre_authorization.mdx index 3e6abbc..7265b23 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/pre_authorization.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/pre_authorization.mdx @@ -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'; {createPaymentPreAuthorization} -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'; {confirmCancelPreAuthorization} diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/process_payment.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/process_payment.mdx similarity index 97% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/process_payment.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/process_payment.mdx index 13e84cf..0cd6c78 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/process_payment.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/process_payment.mdx @@ -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'; {getPaymentStatus} @@ -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 diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/save_card.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/save_card.mdx similarity index 100% rename from i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v1.0.0/save_card.mdx rename to i18n/sk/docusaurus-plugin-content-docs/current/libraries/php/v2.0.0/save_card.mdx diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/python/v1.0.0/pre_authorization.mdx b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/python/v1.0.0/pre_authorization.mdx index ed067b7..b6ec60b 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/libraries/python/v1.0.0/pre_authorization.mdx +++ b/i18n/sk/docusaurus-plugin-content-docs/current/libraries/python/v1.0.0/pre_authorization.mdx @@ -9,7 +9,7 @@ import createPaymentPreAuthorization from '!!raw-loader!@site/code_samples/pytho {createPaymentPreAuthorization} -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/python/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á. diff --git a/sidebars.js b/sidebars.js index 11b2d9a..e254bc8 100644 --- a/sidebars.js +++ b/sidebars.js @@ -42,18 +42,18 @@ const sidebars = { "libraries/python/v1.0.0/errors_handling", ], phpSidebar: [ - "libraries/php/v1.0.0/index", - "libraries/php/v1.0.0/available_methods", - "libraries/php/v1.0.0/create_payment", - "libraries/php/v1.0.0/process_payment", - "libraries/php/v1.0.0/chargeback", - "libraries/php/v1.0.0/save_card", - "libraries/php/v1.0.0/pre_authorization", - "libraries/php/v1.0.0/google_apple_pay", - "libraries/php/v1.0.0/cancel_payment", - "libraries/php/v1.0.0/appearances", - "libraries/php/v1.0.0/logging", - "libraries/php/v1.0.0/errors_handling", + "libraries/php/v2.0.0/index", + "libraries/php/v2.0.0/available_methods", + "libraries/php/v2.0.0/create_payment", + "libraries/php/v2.0.0/process_payment", + "libraries/php/v2.0.0/chargeback", + "libraries/php/v2.0.0/save_card", + "libraries/php/v2.0.0/pre_authorization", + "libraries/php/v2.0.0/google_apple_pay", + "libraries/php/v2.0.0/cancel_payment", + "libraries/php/v2.0.0/appearances", + "libraries/php/v2.0.0/logging", + "libraries/php/v2.0.0/errors_handling", ], apisidebar: require("./docs/api/sidebar.ts").default, }; diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 8b4563b..ff50edc 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -47,7 +47,7 @@ export default function Home() { - + diff --git a/tatrapayplus_api_sandbox_final.json b/tatrapayplus_api_sandbox_final.json index 759110b..3df5fec 100644 --- a/tatrapayplus_api_sandbox_final.json +++ b/tatrapayplus_api_sandbox_final.json @@ -99,7 +99,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" } } ] @@ -179,7 +179,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" } } ] @@ -262,7 +262,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" } } ] @@ -351,7 +351,7 @@ "lang": "PHP", "label": "SDK", "source": { - "$ref": "./code_samples/php/v1.0.0/chargeback.php" + "$ref": "./code_samples/php/v2.0.0/chargeback.php" } } ] @@ -431,7 +431,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" } } ] @@ -519,7 +519,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" } } ] @@ -601,7 +601,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" } } ] @@ -683,7 +683,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" } } ] @@ -727,7 +727,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" } } ]