Skip to content

Commit 1eba2d5

Browse files
committed
Handle existing reponses from Payum\Core\Bridge
1 parent e2a3ffe commit 1eba2d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ReplyToSymfonyResponseConverter.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Payum\Bundle\PayumBundle;
44

55
use Payum\Bundle\PayumBundle\Reply\HttpResponse as SymfonyHttpResponse;
6+
use Payum\Core\Bridge\Symfony\Reply\HttpResponse as CoreSymfonyHttpResponse;
67
use Payum\Core\Exception\LogicException;
78
use Payum\Core\Reply\HttpResponse;
89
use Payum\Core\Reply\ReplyInterface;
@@ -16,9 +17,11 @@ class ReplyToSymfonyResponseConverter
1617
*/
1718
public function convert(ReplyInterface $reply)
1819
{
19-
if ($reply instanceof SymfonyHttpResponse) {
20+
if ($reply instanceof SymfonyHttpResponse || $reply instanceof CoreSymfonyHttpResponse) {
2021
return $reply->getResponse();
21-
} elseif ($reply instanceof HttpResponse) {
22+
}
23+
24+
if ($reply instanceof HttpResponse) {
2225
$headers = $reply->getHeaders();
2326
$headers['X-Status-Code'] = $reply->getStatusCode();
2427

0 commit comments

Comments
 (0)