View Issue Details

IDProjectCategoryView StatusLast Update
0007925module PayPal Checkoutmodule PayPal checkout - subpublic2026-04-23 14:02
ReportereWorks GmbH Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status assignedResolutionopen 
Product Version2.8.3 / 3.7.3 
Target Version2.8.4 / 3.7.4Fixed in Version2.8.4 / 3.7.4 
Summary0007925: Keine Fehlermeldung bei verdrehter shipping/address/admin_area_2 Angabe
DescriptionHaben mehrere Fälle im Paypal Log beobachtet, bei denen eine 422 Unknown Error bzw. Unprocessable Entity Response mit der Ursache "CITY_REQUIRED" oder "REQUIRED_PARAMETER_FOR_PAYMENT_SOURCE" von Paypal zurückkam. Beide beziehen sich auf das Feld shipping/address/admin_area_2 im Request, welches aus einem unbekannten Grund die Postleitzahl des Benutzers beinhaltet hatte. Gleichzeitig war der Name der Stadt im Feld shipping/address/postal_code zu finden. Also verdreht. Wie das passiert ist - keine Ahnung. Kann mir vorstellen, dass die Adresse so via Paypal Express reinkam oder schon ewig so im Benutzerkonto hinterlegt war und sonst nie anderweitig validiert wurde.

Unschön ist hier nun, dass der Benutzer in so einem Fall keinerlei Info dazu bekommt, was kaputt ist. Wenn er via Kreditkarte bezahlt, kommt kurz der Spinner vom Paypal Overlay aber schließt sich direkt wieder und zeigt die Bestellübersicht (Schritt 4) ohne irgendeine Fehlermeldung.

Im Netzwerktab vom Browser ist der passenden Request zu finden und der zeigt als Response vom Server die Offline-Seite vom Shop. Es wurde also eine Exception ausgelöst und nicht gefangen. Die Exception kommt in dem Fall aus AjaxPaymentController->createAcdcOrder() und dort dem doCreatePatchedOrder()-Aufruf (https://github.com/OXID-eSales/paypal-module/blob/b-6.3.x/src/Controller/AjaxPaymentController.php#L448) Dieser ist nicht von einem Try-Catch Block umschlossen.

Und selbst wenn der doCreatePatchedOrder()-Aufruf in den dadrüberliegenden Try-Catch-Block geschoben wird, weiß der JS-Teil im Frontend anscheinend nichts mit der "error" > "failed to execute shop order" Response anzufangen. Heißt, es wird keinerlei Fehlermeldung á la "Ungültige Postleitzahl" angezeigt oder irgendwohin (Schritt 2 Adresseingabe wäre wohl am sinnvollsten) zurückgeleitet.
Steps To Reproduce1) Benutzerkonto registrieren und dabei Postleitzahl und Stadt vertauschen
2) Bestellung via Kreditkartenzahlung abschließen
3) OXID Exception Log prüfen
Additional InformationQA - ES

PayPal Log:
[2026-04-22 18:17:50] PayPal Payment Logger.ERROR: RES | 81a287 | PATCH | /orders/8LA598377L828921W | PATCH https://api.sandbox.paypal.com/v2/checkout/orders/8LA598377L828921W returned: 422 Unprocessable Entity
Returned Message: The requested action could not be performed, semantically incorrect, or failed business validation.
Error Details:
[{"field":"\/purchase_units\/@reference_id=='OXID_REFERENCE'\/shipping\/address\/admin_area_2","issue":"CITY_REQUIRED","description":"The specified country requires a city (address.admin_area_2)"}]

Response:
{"name":"UNPROCESSABLE_ENTITY","debug_id":"59b416f696f0a","links":[{"href":"https:\/\/developer.paypal.com\/api\/rest\/reference\/orders\/v2\/errors\/#CITY_REQUIRED","rel":"information_link","method":"GET"}]}

The following curl request could be used to simulate a similar request:
            
