Skip to content

Commit

Permalink
Update Sadad.php
Browse files Browse the repository at this point in the history
flatten code
  • Loading branch information
imanghafoori1 authored Feb 14, 2018
1 parent 3c28172 commit 094e2c7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Sadad/Sadad.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 094e2c7

Please sign in to comment.