diff --git a/src/Sadad/Sadad.php b/src/Sadad/Sadad.php index 73b6ed75..0de6c29d 100644 --- a/src/Sadad/Sadad.php +++ b/src/Sadad/Sadad.php @@ -188,15 +188,17 @@ protected function verifyPayment() private function getMessage($code, $message) { $result = SadadResult::codeResponse($code, $message); - if (!$result) { - $result = array( - 'code' => SadadResult::UNKNOWN_CODE, - 'message' => SadadResult::UNKNOWN_MESSAGE, - 'fa' => 'خطای ناشناخته', - 'en' => 'Unknown Error', - 'retry' => false - ); + if ($result) { + return $result; } + $result = array( + 'code' => SadadResult::UNKNOWN_CODE, + 'message' => SadadResult::UNKNOWN_MESSAGE, + 'fa' => 'خطای ناشناخته', + 'en' => 'Unknown Error', + 'retry' => false + ); + return $result; }