Skip to content

Commit fe78797

Browse files
committed
[PayumPayzen] Fix directory creation and file permissions.
1 parent 7e94c80 commit fe78797

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Api/Api.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function getTransactionId()
5454
// Create file if not exists
5555
if (!file_exists($path)) {
5656
touch($path);
57+
chmod($path, 0600);
5758
}
5859

5960
$date = (new \DateTime())->format('Ymd');
@@ -153,8 +154,8 @@ private function getDirectoryPath()
153154
$path = $this->config['directory'];
154155

155156
// Create directory if not exists
156-
if (!is_dir(dirname($path))) {
157-
mkdir(dirname($path), 0700, true);
157+
if (!is_dir($path)) {
158+
mkdir($path, 0600, true);
158159
}
159160

160161
return $path . DIRECTORY_SEPARATOR;

0 commit comments

Comments
 (0)