<?php
declare(strict_types=1);
define('ACC_BASE_PATH', __DIR__);
require __DIR__ . '/standalone/bootstrap.php';

$cv = Arag_Shop::validate_coupon('ARAG10', 1000000);
$ch = curl_init('http://localhost/acc-engine/api.php/acc/v1/public/arag/coupons/check?code=ARAG10&subtotal=1000000');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true]);
$api = curl_exec($ch);
curl_close($ch);

echo json_encode([
    'helper' => $cv,
    'api'    => json_decode($api, true),
], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
