Skip to content

Commit b13104d

Browse files
author
Can Sözeri
committed
refactor
1 parent b288e45 commit b13104d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Messages/AbstractResponse.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,13 @@ public function isSuccessful(): bool
8989
{
9090
if ($this->getIsRedirect()) {
9191
return true;
92-
} else {
93-
return (string)$this->data->Transaction->Response->Code === '00';
9492
}
93+
94+
return (string)$this->data->Transaction->Response->Code === '00';
95+
}
96+
97+
public function getTransactionReference(): ?string
98+
{
99+
return (string)$this->data->Transaction->RetrefNum;
95100
}
96101
}

src/Messages/PurchaseResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public function getRedirectUrl(): string
3939
{
4040
$urlType = $this->getRequest()->getParameters()['testMode'] ? 'test' : 'prod';
4141

42-
return $this->isRedirect() ? $this->redirectUrl[$urlType] : null;
42+
return $this->isRedirect() ? $this->redirectUrl[$urlType] : '';
4343
}
4444
}

0 commit comments

Comments
 (0)