Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Config/PackageConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ final class PackageConfig extends AbstractConfig implements ConfigInterface
private function __construct(string $secretKey, string $publicKey, string $encryptKey, string $env)
{
parent::__construct($secretKey, $publicKey, $encryptKey, $env);
$this->logger->pushHandler(new RotatingFileHandler(__DIR__ . "../../../../../../" . self::LOG_FILE_NAME, 90));
}

public static function setUp(string $secretKey, string $publicKey, string $enc, string $env, ?LoggerInterface $customLogger = null): ConfigInterface
Expand All @@ -32,9 +31,12 @@ public static function setUp(string $secretKey, string $publicKey, string $enc,
if ($customLogger) {
$instance->logger = $customLogger;
} else {
$rootPath = __DIR__ . '/../../../../../../';
$logDir = $rootPath . $_ENV['FLW_LOG_DIR'] ?? 'logs';

$vendorPath = dirname(__DIR__, 4);
$rootPath = dirname($vendorPath);

$logSubDir = $_ENV['FLW_LOG_DIR'] ?? 'logs';
$logDir = $rootPath . DIRECTORY_SEPARATOR . $logSubDir;

if (!is_dir($logDir)) {
if (!mkdir($logDir, 0775, true) && !is_dir($logDir)) {
throw new \RuntimeException("Flutterwave: Failed to create log directory at $logDir");
Expand Down
23 changes: 0 additions & 23 deletions src/Enum/Currency.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Enum/Method.php

This file was deleted.

17 changes: 0 additions & 17 deletions src/Enum/Momo.php

This file was deleted.

Loading