# Paypal Express Invalid HTTP response version: 2

**URL:** <https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171>\
**Category:** Plugins\
**Tags:** offizielle-shopware-\
**Created:** [26. Juni 2019 um 14:50 UTC](https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171 "2019-06-26T14:50:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon33058483](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@anon33058483](https://forum.shopware.com/u/anon33058483)\
**Post date:** [26. Juni 2019 um 14:50 UTC](https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171/1 "2019-06-26T14:50:28Z")

</div>

Hallo Leute,

wir nutzen das Paypal Express Plugin in der Version 3.6.1. Seit heute geht das Bezahlen über Paypal teilweise nicht. Wir erhalten folgenden Fehler:

**Message:**

```
 Invalid HTTP response version: 2

```

**Time:**

```
 2019-06-26T15:01:09.278453+0200

```

**Channel:**

```
 core

```

**request:**

```
 {

 &nbsp;&nbsp;&nbsp; "uri": "/payment\_paypal/express",

 &nbsp;&nbsp;&nbsp; "method": "GET",

 &nbsp;&nbsp;&nbsp; "query": {

 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "module": "frontend",

 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "controller": "payment\_paypal",

 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "action": "express"

 &nbsp;&nbsp;&nbsp; },

 &nbsp;&nbsp;&nbsp; "post": []

 }

```

**session:**

```
 No session data available

```

&nbsp;

Kann jemand weiterhelfen?

---

<div class="post-metadata">

**Author:** ![anon33058483](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@anon33058483](https://forum.shopware.com/u/anon33058483)\
**Post date:** [28. Juni 2019 um 07:10 UTC](https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171/2 "2019-06-28T07:10:28Z")

</div>

Hier noch genauer:

Invalid HTTP response version: 2 in engine/Library/Zend/Http/Response.php on line 179 Stack trace: #0 engine/Library/Zend/Http/Response.php(659): Zend\_Http\_Response-\>\_\_construct(200, Array, ‘L\_AMT0=427%2e62…’, ‘2’, false) #1 engine/Library/Zend/Http/Client.php(1076): Zend\_Http\_Response::fromString(‘HTTP/2 200 \r\nco…’) #2 engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypal/Components/Paypal/Client.php(105): Zend\_Http\_Client-\>request(‘POST’) #3 engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypal/Controllers/Backend/PaymentPaypal.php(199): Shopware\_Components\_Paypal\_Client-\>\_\_call(‘GetBalance’, Array) #4 engine/Library/Enlight/Controller/Action.php(192): Shopware\_Controllers\_Backend\_PaymentPaypal-\>getBalanceAction() #5 engine/Library/Enlight/Controller/Dispatcher/Default.php(563): Enlight\_Controller\_Action-\>dispatch(‘getBalanceActio…’) #6 engine/Library/Enlight/Controller/Front.php(222): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #7 engine/Shopware/Kernel.php(202): Enlight\_Controller\_Front-\>dispatch() #8 vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 vendor/symfony/http-kernel/HttpCache/HttpCache.php(448): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true) #10 engine/Shopware/Components/HttpCache/AppCache.php(260): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #11 vendor/symfony/http-kernel/HttpCache/HttpCache.php(238): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #12 engine/Shopware/Components/HttpCache/AppCache.php(105): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>pass(Object(Symfony\Component\HttpFoundation\Request), true) #13 shopware.php(122): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #14 {main}

---

<div class="post-metadata">

**Author:** ![anon33058483](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@anon33058483](https://forum.shopware.com/u/anon33058483)\
**Post date:** [28. Juni 2019 um 08:09 UTC](https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171/3 "2019-06-28T08:09:11Z")

</div>

Die Bezahlung per Paypal läuft wieder:

In der engine/Library/Zend/Http/Response.php wurde der Code aus Zeile 178:

if (! preg\_match(’|^\d.\d$|’, $version)) {

in

if (! preg\_match(’|^\d.\*[\d]\*$|’, $version))

abgeändert.

So wie ich es verstanden habe, wird hier die HTTP-Version der Paypal-Response überprüft. Wenn die HTTP-Version nicht der Form: “Dezimalzahl.Dezimalzahl” entspricht wird ein Fehler geworfen. Paypal schickt als HTTP-Version aber nur die “2”, ohne “.” und Nachkommastelle. So habe ich in der Überprüfung den regulären Ausdruck so angepasst, dass nur die erste Stelle eine Dezimalzahl sein muss.

---

<div class="post-metadata">

**Author:** ![LenaForlin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/lenaforlin/32/13485_2.png) [@LenaForlin](https://forum.shopware.com/u/LenaForlin)\
**Post date:** [28. Juni 2019 um 15:05 UTC](https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171/4 "2019-06-28T15:05:20Z")

</div>

Ich habe diesbezüglich mal ein Ticket im Issue Tracker erstellt:&nbsp;[https://issues.shopware.com/issues/PT-10590](https://issues.shopware.com/issues/PT-10590)

Dort findet sich auch ein kleiner Fix welcher das Verhalten löst. Bitte beachte aber, dass die Einbindung auf eigene Gefahr erfolgt. Am besten testest Du es erst in einer Testumgebung.

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [1. Juli 2019 um 09:13 UTC](https://forum.shopware.com/t/paypal-express-invalid-http-response-version-2/60171/5 "2019-07-01T09:13:08Z")

</div>

Hallo zusammen,

wir haben soeben die Version 3.6.2 releaed. Damit sollte das Problem behoben sein.

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann
