1. Go to this page and download the library: Download husail/movingpay-sdk 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/ */
husail / movingpay-sdk example snippets
use Husail\MovingPay\Client;
use Husail\MovingPay\Authentication;
$client = new Client(
new Authentication(token: 'your-token', customerId: 'your-customer-id')
);
$response = $client->estabelecimento->todos();
if ($response->successful()) {
// Handle the response
}
use Monolog\Logger;
use Husail\MovingPay\Client;
use Monolog\Handler\StreamHandler;
use Husail\MovingPay\Authentication;
use Husail\MovingPay\HttpClient\Message\Formatter\SimpleFormatter;
$logger = new Logger('my_logger');
$logger->pushHandler(new StreamHandler(__DIR__ . '/movingpay.log'));
$client = new Client(
new Authentication(token: 'your-token', customerId: 'your-customer-id'),
logger: $logger,
formatter: new SimpleFormatter(true) // 'true' enables pretty-printed JSON logs
);
$response = $client->estabelecimento->todos();
if ($response->successful()) {
// Handle the response
}
use MovingPay;
$response = MovingPay::client()->estabelecimento->todos();
if ($response->successful()) {
// Handle the response
}