<?php
namespace Spatie\FlareClient\Truncation;
class ReportTrimmer
{
protected static int $maxPayloadSize = 524288;
/** @var array<int, class-string<\Spatie\FlareClient\Truncation\TruncationStrategy>> */
protected array $strategies = [
TrimStringsStrategy::class,
TrimStackFrameArgumentsStrategy::class,
TrimContextItemsStrategy::class,
];
/**
* @param array<int|string, mixed> $payload
*
* @return array<int|string, mixed>
*/
public function trim(array $payload): array
{
foreach ($this->strategies as $strategy) {
if (! $this->needsToBeTrimmed($payload)) {
break;
}
$payload = (new $strategy($this))->execute($payload);
}
return $payload;
}
/**
* @param array<int|string, mixed> $payload
*
* @return bool
*/
public function needsToBeTrimmed(array $payload): bool
{
return strlen((string)json_encode($payload)) > self::getMaxPayloadSize();
}
public static function getMaxPayloadSize(): int
{
return self::$maxPayloadSize;
}
public static function setMaxPayloadSize(int $maxPayloadSize): void
{
self::$maxPayloadSize = $maxPayloadSize;
}
}
Welcome to the Kueue Pay Payment Gateway Solutions Developer API Documentation. This comprehensive guide will empower you to seamlessly integrate our advanced payment gateway into your website, enhancing your customers’ payment experience and enabling efficient transaction processing. The Kueue Pay Developer API is designed for developers and entrepreneurs who seek simplicity, security, and reliability in their payment processing solutions.
The Kueue Pay Developer API allows you to seamlessly integrate Kueue Pay’s Payment Gateway Solutions into your website, enabling secure and efficient debit and credit card transactions. With our API, you can initiate payments, check payment statuses, and even process refunds, all while ensuring a smooth and streamlined payment experience for your customers.