PHP code example of andchir / omnipay3-yandexkassa

1. Go to this page and download the library: Download andchir/omnipay3-yandexkassa library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

andchir / omnipay3-yandexkassa example snippets



 

$response = $gateway->purchase(['amount' => '1.00', 'currency' => 'RUB', 'testMode' => true])->send();
 

if ($response->isSuccessful()) {
    print_r($response);
} elseif ($response->isRedirect()) {
    $response->redirect();
} else {
    echo $response->getMessage();
}