curl -v -X PATCH "https://api.sandbox.paypal.com/v2/checkout/orders/8LA598377L828921W" -H "User-Agent: GuzzleHttp/7" -H "Host: api.sandbox.paypal.com" -H "Content-Type: application/json" -H "PayPal-Partner-Attribution-Id: OXID_Cart_PPCP_fromv261" -H "PayPal-Request-Id: c7b8cf1e1649c9bdc84c80ccca958c10" -H "Authorization: Bearer A21AAJc9rOtvbUpJhQs_v5mbqFzvUyWHHUbsQJJUrn8I7v0tLmBug9vpVRWn2K7O6uWzuDsj8sJQgFOJ7WkhAVw5ifEjzFE_A" -d [{"op":"replace","path":"\/purchase_units\/@reference_id=='OXID_REFERENCE'\/amount","value":{"currency_code":"EUR","value":"719.10","breakdown":{"item_total":{"currency_code":"EUR","value":"719.10"},"shipping":{"currency_code":"EUR","value":"0.00"},"tax_total":{"currency_code":"EUR","value":"0.00"},"discount":{"currency_code":"EUR","value":"0.00"}}}},{"op":"add","path":"\/purchase_units\/@reference_id=='OXID_REFERENCE'\/custom_id","value":"{\"id\":\"81a287\",\"oxordernr\":\"96\",\"moduleVersion\":\"2.8.3\",\"oxidVersion\":\"6.5.5\"}"},{"op":"replace","path":"\/purchase_units\/@reference_id=='OXID_REFERENCE'\/items","value":[{"name":"Kite CORE GT","unit_amount":{"currency_code":"EUR","value":"719.10"},"quantity":"1","sku":"1205","category":"DIGITAL_GOODS"}]}] ["[object] (OxidSolutionCatalysts\\PayPalApi\\Exception\\ApiException(code: 422): PATCH https://api.sandbox.paypal.com/v2/checkout/orders/8LA598377L828921W returned: 422 Unprocessable Entity\nReturned Message: The requested action could not be performed, semantically incorrect, or failed business validation.\nError Details: \n[{\"field\":\"\\/purchase_units\\/@reference_id=='OXID_REFERENCE'\\/shipping\\/address\\/admin_area_2\",\"issue\":\"CITY_REQUIRED\",\"description\":\"The specified country requires a city (address.admin_area_2)\"}]\n\nResponse: \n{\"name\":\"UNPROCESSABLE_ENTITY\",\"debug_id\":\"59b416f696f0a\",\"links\":[{\"href\":\"https:\\/\\/developer.paypal.com\\/api\\/rest\\/reference\\/orders\\/v2\\/errors\\/#CITY_REQUIRED\",\"rel\":\"information_link\",\"method\":\"GET\"}]}\n\nThe following curl request could be used to simulate a similar request:\n \ncurl -v -X PATCH \"https://api.sandbox.paypal.com/v2/checkout/orders/8LA598377L828921W\" -H \"User-Agent: GuzzleHttp/7\" -H \"Host: api.sandbox.paypal.com\" -H \"Content-Type: application/json\" -H \"PayPal-Partner-Attribution-Id: OXID_Cart_PPCP_fromv261\" -H \"PayPal-Request-Id: c7b8cf1e1649c9bdc84c80ccca958c10\" -H \"Authorization: Bearer A21AAJc9rOtvbUpJhQs_v5mbqFzvUyWHHUbsQJJUrn8I7v0tLmBug9vpVRWn2K7O6uWzuDsj8sJQgFOJ7WkhAVw5ifEjzFE_A\" -d [{\"op\":\"replace\",\"path\":\"\\/purchase_units\\/@reference_id=='OXID_REFERENCE'\\/amount\",\"value\":{\"currency_code\":\"EUR\",\"value\":\"719.10\",\"breakdown\":{\"item_total\":{\"currency_code\":\"EUR\",\"value\":\"719.10\"},\"shipping\":{\"currency_code\":\"EUR\",\"value\":\"0.00\"},\"tax_total\":{\"currency_code\":\"EUR\",\"value\":\"0.00\"},\"discount\":{\"currency_code\":\"EUR\",\"value\":\"0.00\"}}}},{\"op\":\"add\",\"path\":\"\\/purchase_units\\/@reference_id=='OXID_REFERENCE'\\/custom_id\",\"value\":\"{\\\"id\\\":\\\"81a287\\\",\\\"oxordernr\\\":\\\"96\\\",\\\"moduleVersion\\\":\\\"2.8.3\\\",\\\"oxidVersion\\\":\\\"6.5.5\\\"}\"},{\"op\":\"replace\",\"path\":\"\\/purchase_units\\/@reference_id=='OXID_REFERENCE'\\/items\",\"value\":[{\"name\":\"Kite CORE GT\",\"unit_amount\":{\"currency_code\":\"EUR\",\"value\":\"719.10\"},\"quantity\":\"1\",\"sku\":\"1205\",\"category\":\"DIGITAL_GOODS\"}]}] at /var/www/oxideshop/vendor/oxid-solution-catalysts/paypal-client/src/Service/BaseService.php:59)\n[stacktrace]\n#0 /var/www/oxideshop/vendor/oxid-solution-catalysts/paypal-client/src/Service/BaseService.php(114): OxidSolutionCatalysts\\PayPalApi\\Service\\BaseService->send('PATCH', '/orders/8LA5983...', Array, Array, '[{\"op\":\"replace...')\n#1 /var/www/oxideshop/vendor/oxid-solution-catalysts/paypal-client/generated/Service/Orders.php(131): OxidSolutionCatalysts\\PayPalApi\\Service\\BaseService->sendWithRequestResponseLogging('PATCH', '/orders/8LA5983...', Array, Array, '[{\"op\":\"replace...')\n#2 /var/www/oxideshop/vendor/oxid-solution-catalysts/paypal-module/src/Service/Payment.php(254): OxidSolutionCatalysts\\PayPalApi\\Service\\Orders->updateOrder('8LA598377L82892...', Array, 'OXID_Cart_PPCP_...')\n#3 /var/www/oxideshop/vendor/oxid-solution-catalysts/paypal-module/src/Service/Payment.php(219): OxidSolutionCatalysts\\PayPal\\Service\\Payment->doPatchPayPalOrder(Object(OxidSolutionCatalysts\\PayPal\\Model\\Basket), '8LA598377L82892...', Object(OxidSolutionCatalysts\\PayPal\\Model\\Order))\n#4 /var/www/oxideshop/vendor/oxid-solution-catalysts/paypal-module/src/Controller/AjaxPaymentController.php(449): OxidSolutionCatalysts\\PayPal\\Service\\Payment->doCreatePatchedOrder(Object(OxidSolutionCatalysts\\PayPal\\Model\\Basket))\n#5 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Controller/BaseController.php(534): OxidSolutionCatalysts\\PayPal\\Controller\\AjaxPaymentController->createAcdcOrder()\n#6 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ee/Core/Controller/BaseController.php(64): OxidEsales\\EshopCommunity\\Core\\Controller\\BaseController->executeFunction('createAcdcOrder')\n#7 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(347): OxidEsales\\EshopEnterprise\\Core\\Controller\\BaseController->executeFunction('createAcdcOrder')\n#8 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(280): OxidEsales\\EshopCommunity\\Core\\ShopControl->executeAction(Object(OxidSolutionCatalysts\\PayPal\\Controller\\AjaxPaymentController), 'createAcdcOrder')\n#9 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(142): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidSolutionCat...', 'createAcdcOrder', NULL, NULL)\n#10 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(27): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#11 /var/www/oxideshop/source/index.php(16): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#12 {main}\n"] []
TagsNo tags attached.

Activities

There are no notes attached to this issue.