View Issue Details

IDProjectCategoryView StatusLast Update
0007957module PayPal Checkoutmodule PayPal checkout - subpublic2026-06-11 11:10
ReporterSleTp Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.8.4 / 3.7.4 
Target Version2.9.1 / 3.8.1Fixed in Version2.9.1 / 3.8.1 
Summary0007957: Payment method oscpaypal - inheritance chain for markVouchers is skipped and vouchers are not properly marked as used
DescriptionIn the file Model/Order.php the markVouchers method is overwritten:
    protected function markVouchers($oBasket, $oUser) // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
    {
        $sessionPaymentId = (string) $this->getPaymentService()->getSessionPaymentId();

        // Skip markVoucher if finalizeOrder is called in the proxyController.
        if (PayPalDefinitions::isProxyControllerPayment($sessionPaymentId)) {
            return null;
        }

        return parent::markVouchers($oBasket, $oUser);
    }

For payment methods like "oscpaypal" this means that that vouchers are never marked as used, only ever as reserved. And any module logic that depends on the inheritance chain of that method gets skipped.

We implemented a temp fix in EventSubscriber/PayPalOrderCompletedSubscriber.php, where we call a copy-pasted version of the markVouchers method.
Steps To Reproduce- Put a product in the basket
- Put a voucher in the basket
- Go though the full checkout
- The entry in the oxvouchers table is now only reserved, not used
- Whatever logic is attached by modules to the markVouchers method is *not* executed
Additional InformationQA - ES -
TagsPayPal, Voucher

Relationships

related to 0007944 resolvedmario_lorenz Vouchers in PayPal 

Activities

QA

2026-05-29 15:43

administrator   ~0018519

paypal_oxvoucher_order.png (77,839 bytes)   
paypal_oxvoucher_order.png (77,839 bytes)   
paypal_oxvouchers.png (235,068 bytes)   
paypal_oxvouchers.png (235,068 bytes)