Paypal - Client error response

Hallo,

ich schaffe es leider nicht das neue PayPal-Plugin zum laufen zu bringen. Vereinzelte Länder funktionieren nicht und ich bekomme eine Fehlermeldung (s.u.). In meinem Fall sind dies Dänemark und Norwegen. Um das Problem einzugrenzen habe eine frische Version von Shopware 5.5.3 mit Demodaten installiert und als einziges Plugin Paypal V1.1.1 hinzugefügt. In den Ländereinstellungen habe ich Dänemark hinzugefügt. Für Deutschland funktioniert die Weiterleitung zu PayPal für Dänemark leider nicht.

Ups! Ein Fehler ist aufgetreten!

Die nachfolgenden Hinweise sollten Ihnen weiterhelfen.

Client error response [url] https://api.paypal.com/v1/payments/payment/PAYID-LPQCREI15T02417XA803763D [status code] 400 [reason phrase] Bad Request in engine/Shopware/Components/HttpClient/GuzzleHttpClient.php on line 154

Stack trace:

#0 custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(159): Shopware\Components\HttpClient\GuzzleHttpClient->patch(‘https://api.pay…’, Array, ‘[{“op”:“add”,"p…’) #1 custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/PaymentResource.php(87): SwagPaymentPayPalUnified\PayPalBundle\Services\ClientService->sendRequest(‘PATCH’, ‘https://api.pay…’, ‘[{“op”:“add”,"p…’) #2 custom/plugins/SwagPaymentPayPalUnified/Controllers/Frontend/PaypalUnified.php(143): SwagPaymentPayPalUnified\PayPalBundle\Resources\PaymentResource->patch(‘PAYID-LPQCREI15…’, Array) #3 engine/Library/Enlight/Controller/Action.php(193): Shopware_Controllers_Frontend_PaypalUnified->gatewayAction() #4 engine/Library/Enlight/Controller/Dispatcher/Default.php(548): Enlight_Controller_Action->dispatch(‘gatewayAction’) #5 engine/Library/Enlight/Controller/Front.php(222): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #6 engine/Shopware/Kernel.php(202): Enlight_Controller_Front->dispatch() #7 vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 vendor/symfony/http-kernel/HttpCache/HttpCache.php(448): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #10 vendor/symfony/http-kernel/HttpCache/HttpCache.php(420): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #11 vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(Object(Symfony\Component\HttpFoundation\Request), true) #12 engine/Shopware/Components/HttpCache/AppCache.php(189): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true) #13 vendor/symfony/http-kernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true) #14 engine/Shopware/Components/HttpCache/AppCache.php(116): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #16 {main}

Ich würde gerne den Shop auf die neueste Version upgraden, leider komme ich an dieser Stelle nicht weiter…

Für jede Hilfe wäre ich sehr dankbar.

VG,
Philipp

 

und in der core_production-2018-11-05.log

