PHP code example of francodacosta / caparica-guzzle-plugin

1. Go to this page and download the library: Download francodacosta/caparica-guzzle-plugin 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/ */

    

francodacosta / caparica-guzzle-plugin example snippets


use Caparica\Client\BasicClient as CaparicaClient;
use Caparica\Crypto\RequestSigner;
use Guzzle\Service\Client;

// 1) create the Caparica client with your client id and password
$client = new CaparicaClient;
$client->setCode('client code');
$client->setSecret('client Secret');

// 2) Instantiate a request signer
$requestSigner = new RequestSigner;

// 3) Set up the plugin
$plugin = new CaparicaGuzzlePlugin(
    $client,
    $requestSigner,
    $
 $caparicaGuzzle = $this->get('caparica.guzzle');