From dfd562b0aedbc910ac0ee7f5ee950260a532cb03 Mon Sep 17 00:00:00 2001 From: tymajiri <36740383+tymajiri@users.noreply.github.com> Date: Wed, 15 Oct 2025 15:35:46 +0200 Subject: [PATCH] Documentation - payment method URLs --- doc/create-payment.md | 13 +++++++++++++ doc/get-pay-urls-for-existing-payment.md | 22 ---------------------- doc/index.md | 2 -- 3 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 doc/get-pay-urls-for-existing-payment.md diff --git a/doc/create-payment.md b/doc/create-payment.md index eefcc90..9d4efa2 100644 --- a/doc/create-payment.md +++ b/doc/create-payment.md @@ -161,3 +161,16 @@ $tp-spacing: 0.75rem; If the buttons don’t render correctly (e.g., layout breaks or styles differ from the preview images), it may be caused by conflicts between your CSS and ThePay’s default styles. In such cases, we recommend disabling ThePay’s CSS entirely and implementing your own styling. + +#### Full customization of Buttons + +If the default payment buttons don’t fit your design or layout needs, you can fully customize them using the pay URLs for each available payment method. + +Use the method `getPaymentUrlsForPayment`, which returns a list of payment methods along with direct URLs for completing the payment. + +```php +/** @var \ThePay\ApiClient\TheClient $thePayClient */ +$paymentMethods = $thePayClient->getPaymentUrlsForPayment('uid123', 'cs'); +``` + +Each item in the returned array includes information about the payment method (e.g., name, logo, tags) and its corresponding payment URL. diff --git a/doc/get-pay-urls-for-existing-payment.md b/doc/get-pay-urls-for-existing-payment.md deleted file mode 100644 index a098e73..0000000 --- a/doc/get-pay-urls-for-existing-payment.md +++ /dev/null @@ -1,22 +0,0 @@ -# Get pay URLs for existing payments - -Returns an array of available payment methods with pay URLs for certain payment. - -```php -/** @var \ThePay\ApiClient\TheClient $thePayClient */ -$paymentMethod = $thePayClient->getPaymentUrlsForPayment('uid-454548', 'cs'); -``` - -### Preformatted buttons - -Method **getPaymentButtonsForPayment** returns HTML code. - -```php - // used default rendering - $paymentButtons = $thePayClient->getPaymentButtonsForPayment($paymentUid); -``` - -Payment method buttons should look like this, second image is with hover. - -![default](img/payment_method_button.png) -![hover](img/payment_method_button_hover.png) diff --git a/doc/index.md b/doc/index.md index 147f328..5f6c730 100644 --- a/doc/index.md +++ b/doc/index.md @@ -48,8 +48,6 @@ [Saving authorization](saving-authorization.md) -[Get pay URLs for existing payments](get-pay-urls-for-existing-payment.md) - [Generating a confirmation PDF for paid payment](generate-payment-confirmation.md) ## Methods