Connect to your bot convenient online payments from all over the world
To connect the Fondy payment system you will need a merchant ID and a secret key. After receiving them, we go to the settings in Salebot
In salebot we open the section of payment systems, select fondy. You need to enter the received data.
To generate a link to a payment, you need to set the value of the payment_sum variable (such as 150 or 100.55 (via a dot!)), immediately after that the fondy_pay_url variable appears. This variable can be displayed with a link or placed on the button with the text "Pay".
The link has the form:
Also, before setting the payment_sum value, you can specify the following optional variables to configure the payment.
currency - Order currency.
UAH - Ukrainian hryvna
RUB - Russian ruble
USD - USD
EUR - euro
GBP - Pound Sterling mandatory
CZK - Czech Crown
payment_description - order description
session_timeout - order lifespan in seconds.
default (36000 seconds = 10 hours).
language - Payment page language:
ru - Russian
uk - Ukrainian
en - English
lv - Latvian
fr - French
cs - Czech
ro - Romanian
it - Italian
sk - Slovak
pl - Polish
es - Spanish
hu - Hungarian
de - German
Create a link to the payment of 122hrn (default hryvnia)
Note, first we set additional variables for the settings, then payment_sum. You can define variables earlier in a chain, not in a single block, this is an example.
Next, at the right place, print the fondy_pay_url variable, which contains the link.
After successful payment in the bot will come kolbeks, on which you can understand that there was a successful payment. These kolbeks in the system you see as messages from the user, so that they can not be sent by the user, they consist of the first 5 characters of the secret key and the account success, for example: h4fd56_success
Also, after successful payment, the fondy_payment_completed variable is set to True.
For example, you can make a successful payment processing block with a condition and print the corresponding message to the user:
After the payment is completed, the fondy_callback_data variable will be added to the client, containing the payment system response data for the completed transaction. You can extract the necessary data from the dictionary using the get method.
Test data at the time of publication of documentation:
Merchant ID: 1396424
Test card numbers
44445566661111 - Successful
4444111166665555 - Refusal
Validity period and CVV2 any