Skip to content

grupatopex/magento2-webservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gtx_Webservice

Sample Magento2 plugin for GTX webservice authorization.

Configuration

For NTLM authentication setup go to Stores -> Configuration -> Topex -> Webservice

Usage

<?php

use Gtx\Webservice\Model\File as WebserviceFile;

class MediaGalleryProcessorPlugin
{

    /**
     * @var WebserviceFile
     */
    private WebserviceFile $webserviceFile;

    /**
     * @param WebserviceFile $webserviceFile
     */
    public function __construct(
        WebserviceFile $webserviceFile
    ) {
        $this->webserviceFile = $webserviceFile;
    }

    /**
     * @param string $url
     * @return string
     */
    public function getImageContent(string $url): string
    {
        return $this->webserviceFile->fetch($url);
    }

}

About

Sample Magento2 plugin for GTX webservice authorization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages