src/Payum/Core/Registry/AbstractRegistry.php
public function getStorage($class)
    {
        $class = is_object($class) ? get_class($class) : $class;

        // TODO: this is a quick fix. I have to find a better\clean solution.
        if (class_exists($class) && interface_exists(Proxy::class)) {
            $rc = new \ReflectionClass($class);
            if ($rc->implementsInterface(Proxy::class)) {
                $class = $rc->getParentClass()->getName();
            }
        }

        if (!isset($this->storages[$class])) {
            throw new InvalidArgumentException(sprintf(
                'A storage for model %s was not registered. There are storages for next models: %s.',
                $class,
                implode(', ', array_keys($this->storages))
            ));
        }

        return $this->getService($this->storages[$class]);
    }
public function getStorage($class)
    {
        $class = is_object($class) ? get_class($class) : $class;

        // TODO: this is a quick fix. I have to find a better\clean solution.
        if (class_exists($class) && interface_exists(Proxy::class)) {
            $rc = new \ReflectionClass($class);
            if ($rc->implementsInterface(Proxy::class)) {
                $class = $rc->getParentClass()->getName();
            }
        }

        if (!isset($this->storages[$class])) {
            throw new InvalidArgumentException(sprintf(
                'A storage for model %s was not registered. There are storages for next models: %s.',
                $class,
                implode(', ', array_keys($this->storages))
            ));
        }

        return $this->getService($this->storages[$class]);
    }
{@inheritDoc}