PHP code example of wr2net / desafio-back-end
1. Go to this page and download the library: Download wr2net/desafio-back-end 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/ */
wr2net / desafio-back-end example snippets
header('Content-Type: application/json');
include_once __DIR__ . "/vendor/autoload.php";
use Alibin\Common\Initialize\Initialize;
use Alibin\Sales\Sales;
$url = 'https://api-sandbox.fpay.me/';
$credentials = [
'CLIENT_CODE' => 'FC-SB-15',
'CLIENT_KEY' => '6ea297bc5e294666f6738e1d48fa63d2'
];
/*
* This not is j-yGXp");
/*
* Reversal a sale
*/
echo Sales::reversalSale($connection, "4443-Tusj-yGXp");
/*
* Get clients with yours documents
*/
echo Sales::clientsSale($connection);
/*
* Get quatas from sales
*/
echo Sales::quotaSales($connection);
exit;