![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/Corals/modules/Payment/TwoCheckout/Message/ |
<?php namespace Corals\Modules\Payment\TwoCheckout\Message; use Corals\Modules\Payment\Common\Message\AbstractResponse; use Corals\Modules\Payment\Common\Message\ResponseInterface; /** * Response. */ class RefundResponse extends AbstractResponse implements ResponseInterface { /** * {@inheritdoc} * * @return bool */ public function isSuccessful() { return isset($this->data['response_code']) ? $this->data['response_code'] == 'OK' : false; } /** * {@inheritdoc} * * @return bool */ public function isRedirect() { return false; } /** * {@inheritdoc} * * @return int|null */ public function getCode() { return isset($this->data['response_code']) ? $this->data['response_code'] : null; } /** * {@inheritdoc} */ public function getMessage() { return isset($this->data['response_message']) ? $this->data['response_message'] : json_encode($this->data['errors']); } /** * Return the first error message in the error basket. */ public function getFirstErrorMessage() { return $this->data['errors'][0]['message']; } /** * Return the first error message in the error basket. */ public function getFirstErrorCode() { return $this->data['errors'][0]['code']; } }