Fondy
Connect to your bot convenient online payments from all over the world
Last updated
Connect to your bot convenient online payments from all over the world
Last updated
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:
https://payfondy.eu/merchants/4879cf99f26d58b22b04c037d111d14a/default/index.html?n=fe044b299ce98accfcd5f0c559d8c8f28802c3
Also, before setting the payment_sum value, you can specify the following optional variables to configure the payment.
The default setting is UAH, if you need another currency you need to set the value of the currency variable
currency - Order currency.
Valid values:
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)
Please note:
First specify optional payment_description parameters, etc.
And last, assign the value of the payment_sum variable
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
If the password is less than 5 characters, then the password will be used completely, for example for test payments the password is test, then the callback will come test_success
These callbacks ARE NOT SEEN to the user, they are displayed only to the operator
The type of comparison should be "Full match"
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.
To make a repeat payment, you must reset the payment_sum, the previously generated link, and after you reset the payment_sum variable to get a new link. You can specify a previous value.
Test data at the time of publication of documentation:
Merchant ID: 1396424
Password: test
Test card numbers
44445566661111 - Successful
4444111166665555 - Refusal
Validity period and CVV2 any
If something does not work compare the data with the data on the official site: https://docs.fondy.eu/ru/docs/page/2/2