PHP code example of phox / jev-secrets

1. Go to this page and download the library: Download phox/jev-secrets 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/ */

    

phox / jev-secrets example snippets


use Phox\JevSecrets\Secrets;
use Phox\JevSecrets\TypeSafe\SecretClient;

$client = new SecretClient(new \Phox\TypeSafe\Client(), new Secrets(['terms' => ['Acme Ltd']]));

$response = $client->systemOne()
    ->state(['ticket' => $ticket])
    ->noul('refund', 'Does John Smith ask for a refund?')
    ->values(['John Smith'])
    ->send();

$client->systemOne()->state($ticket)->noul('refund', 'Refund?')
    ->overrides(['disable' => ['phone'], 'dates' => ['order' => 'mdy']])
    ->send();

$done = (new Secrets())->pseudo($body, ['John Smith']);
$answers = $done->restore(json_decode(send($done->request), true));