shopware5 / SwagPaymentPayPalUnified

PayPal products unified in one plugin
MIT License
19 stars 22 forks source link

An error occurred: Client error: `POST https://api-m.paypal.com/v1/notifications/webhooks` resulted in a `403 Forbidden` response: 403 Forbidden [403] #53

Closed julianheusel closed 5 months ago

julianheusel commented 6 months ago

When I want to set up the Plugin in the latest Shopware 5 instance, I will receive the following error: An error occurred: Client error: POST https://api-m.paypal.com/v1/notifications/webhooks resulted in a 403 Forbidden response: 403 Forbidden [403]

WhatsApp Image 2024-05-21 at 20 03 13

The strange thing, that the plugin worked in the same shop with the same PayPal account very well. After reinstalling the plugins, all the problems came up.

mitelg commented 5 months ago

hey @julianheusel

sorry for the late response. could you try to find more information in the logs or with help of those articles? It is quite hard to tell what is going wrong here, without some more context :slightly_smiling_face:

https://developers.shopware.com/developers-guide/debugging/ https://docs.shopware.com/en/shopware-5-en/tutorials-and-faq/debugging-error-messages-in-shopware

julianheusel commented 5 months ago

Hi @mitelg thank you for your reply! I hope the following logs will help you:

the-shop-url.de_coz1izqy79@v2202404141301267024:~$ tail www/shop-url.de/var/log/plugin_production-2024-05-29.log [2024-05-29T18:21:27.694862+02:00] plugin.ERROR: PayPal: Could not validate API credentials due to a communication failure {"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","payload":"<html><body>403 Forbidden</body></html>"} {"uid":"d682488"} [2024-05-29T18:21:32.463047+02:00] plugin.ERROR: PayPal: GOT ERROR WHILE REQUEST OF TYPE (POST) TO URL: https://api-m.paypal.com/v1/oauth2/token {"payload":{"grant_type":"client_credentials"},"headers":{"Authorization":"Basic QWVvUDZBU3NWN2hZY0Nrbmc2UUdMWU1pdVp3VmMxQjNPSk5iNm1VdkxONzQxTHN6UUdoQ2thN1FNVFVHMmZmaERJRmJoX0VDVVlRY3hRcVY6RUpVYTJOWmpzemUwb191czlQSWI1a0h4UEhkeVBheHNGWWJhNjBidEVxOG1NNTVYZ0Z2c1Y4bXA2M185V0w3UksxSmQwOGlsVGRxNFQ3S3M="},"exception":{"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","trace":"#0 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(153): Shopware\\Components\\HttpClient\\GuzzleHttpClient->post()\n#1 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/TokenResource.php(49): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->sendRequest()\n#2 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/TokenService.php(52): SwagPaymentPayPalUnified\\PayPalBundle\\Resources\\TokenResource->get()\n#3 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(293): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\TokenService->getToken()\n#4 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(117): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->createAuthentication()\n#5 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(260): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->configure()\n#6 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(91): Shopware_Controllers_Backend_PaypalUnifiedSettings->configureClient()\n#7 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Action.php(188): Shopware_Controllers_Backend_PaypalUnifiedSettings->registerWebhookAction()\n#8 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch()\n#9 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch()\n#10 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Kernel.php(195): Enlight_Controller_Front->dispatch()\n#11 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\\Kernel->handle()\n#12 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler::handle()\n#13 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(270): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward()\n#14 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\\Components\\HttpCache\\AppCache->forward()\n#15 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass()\n#16 /var/www/vhosts/the-shop-url.de/www/shop-url.de/shopware.php(122): Shopware\\Components\\HttpCache\\AppCache->handle()\n#17 {main}","code":403,"file":"/var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php","line":155,"body":"<html><body>403 Forbidden</body></html>"}} {"uid":"db52f7c"} [2024-05-29T18:21:32.463998+02:00] plugin.ERROR: PayPal: Could not create authentication - request exception {"payload":"<html><body>403 Forbidden</body></html>","message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n"} {"uid":"db52f7c"} [2024-05-29T18:21:32.464044+02:00] plugin.ERROR: PayPal: Could not register webhooks due to a communication failure {"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","payload":"<html><body>403 Forbidden</body></html>"} {"uid":"db52f7c"} [2024-05-29T18:21:36.650618+02:00] plugin.ERROR: PayPal: GOT ERROR WHILE REQUEST OF TYPE (POST) TO URL: https://api-m.paypal.com/v1/oauth2/token {"payload":{"grant_type":"client_credentials"},"headers":{"Authorization":"Basic QWVvUDZBU3NWN2hZY0Nrbmc2UUdMWU1pdVp3VmMxQjNPSk5iNm1VdkxONzQxTHN6UUdoQ2thN1FNVFVHMmZmaERJRmJoX0VDVVlRY3hRcVY6RUpVYTJOWmpzemUwb191czlQSWI1a0h4UEhkeVBheHNGWWJhNjBidEVxOG1NNTVYZ0Z2c1Y4bXA2M185V0w3UksxSmQwOGlsVGRxNFQ3S3M="},"exception":{"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","trace":"#0 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(153): Shopware\\Components\\HttpClient\\GuzzleHttpClient->post()\n#1 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/TokenResource.php(49): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->sendRequest()\n#2 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/TokenService.php(52): SwagPaymentPayPalUnified\\PayPalBundle\\Resources\\TokenResource->get()\n#3 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(293): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\TokenService->getToken()\n#4 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(117): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->createAuthentication()\n#5 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(260): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->configure()\n#6 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(127): Shopware_Controllers_Backend_PaypalUnifiedSettings->configureClient()\n#7 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Action.php(188): Shopware_Controllers_Backend_PaypalUnifiedSettings->validateAPIAction()\n#8 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch()\n#9 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch()\n#10 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Kernel.php(195): Enlight_Controller_Front->dispatch()\n#11 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\\Kernel->handle()\n#12 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler::handle()\n#13 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(270): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward()\n#14 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\\Components\\HttpCache\\AppCache->forward()\n#15 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass()\n#16 /var/www/vhosts/the-shop-url.de/www/shop-url.de/shopware.php(122): Shopware\\Components\\HttpCache\\AppCache->handle()\n#17 {main}","code":403,"file":"/var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php","line":155,"body":"<html><body>403 Forbidden</body></html>"}} {"uid":"4c44222"} [2024-05-29T18:21:36.651604+02:00] plugin.ERROR: PayPal: Could not create authentication - request exception {"payload":"<html><body>403 Forbidden</body></html>","message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n"} {"uid":"4c44222"} [2024-05-29T18:21:36.651659+02:00] plugin.ERROR: PayPal: Could not validate API credentials due to a communication failure {"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","payload":"<html><body>403 Forbidden</body></html>"} {"uid":"4c44222"} [2024-05-29T18:21:42.462936+02:00] plugin.ERROR: PayPal: GOT ERROR WHILE REQUEST OF TYPE (POST) TO URL: https://api-m.sandbox.paypal.com/v1/oauth2/token {"payload":{"grant_type":"client_credentials"},"headers":{"Authorization":"Basic Og=="},"exception":{"message":"Client error:POST https://api-m.sandbox.paypal.com/v1/oauth2/tokenresulted in a401 Unauthorizedresponse:\n{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}\n","trace":"#0 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(153): Shopware\\Components\\HttpClient\\GuzzleHttpClient->post()\n#1 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/TokenResource.php(49): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->sendRequest()\n#2 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/TokenService.php(52): SwagPaymentPayPalUnified\\PayPalBundle\\Resources\\TokenResource->get()\n#3 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(293): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\TokenService->getToken()\n#4 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(117): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->createAuthentication()\n#5 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(260): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->configure()\n#6 /var/www/vhosts/the-shop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(91): Shopware_Controllers_Backend_PaypalUnifiedSettings->configureClient()\n#7 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Action.php(188): Shopware_Controllers_Backend_PaypalUnifiedSettings->registerWebhookAction()\n#8 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch()\n#9 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch()\n#10 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Kernel.php(195): Enlight_Controller_Front->dispatch()\n#11 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\\Kernel->handle()\n#12 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler::handle()\n#13 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(270): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward()\n#14 /var/www/vhosts/the-shop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\\Components\\HttpCache\\AppCache->forward()\n#15 /var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass()\n#16 /var/www/vhosts/the-shop-url.de/www/shop-url.de/shopware.php(122): Shopware\\Components\\HttpCache\\AppCache->handle()\n#17 {main}","code":401,"file":"/var/www/vhosts/the-shop-url.de/www/shop-url.de/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php","line":155,"body":"{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}"}} {"uid":"289e574"} [2024-05-29T18:21:42.463884+02:00] plugin.ERROR: PayPal: Could not create authentication - request exception {"payload":"{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}","message":"Client error:POST https://api-m.sandbox.paypal.com/v1/oauth2/tokenresulted in a401 Unauthorizedresponse:\n{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}\n"} {"uid":"289e574"} [2024-05-29T18:21:42.463933+02:00] plugin.ERROR: PayPal: Could not register webhooks due to a communication failure {"message":"Client error:POST https://api-m.sandbox.paypal.com/v1/oauth2/tokenresulted in a401 Unauthorizedresponse:\n{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}\n","payload":"{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}"} {"uid":"289e574"}

