Skip to content

v1.12.17 cannot create refund  #78

@f123248

Description

@f123248

Hi, we found this error when we doing the refund in magento 2.4.5p4
The function is on null.
image

After that, we was looking into the function at vendor/riskified/magento2new/Model/Observer/ProcessSuccessfulPost.php

Please check the code in 1.12.17
image

We made the modify as below code snippet.
And then, it worked

    /**
     * ProcessSuccessfulPost constructor.
     * @param OrderLogger $logger
     * @param OrderApi $orderApi
     */
    public function __construct(
        OrderLogger $logger,
        OrderApi $orderApi,
        Registry $registry
    ) {
        $this->logger = $logger;
        $this->orderApi = $orderApi;
        $this->registry = $registry;
    }

The $this->registry should added after $this->orderApi = $orderApi;

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