To make things clear. I am currently developing a WordPress website using custom theme. The main goal of this site is to sell the YouTube link to the online conference, which will be held on 3rd of June, 2023.
My question concerns integrating of Russian payment system called YooKassa onto page using its pre-built widget. According to the REST API documentation, before the widget could be initialized on the page, I must make an API POST request to create payment. They even give the instructions how to do that in plain PHP, which you can find by following the link below:
https://yookassa.ru/developers/payment-acceptance/integration-scenarios/smart-payment?lang=en
According to the code snippet they provided as an example to refer, they used the following code to integrate the plugin into the theme, which is ‘use YooKassa/Client’.
Because, I am working on WordPress, the simple copy-pasting of the code is not working. So, the very big issue is that I have no idea how to integrate the custom plugin into my theme to make things work.
You can find php sdk took on this link:
https://github.com/yoomoney/yookassa-sdk-php
Certainly, I have suggestions on further implementation which will defintely not work, because my understanding is most probably wrong at the core.
Please give instructions or code snippet on integration of that php sdk into my theme. What should I write into my functions.php file?