Allpay
Connecting Allpay payment system
To work with the allpay payment system, go to the project on mavibot.pro and in the "Acquiring" section you find Allpay payment system.

After clicking connect, a form for connecting the payment system opens.

In this form, enter the Username and password for working with API of the payment system.
After that, click Save settings, after which we will see that the button for connecting Allpay payment system is displayed as "Connected":
This means that the payment system is connected and you can go to work with it.

Configuring work with Allpay payment system
You need to send the customer's email address to Allpay. You can put it in the allpay_email variable in the block
There are 2 ways to create a payment link:
To generate a payment link, you need to set payment_sum variable value (for example, 150 or 100.55 (separated by a dot!)), and allpay_pay_url variable will appear immediately after that.
This variable can be displayed with a link or placed on a button with the text "Pay". There are additional parameters for this method, but they need to be declared in variables before payment_sum. The allpay_currency variable can be used to specify the currency, the default value is 'RUB'. The allpay_lang variable for specifying the language of the payment page, default is ‘ENG'.
You can also create a link using the allpay_generate_payment_url function(amount, email, currency, long).
amount - contains the payment amount
email - contains the customer's email address
currency - optional parameter for specifying the currency (by default is ‘RUB’),
lang - optional parameter that specifies the payment page language (by default is ‘ENG’).
The link will be the response to the execution of the function, put it in a variable
EXAMPLES:
For the first way:

allpay_email = '******[email protected]'
payment_sum = 100
As a result, the following variable can be passed in the block by link:

Example for the second way:

payment_url = allpay_generate_payment_url(100, '********[email protected]')
As a result, variables will be created:

After a successful payment, allpay_payment_completed variable will set to True, and you will also receive a callback about the successful payment.
The first 8 characters of the password are used at the beginning of the text to work with the API.
Last updated