Skip to content

Issue with Klarna checkout on Magento 2.4.7 #198

@edas11

Description

@edas11

Hi, I'm upgrading our Magento installation to 2.4.7. We are using Klarna checkout with Vipps. Version of vipps/module-payment is 2.4.50 and version of klarna/m2-klarna is 2.2.3. When trying to place a Vipps order I get an error Error: Typed property Klarna\Kco\Model\Api\Kasper::$klarnaOrder must not be accessed before initialization in /var/www/html/vendor/klarna/module-kco/Model/Api/Kasper.php:228 on request /vipps/payment/klarna_initRegular. Can you check why this errors is thrown?

I investigated this issue a bit myself and adding this to di.xml fixes the error:

<type name="Vipps\Payment\GatewayEpayment\Command\PaymentCommandManager">
        <arguments>
            <argument name="commandManager" xsi:type="object">EcommerceCommandManager</argument>
        </arguments>
</type>

Looks like Vipps acts as if Api Version is set to MobilePay even though it is Vipps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions