PHP code example of blob-solutions / laravel-vcr-am
1. Go to this page and download the library: Download blob-solutions/laravel-vcr-am 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/ */
use BlobSolutions\LaravelVcrAm\Facades\VcrAm;
use BlobSolutions\VcrAm\Input\RegisterSaleInput;
$response = VcrAm::registerSale(new RegisterSaleInput(/* ... */));
use BlobSolutions\VcrAm\VcrClient;
class CheckoutController
{
public function __construct(private readonly VcrClient $vcr) {}
public function __invoke(): RedirectResponse
{
$response = $this->vcr->registerSale(/* ... */);
// ...
}
}