mitelg commented 5 months ago

hey @julianheusel

the requests are called against the PayPal sandbox API. Are you using live credentials by any chance? :thinking:

julianheusel commented 5 months ago

Hey @mitelg , does this help?

myshop-url.de_coz1izqy79@v2202404141301267024:~$ tail www/shop-url.de/var/log/plugin_production-2024-06-04.log [2024-06-04T11:53:49.742446+02:00] plugin.ERROR: PayPal: GOT ERROR WHILE REQUEST OF TYPE (POST) TO URL: https://api-m.paypal.com/v1/oauth2/token {"payload":{"grant_type":"client_credentials"},"headers":{"Authorization":"Basic QWVvUDZBU3NWN2hZY0Nrbmc2UUdMWU1pdVp3VmMxQjNPSk5iNm1VdkxONzQxTHN6UUdoQ2thN1FNVFVHMmZmaERJRmJoX0VDVVlRY3hRcVY6RUpVYTJOWmpzemUwb191czlQSWI1a0h4UEhkeVBheHNGWWJhNjBidEVxOG1NNTVYZ0Z2c1Y4bXA2M185V0w3UksxSmQwOGlsVGRxNFQ3S3M="},"exception":{"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","trace":"#0 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(153): Shopware\\Components\\HttpClient\\GuzzleHttpClient->post()\n#1 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/TokenResource.php(49): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->sendRequest()\n#2 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/TokenService.php(52): SwagPaymentPayPalUnified\\PayPalBundle\\Resources\\TokenResource->get()\n#3 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(293): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\TokenService->getToken()\n#4 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(117): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->createAuthentication()\n#5 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(260): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->configure()\n#6 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(91): Shopware_Controllers_Backend_PaypalUnifiedSettings->configureClient()\n#7 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Action.php(188): Shopware_Controllers_Backend_PaypalUnifiedSettings->registerWebhookAction()\n#8 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch()\n#9 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch()\n#10 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Kernel.php(195): Enlight_Controller_Front->dispatch()\n#11 /var/www/vhosts/myshop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\\Kernel->handle()\n#12 /var/www/vhosts/myshop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler::handle()\n#13 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(270): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward()\n#14 /var/www/vhosts/myshop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\\Components\\HttpCache\\AppCache->forward()\n#15 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass()\n#16 /var/www/vhosts/myshop-url.de/www/shop-url.de/shopware.php(122): Shopware\\Components\\HttpCache\\AppCache->handle()\n#17 {main}","code":403,"file":"/var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php","line":155,"body":"<html><body>403 Forbidden</body></html>"}} {"uid":"997b56c"} [2024-06-04T11:53:49.743091+02:00] plugin.ERROR: PayPal: Could not create authentication - request exception {"payload":"<html><body>403 Forbidden</body></html>","message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n"} {"uid":"997b56c"} [2024-06-04T11:53:49.743124+02:00] plugin.ERROR: PayPal: Could not register webhooks due to a communication failure {"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","payload":"<html><body>403 Forbidden</body></html>"} {"uid":"997b56c"} [2024-06-04T11:53:55.863556+02:00] plugin.ERROR: PayPal: GOT ERROR WHILE REQUEST OF TYPE (POST) TO URL: https://api-m.paypal.com/v1/oauth2/token {"payload":{"grant_type":"client_credentials"},"headers":{"Authorization":"Basic QWVvUDZBU3NWN2hZY0Nrbmc2UUdMWU1pdVp3VmMxQjNPSk5iNm1VdkxONzQxTHN6UUdoQ2thN1FNVFVHMmZmaERJRmJoX0VDVVlRY3hRcVY6RUpVYTJOWmpzemUwb191czlQSWI1a0h4UEhkeVBheHNGWWJhNjBidEVxOG1NNTVYZ0Z2c1Y4bXA2M185V0w3UksxSmQwOGlsVGRxNFQ3S3M="},"exception":{"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","trace":"#0 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(153): Shopware\\Components\\HttpClient\\GuzzleHttpClient->post()\n#1 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Resources/TokenResource.php(49): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->sendRequest()\n#2 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/TokenService.php(52): SwagPaymentPayPalUnified\\PayPalBundle\\Resources\\TokenResource->get()\n#3 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(293): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\TokenService->getToken()\n#4 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/PayPalBundle/Services/ClientService.php(117): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->createAuthentication()\n#5 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(260): SwagPaymentPayPalUnified\\PayPalBundle\\Services\\ClientService->configure()\n#6 /var/www/vhosts/myshop-url.de/www/shop-url.de/custom/plugins/SwagPaymentPayPalUnified/Controllers/Backend/PaypalUnifiedSettings.php(127): Shopware_Controllers_Backend_PaypalUnifiedSettings->configureClient()\n#7 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Action.php(188): Shopware_Controllers_Backend_PaypalUnifiedSettings->validateAPIAction()\n#8 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch()\n#9 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch()\n#10 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Kernel.php(195): Enlight_Controller_Front->dispatch()\n#11 /var/www/vhosts/myshop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\\Kernel->handle()\n#12 /var/www/vhosts/myshop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler::handle()\n#13 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(270): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward()\n#14 /var/www/vhosts/myshop-url.de/www/shop-url.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\\Components\\HttpCache\\AppCache->forward()\n#15 /var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass()\n#16 /var/www/vhosts/myshop-url.de/www/shop-url.de/shopware.php(122): Shopware\\Components\\HttpCache\\AppCache->handle()\n#17 {main}","code":403,"file":"/var/www/vhosts/myshop-url.de/www/shop-url.de/engine/Shopware/Components/HttpClient/GuzzleHttpClient.php","line":155,"body":"<html><body>403 Forbidden</body></html>"}} {"uid":"673446b"} [2024-06-04T11:53:55.864161+02:00] plugin.ERROR: PayPal: Could not create authentication - request exception {"payload":"<html><body>403 Forbidden</body></html>","message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n"} {"uid":"673446b"} [2024-06-04T11:53:55.864184+02:00] plugin.ERROR: PayPal: Could not validate API credentials due to a communication failure {"message":"Client error:POST https://api-m.paypal.com/v1/oauth2/tokenresulted in a403 Forbiddenresponse:\n<html><body>403 Forbidden</body></html>\n","payload":"<html><body>403 Forbidden</body></html>"} {"uid":"673446b"} Reduzieren

mitelg commented 5 months ago

the error messages look the same for me :thinking:

403 Forbidden always indicates a wrong authorisation, or you are requesting something that is not allowed by your account. So you should really double check your credentials. Otherwise I see not really a reason why this could fail.

julianheusel commented 5 months ago

@mitelg we tried it with the credentials about 20 to 30 times. We also tried the "Authorise" button with the auto created credentials. Nothing works. A 10 times reinstallation did not help either.

mitelg commented 5 months ago

okay, that is strange. As I have no further idea, it would need further debugging on your system. Otherwise it is just guessing into the wild :man_shrugging: If you can, open a support ticket and we can have a deeper look.

julianheusel commented 5 months ago

Thank you for your reply! Where can I open the support ticket?

mitelg commented 5 months ago

https://docs.shopware.com/en/account-en/merchant-area/support