magento2-docker/app/code/IpSupply/SyncOrder/Setup/UpgradeData.php

35 lines
1.5 KiB
PHP
Executable File

<?php
namespace IpSupply\SyncOrder\Setup;
use Magento\Catalog\Model\Product;
use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\UpgradeDataInterface;
class UpgradeData implements UpgradeDataInterface
{
protected $_eavSetupFactory;
protected $_attributeRepositoryInterface;
protected $_attributeSetupFactory;
public function __construct(
\Magento\Eav\Setup\EavSetupFactory $eavSetupFactory,
\Magento\Eav\Api\AttributeRepositoryInterface $attributeRepositoryInterface,
\Magento\Catalog\Setup\CategorySetupFactory $attributeSetupFactory
) {
$this->_eavSetupFactory = $eavSetupFactory;
$this->_attributeRepositoryInterface = $attributeRepositoryInterface;
$this->_attributeSetupFactory = $attributeSetupFactory;
}
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
\IpSupply\SyncOrder\Config\Setter::set(path: 'config', value: json_encode([
'url' => 'https://api.nswteam.net/api/transferPostData',
'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS5uc3d0ZWFtLm5ldC9hcGkvbG9naW4iLCJpYXQiOjE2ODkzOTEyMDMsImV4cCI6MTcyMDkyNzIwMywibmJmIjoxNjg5MzkxMjAzLCJqdGkiOiJreFA1MW9jck5rdEYzSzY3Iiwic3ViIjozNjkwLCJwcnYiOiJjOGVlMWZjODllNzc1ZWM0YzczODY2N2U1YmUxN2E1OTBiNmQ0MGZjIn0.p-aE0oWkKmdrcKWD94oSmMd_CMbY_4MoqADIwYIhIKw' //
]));
}
}