N
N
Nikolay Matyushkin2018-08-08 15:23:03
1C-Bitrix
Nikolay Matyushkin, 2018-08-08 15:23:03

Why might a request to the Yandex.Checkout API not work?

Hello. Making a request with code

use YandexCheckout\Client;

$client = new Client();
$client->setAuth('.....', '.....');
$payment = $client->createPayment(
    array(
        'amount' => array(
            'value' => 6.0,
            'currency' => 'RUB'
        ),
        'confirmation' => array(
            'type' => 'redirect',
            'return_url' => 'https://site.ru/payment/index.php',
        ),
    ),
    uniqid('123', true)

Of course, instead of dots id with a key I substitute. But I get an error like "Class 'YandexCheckout\Client' not found (0)". I filled everything in the payment system settings, except for the storefront...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2018-08-08
@Devilz_1

Are you just executing this code? And where did you get that it is in Bitrix?
Where are you connecting the class?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question