You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Helper\Efps;
|
|
|
|
|
|
|
|
class Result
|
|
|
|
{
|
|
|
|
private $data;
|
|
|
|
|
|
|
|
public function __construct($data)
|
|
|
|
{
|
|
|
|
$this->data = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isSuccess()
|
|
|
|
{
|
|
|
|
return $this->data['returnCode'] == '0000';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get($key)
|
|
|
|
{
|
|
|
|
return $this->data[$key] ?? null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getMessage()
|
|
|
|
{
|
|
|
|
return $this->data['returnMsg'];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getData()
|
|
|
|
{
|
|
|
|
$data = $this->data;
|
|
|
|
unset($data['returnCode']);
|
|
|
|
unset($data['returnMsg']);
|
|
|
|
unset($data['nonceStr']);
|
|
|
|
unset($data['customerCode']);
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
}
|