Skip to content

Commit 5800031

Browse files
committed
fix the version 8.2 up Dynamic Properties question
1 parent 679bf5a commit 5800031

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/PayuniApi.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
class PayuniApi
2424
{
25-
// public $encryptInfo, $merKey, $merIV, $apiUrl, $parameter, $curlUrl;
25+
private $attributes = [];
26+
public $encryptInfo, $merKey, $merIV, $apiUrl, $parameter, $curlUrl;
2627
public function __construct(string $key, string $iv, string $type = '')
2728
{
2829
$this->encryptInfo = '';
@@ -290,4 +291,14 @@ private function HashInfo(string $encryptStr = '')
290291
{
291292
return strtoupper(hash('sha256', $this->merKey . $encryptStr . $this->merIV));
292293
}
294+
295+
public function __set(string $name, mixed $value): void
296+
{
297+
$this->attributes[$name] = $value;
298+
}
299+
300+
public function __get(string $name): mixed
301+
{
302+
return $this->attributes[$name] ?? null;
303+
}
293304
}

0 commit comments

Comments
 (0)