[2018-11-05 12:25:06] core.CRITICAL: Client error response [url] https://api.paypal.com/v1/payments/payment/PAYID-LPQCREI15T02417XA803763D [status code] 400 [reason phrase] Bad Request {“uid”:“f7044e2”}
[2018-11-05 12:25:06] core.CRITICAL: Client error response [url] https://api.paypal.com/v1/payments/payment/PAYID-LPQCREI15T02417XA803763D [status code] 400 [reason phrase] Bad Request {“uid”:“f7044e2”}
[2018-11-05 12:25:06] core.ERROR: GuzzleHttp\Exception\ClientException: Client error response [url] https://api.paypal.com/v1/payments/payment/PAYID-LPQCREI15T02417XA803763D [status code] 400 [reason phrase] Bad Request in /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(32): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), ‘complete’) #2 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit(‘complete’, Object(GuzzleHttp\Event\CompleteEvent)) #3 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #4 /var/www/testarea/sw_5_5_3/vendor/react/promise/src/FulfilledPromise.php(25): GuzzleHttp\RequestFsm->GuzzleHttp{closure}(Array) #5 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL) #6 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL) #7 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/RequestFsm.php(134): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure)) #8 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/Client.php(165): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #9 /var/www/testarea/sw_5_5_3/vendor/guzzlehttp/guzzle/src/Client.php(145): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request)) #10 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php(152): GuzzleHttp\Client->patch(‘https://api.pay…’, Array) #11 /var/www/testarea/sw_5_5_3/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(159): Shopware\Components\HttpClient\GuzzleHttpClient->patch(‘https://api.pay…’, Array, ‘[{“op”:“add”,"p…’) #12 /var/www/testarea/sw_5_5_3/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/PaymentResource.php(87): SwagPaymentPayPalUnified\PayPalBundle\Services\ClientService->sendRequest(‘PATCH’, ‘https://api.pay…’, ‘[{“op”:“add”,"p…’) #13 /var/www/testarea/sw_5_5_3/custom/plugins/SwagPaymentPayPalUnified/Controllers/Frontend/PaypalUnified.php(143): SwagPaymentPayPalUnified\PayPalBundle\Resources\PaymentResource->patch(‘PAYID-LPQCREI15…’, Array) #14 /var/www/testarea/sw_5_5_3/engine/Library/Enlight/Controller/Action.php(193): Shopware_Controllers_Frontend_PaypalUnified->gatewayAction() #15 /var/www/testarea/sw_5_5_3/engine/Library/Enlight/Controller/Dispatcher/Default.php(548): Enlight_Controller_Action->dispatch(‘gatewayAction’) #16 /var/www/testarea/sw_5_5_3/engine/Library/Enlight/Controller/Front.php(222): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #17 /var/www/testarea/sw_5_5_3/engine/Shopware/Kernel.php(202): Enlight_Controller_Front->dispatch() #18 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(448): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #21 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(420): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #22 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(Object(Symfony\Component\HttpFoundation\Request), true) #23 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpCache/AppCache.php(189): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true) #24 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true) #25 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpCache/AppCache.php(116): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /var/www/testarea/sw_5_5_3/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #27 {main}  Next Shopware\Components\HttpClient\RequestException: Client error response [url] https://api.paypal.com/v1/payments/payment/PAYID-LPQCREI15T02417XA803763D [status code] 400 [reason phrase] Bad Request in /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php:154 Stack trace: #0 /var/www/testarea/sw_5_5_3/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(159): Shopware\Components\HttpClient\GuzzleHttpClient->patch(‘https://api.pay…’, Array, ‘[{“op”:“add”,"p…’) #1 /var/www/testarea/sw_5_5_3/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/PaymentResource.php(87): SwagPaymentPayPalUnified\PayPalBundle\Services\ClientService->sendRequest(‘PATCH’, ‘https://api.pay…’, ‘[{“op”:“add”,"p…’) #2 /var/www/testarea/sw_5_5_3/custom/plugins/SwagPaymentPayPalUnified/Controllers/Frontend/PaypalUnified.php(143): SwagPaymentPayPalUnified\PayPalBundle\Resources\PaymentResource->patch(‘PAYID-LPQCREI15…’, Array) #3 /var/www/testarea/sw_5_5_3/engine/Library/Enlight/Controller/Action.php(193): Shopware_Controllers_Frontend_PaypalUnified->gatewayAction() #4 /var/www/testarea/sw_5_5_3/engine/Library/Enlight/Controller/Dispatcher/Default.php(548): Enlight_Controller_Action->dispatch(‘gatewayAction’) #5 /var/www/testarea/sw_5_5_3/engine/Library/Enlight/Controller/Front.php(222): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #6 /var/www/testarea/sw_5_5_3/engine/Shopware/Kernel.php(202): Enlight_Controller_Front->dispatch() #7 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(448): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #10 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(420): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #11 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(Object(Symfony\Component\HttpFoundation\Request), true) #12 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpCache/AppCache.php(189): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true) #13 /var/www/testarea/sw_5_5_3/vendor/symfony/http-kernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true) #14 /var/www/testarea/sw_5_5_3/engine/Shopware/Components/HttpCache/AppCache.php(116): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /var/www/testarea/sw_5_5_3/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #16 {main} {“uid”:“f7044e2”}

Hat sich erledigt. Mit validen Daten funktioniert, die Weiterleitung zu Paypal.