Russian | English
This product is used for managing payments under The Yandex.Checkout API For usage by those who implemented Yandex.Checkout using the API method.
PHP 5.3.2 (or later version) with the libcurl library
- Install Composer, a package manger.
- In the console, run the following command:
composer require yandex-money/yandex-checkout-sdk-php
- Add a string
"yandex-money/yandex-checkout-sdk-php": "*"
to the list of dependencies of your project in the composer.json file
...
"require": {
"php": ">=5.3.2",
"yandex-money/yandex-checkout-sdk-php": "*"
...
- Refresh the project's dependencies. In the console, navigate to the catalog with composer.json and run the following command:
composer update
- Adjust your project's code to activate automated uploading of files for our product:
require __DIR__ . '/vendor/autoload.php';
- Download the Yandex.Checkout API PHP Client Library archive, extract it and copy the lib catalog to the required place of your project.
- Adjust your project's code to activate automated uploading of files for our product:
require __DIR__ . '/lib/autoload.php';
- Import required classes
use YandexCheckout\Client;
- Create a sample of a client object, then set the store's identifier and secret key (you can get them under your Yandex.Checkout's Merchant Profile). Issuing a secret key
$client = new Client();
$client->setAuth('shopId', 'secretKey');
- Call the required API method. More details in our documentation for the Yandex.Chechout API