View Issue Details

IDProjectCategoryView StatusLast Update
0007807module PayPal Checkoutmodule PayPal checkout - subpublic2025-07-10 15:33
Reporterelflein Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version3.3.4 / 2.3.4 / 1.3.4 
Summary0007807: cleanUpNotFinishedOrders() does not check for cancellation status
DescriptionIf the module option "oscPayPalCleanUpNotFinishedOrdersAutomaticlly" is set to true, OrderRepository::cleanUpNotFinishedOrders() is called via the webhook.

In this function the OXIDs of all orders that have OXTRANSSTATUS = "NOT_FINISHED" and are older than the set amount of minutes are selected. Each of this orders is loaded into an object and then Order::cancelOrder() is called.
The select should definitely also have a condition like OXSTORNO = 0, because otherwise the number of orders that are loaded into an object will always increase, even if there are none that need cancelling.

https://github.com/OXID-eSales/paypal-module/blob/7855cbe845641289f52969cbcdc36cbdd1ef3f02/src/Service/OrderRepository.php#L159

It might also be a good idea to omit the leading '%' in this condition:

->andWhere($queryBuilder->expr()->like(
    'oxpaymenttype',
    $queryBuilder->expr()->literal('%' . $parameters['oxpaymenttype'] . '%')
))

All payment methods added by the module start with "oscpaypal" and LIKE conditions with a leading '%' tend to get really slow.

Thank you in advance for considering these two changes.
Additional InformationThis not only applies to the selected version 3.3.4 but also to 3.4.1 which we currently use and it also seems unchanged in v3.5.0-rc.3
TagsOrder, PayPal

Activities

QA

2025-07-07 20:58

administrator   ~0018028

- es -
Thank you very much for your suggestions for improvement.