- Quick registration and confirmation of the merchant WITHOUT dancing with diamonds
- Registration of merchant for a person without a website
- Equal percentage for physical and legal persons - 2.5
- Availability of GooglePay and ApplePay
To connect the wayforpay system you need 3 values:
- 1.merchant login
- 2.merchant secret key
- 3.merchant’s domain name.
Copy the data and go to the settings in Salebot.
Open the section of payment systems, choose wayforpay. 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 wayforpay_pay_url variable appears. This variable can be displayed with a link or placed on the button with the text "Pay".
The default set is UAH (hryvnia), if you need another currency you need to set the value of the currency variable
Also, before setting the payment_sum value, you can specify the following optional variables to configure the payment.
currency - currency order by default UAH (possible values USD, EUR, RUB)
session_timeout - link lifetime in seconds, default is 3600 (1 hour)
product_name - product name
language - the language of the page payment, by default UA (possible values RU, EN)
buyer_name - the name of the buyer
buyer_email - buyer’s mail
buyer_first_name - the name of the buyer
buyer_last_name - buyer’s name
This view has a page for payment link.
Create a link to a payment of 1 UAH and a lifetime of 2 hours
- First specify optional product_name parameters, etc.
- And last, assign the value of the payment_sum variable
Note, first we set the 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 wayforpay_pay_url variable that contains the link
After successful payment in the bot will come kolbeks, on which you can understand that there was a successful payment. These colbecks 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 10 characters of the secret key and a notation _success, for example: flk3409ref_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 variable wayforpay_payment_completed 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:
Once the payment is complete, the wayforpay_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.