View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007807 | module PayPal Checkout | module PayPal checkout - sub | public | 2025-07-07 12:03 | 2025-07-10 15:33 |
Reporter | elflein | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 3.3.4 / 2.3.4 / 1.3.4 | ||||
Summary | 0007807: cleanUpNotFinishedOrders() does not check for cancellation status | ||||
Description | If 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 Information | This 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 | ||||
Tags | Order, PayPal | ||||