Skip to content

Commit

Permalink
fix the version 8.2 up Dynamic Properties question
Browse files Browse the repository at this point in the history
  • Loading branch information
payuni committed Jul 3, 2023
1 parent 679bf5a commit 5800031
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/PayuniApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

class PayuniApi
{
// public $encryptInfo, $merKey, $merIV, $apiUrl, $parameter, $curlUrl;
private $attributes = [];
public $encryptInfo, $merKey, $merIV, $apiUrl, $parameter, $curlUrl;
public function __construct(string $key, string $iv, string $type = '')
{
$this->encryptInfo = '';
Expand Down Expand Up @@ -290,4 +291,14 @@ private function HashInfo(string $encryptStr = '')
{
return strtoupper(hash('sha256', $this->merKey . $encryptStr . $this->merIV));
}

public function __set(string $name, mixed $value): void
{
$this->attributes[$name] = $value;
}

public function __get(string $name): mixed
{
return $this->attributes[$name] ?? null;
}
}

0 comments on commit 5800031

Please sign in to comment.