View Issue Details

IDProjectCategoryView StatusLast Update
0007784module PayPal Checkoutmodule PayPal checkout - subpublic2025-08-19 11:03
Reporterfcos Assigned To 
PrioritynormalSeverityminorReproducibilityrandom
Status resolvedResolutionfixed 
Product Version2.5.2 / 3.4.0 
Fixed in Version2.6.0 
Summary0007784: order handling when paypal checkout order id is missing
DescriptionHello,

we had some weird order state combination and it seem that it could be a missing paypal checkout order id and the handling in
vendor/oxid-solution-catalysts/paypal-module/src/Controller/OrderController.php;:finalizepaypalsession().

The order is payed in paypal, oxtransstatus = OK. Folder is new and mail got send, but the order was automatically canceled in oxid.

We found the following in the log:
PayPal Payment Logger.ERROR: Client error: `GET https://api.paypal.com/v2/checkout/orders/` resulted in a `404 Not Found` response , wich comes from OxidSolutionCatalysts\\PayPal\\Service\\Payment->fetchOrderFields('', ''), because it got requested with an empty order id.

It seems the checkout order id from the paypal session PayPalSession::getCheckoutOrderId() was missing in finalizepaypalsession().

That triggers the following code:

````
$cancelSession = !$sessionOrderId ||
            !$sessionCheckoutOrderId ||
            ($standardRequestId !== $sessionCheckoutOrderId);
        if (!$vaulting && $cancelSession) {
            $this->getServiceFromContainer(OrderPayPalService::class)
                ->cancelPayPalSession('request to session mismatch');
        }

````

 wich calls removeTemporaryOrder() and cancels the order, but the return from cancelPayPalSession doesnt get processed in finalizepaypalsession so the code in
finalizepaypalsession continues.

Shouldnt there be a redirect for the return from cancelPayPalSession() or is the current logic correct?

At the moment we cant say why the paypal order id was missing, but it seems the oxid order id (sess_challenge) was there because we didtn see other hard faulure for not loading the order and the order state... was set.



Steps To ReproduceUnfortunately thats nothing we can reproduce under normal circumstances, to test this we just set $sessionCheckoutOrderId = '' in finalizepaypalsession ():

TagsNo tags attached.

Activities

mario_lorenz

2025-08-19 10:56

developer   ~0018155

If the problem is not resolved, please reopen the ticket.

mario_lorenz

2025-08-19 11:03

developer   ~0018156

In the current module version (v2.6.1 for OXID6 and v3.5.0 for OXID7), we have revised how we handle canceled orders and subsequent retries. This means that the customer can now retry a previously canceled order using PayPal or credit card.

This may have been the exact problem of the missing OrderID in the session.

Could you try this again?

If the problem is still not resolved, please reopen the ticket.