Paypal (PLUS), Vorkasse und Sofortüberweisung funktionieren nicht mehr

Hallo liebe Community,

ich habe ein Update auf Shopware 5.2.1 durchgeführt und auch die Plugins für Paypal, Paypal PLUS und Sofortüberweisung geupdated. Leider funktionieren PayPal und Sofortüberweisung gar nicht (Fehlermeldung: Ups! Ein Fehler ist aufgetreten!) und PayPal Plus wird im Frontend nichtmal mehr angezeigt.

Seltsamerweise funktioniert aber PayPal Express. Ich stehe vor einem Rätsel und freue mich sehr über Hilfe!!

Danke & Beste Grüße,
Lisa

P.S. meine Shop URL: www.mixmyshampoo.de/mein-individuelles-shampoo

Neue Erkenntnis: Ich habe festgestellt, dass alle Bezahlarten wenn sie im Kundenaccount voreingestellt waren funktionieren. Nur bei Neukunden, die zum ersten Mal ihre Zahlart im Checkout (https://www.mixmyshampoo.de/checkout/shippingPayment/sTarget/checkout) wählen oder bei dem Versuch im Kundenaccount die voreingestellte Zahlart zu ändern, kommt es zu dem Fehler “Ups! Ein Fehler ist aufgetreten!” sobald man auf „weiter" klickt. Selbst Vorkasse – was ja gar kein Plugin ist und nichts mit Zahlungsanbietern zu tun hat – funktioniert nicht wenn man es nicht schon vorausgewählt hatte. Also alle Zahlarten funktionieren sofern sie entweder im Warenkorb (Paypal Express) oder im Account ausgewählt sind. Nur im Checkout gibt’s die Probleme - seit dem Update auf die neueste Shopware Version. Irgendwo scheint es da ein Kompatibilitätsproblem oder ähnliches zu geben. Ich kann es mir wirklich nicht erklären. Anbei noch ein paar Error Logs die in Verbindung stehen könnten.

Freue mich wirklich sehr über jeglichen Hinweis!! 

ERROR

Message:

 exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://api.paypal.com/v1/payments/payment/ [status code] 401 [reason phrase] Unauthorized' in /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError-\>onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete') #2 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter-\>emit('complete', Object(GuzzleHttp\Event\CompleteEvent)) #3 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm-\>\_\_invoke(Object(GuzzleHttp\Transaction)) #4 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/react/promise/src/FulfilledPromise.php(25): GuzzleHttp\RequestFsm-\>GuzzleHttp\{closure}(Array) #5 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise-\>then(Object(Closure), NULL, NULL) #6 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue-\>then(Object(Closure), NULL, NULL) #7 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure)) #8 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/vendor/guzzlehttp/guzzle/src/Client.php(165): GuzzleHttp\RequestFsm-\>\_\_invoke(Object(GuzzleHttp\Transaction)) #9 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/Components/RestClient.php(146): GuzzleHttp\Client-\>send(Object(GuzzleHttp\Message\Request)) #10 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/Components/RestClient.php(131): Shopware\SwagPaymentPaypalPlus\Components\RestClient-\>sendRequest('PATCH', 'payments/paymen...', Array) #11 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/Subscriber/Checkout.php(201): Shopware\SwagPaymentPaypalPlus\Components\RestClient-\>patch('payments/paymen...', Array) #12 /html/shopware/engine/Shopware/Plugins/Community/Frontend/SwagPaymentPaypalPlus/Bootstrap.php(347): Shopware\SwagPaymentPaypalPlus\Subscriber\Checkout-\>onPreRedirectToPayPal(Object(Enlight\_Event\_EventArgs)) #13 /html/shopware/engine/Library/Enlight/Event/Handler/Plugin.php(149): Shopware\_Plugins\_Frontend\_SwagPaymentPaypalPlus\_Bootstrap-\>onPreRedirectToPayPal(Object(Enlight\_Event\_EventArgs)) #14 /html/shopware/engine/Library/Enlight/Event/EventManager.php(251): Enlight\_Event\_Handler\_Plugin-\>execute(Object(Enlight\_Event\_EventArgs)) #15 /html/shopware/engine/Library/Enlight/Controller/Action.php(157): Enlight\_Event\_EventManager-\>notifyUntil('Enlight\_Control...', Array) #16 /html/shopware/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight\_Controller\_Action-\>dispatch('preRedirectActi...') #17 /html/shopware/engine/Library/Enlight/Controller/Front.php(223): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #18 /html/shopware/engine/Shopware/Kernel.php(177): Enlight\_Controller\_Front-\>dispatch() #19 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #21 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #22 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>pass(Object(Symfony\Component\HttpFoundation\Request), true) #23 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #24 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache\AppCache-\>invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #25 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /html/shopware/index.php(101): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #27 {main}

Time:

 2017-02-21T21:14:59.009926+0100

Channel:

 core

request:

 { "uri": "/checkout/preRedirect", "method": "POST", "query": { "module": "frontend", "controller": "checkout", "action": "preRedirect" }, "post": [] }

session:

 No session data available

shopId:

 1

shopName:

 MIX MY SHAMPOO

ERROR

Message:

 exception 'Shopware\Components\CSRFTokenValidationException' with message 'The provided X-CSRF-Token is invalid. Please go back, reload the page and try again.' in /html/shopware/engine/Shopware/Components/CSRFTokenValidator.php:161 Stack trace: #0 [internal function]: Shopware\Components\CSRFTokenValidator-\>checkFrontendTokenValidation(Object(Enlight\_Controller\_ActionEventArgs)) #1 /html/shopware/engine/Library/Enlight/Event/Handler/Default.php(91): call\_user\_func(Array, Object(Enlight\_Controller\_ActionEventArgs)) #2 /html/shopware/engine/Library/Enlight/Event/EventManager.php(214): Enlight\_Event\_Handler\_Default-\>execute(Object(Enlight\_Controller\_ActionEventArgs)) #3 /html/shopware/engine/Library/Enlight/Controller/Action.php(143): Enlight\_Event\_EventManager-\>notify('Enlight\_Control...', Object(Enlight\_Controller\_ActionEventArgs)) #4 /html/shopware/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight\_Controller\_Action-\>dispatch('saveShippingPay...') #5 /html/shopware/engine/Library/Enlight/Controller/Front.php(223): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #6 /html/shopware/engine/Shopware/Kernel.php(177): Enlight\_Controller\_Front-\>dispatch() #7 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #9 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #10 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>pass(Object(Symfony\Component\HttpFoundation\Request), true) #11 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #12 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache\AppCache-\>invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #13 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /html/shopware/index.php(101): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #15 {main}

Time:

 2017-02-21T21:13:44.743857+0100

Channel:

 core

request:

 { "uri": "/checkout/saveShippingPayment/sTarget/checkout/sTargetAction/index", "method": "POST", "query": { "module": "frontend", "controller": "checkout", "action": "saveShippingPayment", "sTarget": "checkout", "sTargetAction": "index" }, "post": { "payment": "7", "sDispatch": "10", "sAGB": "0" } }

session:

 No session data available

shopId:

 1

shopName:

 MIX MY SHAMPOO

ERROR

Message:

 exception 'Shopware\Components\CSRFTokenValidationException' with message 'The provided X-CSRF-Token is invalid. Please go back, reload the page and try again.' in /html/shopware/engine/Shopware/Components/CSRFTokenValidator.php:161 Stack trace: #0 [internal function]: Shopware\Components\CSRFTokenValidator-\>checkFrontendTokenValidation(Object(Enlight\_Controller\_ActionEventArgs)) #1 /html/shopware/engine/Library/Enlight/Event/Handler/Default.php(91): call\_user\_func(Array, Object(Enlight\_Controller\_ActionEventArgs)) #2 /html/shopware/engine/Library/Enlight/Event/EventManager.php(214): Enlight\_Event\_Handler\_Default-\>execute(Object(Enlight\_Controller\_ActionEventArgs)) #3 /html/shopware/engine/Library/Enlight/Controller/Action.php(143): Enlight\_Event\_EventManager-\>notify('Enlight\_Control...', Object(Enlight\_Controller\_ActionEventArgs)) #4 /html/shopware/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight\_Controller\_Action-\>dispatch('saveShippingPay...') #5 /html/shopware/engine/Library/Enlight/Controller/Front.php(223): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #6 /html/shopware/engine/Shopware/Kernel.php(177): Enlight\_Controller\_Front-\>dispatch() #7 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #9 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #10 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>pass(Object(Symfony\Component\HttpFoundation\Request), true) #11 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #12 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache\AppCache-\>invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #13 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /html/shopware/index.php(101): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #15 {main}

Time:

 2017-02-21T21:13:14.791074+0100

Channel:

 core

request:

 { "uri": "/checkout/saveShippingPayment/sTarget/checkout/sTargetAction/index", "method": "POST", "query": { "module": "frontend", "controller": "checkout", "action": "saveShippingPayment", "sTarget": "checkout", "sTargetAction": "index" }, "post": { "payment": "5", "sDispatch": "10", "sAGB": "0" } }

session:

 No session data available

shopId:

 1

shopName:

 MIX MY SHAMPOO

Hallo @Lisa88‍

in der ersten Fehlermeldung verweigert der Paypal-Server den Zugang ([status code] 401 [reason phrase] Unauthorized’). Das kann im normalen Betrieb gelegentlich vorkommen oder z. B. durch falsche API-Keys im PaypalPlugin verursacht sein. Teste einfach im Pluginmanager die Rest-API im Paypal-Plugin.

Die beiden letzten Fehlermeldungen sind durch den CSFR-Schutz von Shopware verursacht. Entgegen aller Beteuerungen kommt Shopware desöfteren nicht mit state changes zurecht. Am einfachsten ist die Deaktivierung über die config.php. Im Einzelfall gehe mit dem Back-Button des Browsers zurück und lade die Seite zum paypament Wechsel neu. Dann funktioniert es wahrscheinlich. Nur ist das für den Kunden eine Zumutung und ein einfacher Reload reicht  in der Regel nicht. 

Es könnte noch sein, dass Du ein abgeleitetes Theme verwendest, welches an den wichtigen Stellen Änderungen vorgenommen hat und der CSFR-Token nicht korrekt im Frontend erscheint. Es ist jedoch so, dass der CSFR-Token Fehler auch ohne einen solchen Theme-Fehler vollkommen unerwartet auftreten kann oder durch Zahlungsplugins verursacht werden kann. 

1 „Gefällt mir“

Hallo Lisa,

aus irgendeinem Grund werden die nötigen Template Erweiterungen für PayPal Plus nicht korrekt geladen. (Javascript Fehler in der Konsole: Uncaught ReferenceError: paymentWall is not defined)
Oft sind dafür individuelle Anpassungen am Theme, bzw. Plugins, die das Themes anpassen, die Ursache. Bitte beachtet bei eigenen Themes die Vererbung von Smarty: Getting started with Smarty
Falls ihr z.B. komplette Templates kopiert habt, und nicht nur einzelne Blöcke, wird es zu Problemen kommen. Als erstes würde ich mir die frontend/checkout/confirm.tpl und die frontend/checkout/shipping_payment.tpl Dateien anschauen.

Viele Grüße aus Schöppingen

cool Michael Telgmann

1 „Gefällt mir“

Hallo ihr beiden,

vielen lieben Dank für die schnelle und kompetente Hilfe!! Es war tatsächlich der CSFR-Schutz den ich deaktivieren musste und bei PayPal Plus waren die REST APIs nicht eingetragen, daher konnte das nicht klappen. Jetzt läuft wieder alles so wie es soll :slight_smile:

Danke & viele Grüße aus München,
Lisa