PHP code example of avto-dev / cloud-payments-laravel
1. Go to this page and download the library: Download avto-dev/cloud-payments-laravel 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/ */
avto-dev / cloud-payments-laravel example snippets
use AvtoDev\CloudPayments\Config;
$config = new Config('pk_some_key', 'some_api_key');
$request_builder = new \AvtoDev\CloudPayments\Requests\Payments\Cards\CardsAuthRequestBuilder;
$client = new \AvtoDev\CloudPayments\Client(
new \GuzzleHttp\Client,
new \AvtoDev\CloudPayments\Config('public_id', 'api_key')
);
/** @var \Psr\Http\Message\RequestInterface $request */
$response = $client->send($request);
/** @var \AvtoDev\CloudPayments\Config $config */
use AvtoDev\CloudPayments\Client;
use GuzzleHttp\Client as GuzzleClient;
$client = new Client(new GuzzleClient, $config);
return [
// ...
/*
|--------------------------------------------------------------------------
| CloudPayments Settings
|--------------------------------------------------------------------------
| - `public_id` (string) - Public ID (You can find it in personal area)
| - `api_key` (string) - API Secret (You can find it in personal area)
|
*/
'cloud_payments' => [
'public_id' => env('CLOUD_PAYMENTS_PUBLIC_ID', 'some id'),
'api_key' => env('CLOUD_PAYMENTS_API_KEY', 'some api key'),
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.