diff --git a/Block/Adminhtml/System/Config/InstalledVersion.php b/Block/Adminhtml/System/Config/InstalledVersion.php index 648d4ea..49e2c01 100644 --- a/Block/Adminhtml/System/Config/InstalledVersion.php +++ b/Block/Adminhtml/System/Config/InstalledVersion.php @@ -7,7 +7,7 @@ class InstalledVersion extends Field { - public const INSTALLED_VERSION = '1.7.4'; + public const INSTALLED_VERSION = '1.7.5'; protected function _getElementHtml(AbstractElement $element): string { diff --git a/Gateway/Config/ConfigProvider.php b/Gateway/Config/ConfigProvider.php index a3ecf8a..0858565 100644 --- a/Gateway/Config/ConfigProvider.php +++ b/Gateway/Config/ConfigProvider.php @@ -11,8 +11,6 @@ class ConfigProvider public const VAULT_CODE = 'subscribe_pro_vault'; - public const ADMIN_ORDER_AMOUNT_URL = '/admin/subscribepro/order/amount/'; - /** * @var \Swarming\SubscribePro\Model\Config\General */ @@ -48,6 +46,11 @@ class ConfigProvider */ protected $oauth; + /** + * @var \Magento\Backend\Model\UrlInterface + */ + protected $backendUrl; + /** * @param \Swarming\SubscribePro\Model\Config\General $generalConfig * @param Config $gatewayConfig @@ -56,6 +59,7 @@ class ConfigProvider * @param \Swarming\SubscribePro\Platform\Tool\Config $platformConfigTool * @param \Swarming\SubscribePro\Platform\Tool\Oauth $oauth * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @param \Magento\Backend\Model\UrlInterface $backendUrl */ public function __construct( \Swarming\SubscribePro\Model\Config\General $generalConfig, @@ -64,7 +68,8 @@ public function __construct( \Magento\Payment\Model\CcConfigProvider $ccConfigProvider, \Swarming\SubscribePro\Platform\Tool\Config $platformConfigTool, \Swarming\SubscribePro\Platform\Tool\Oauth $oauth, - \Magento\Store\Model\StoreManagerInterface $storeManager + \Magento\Store\Model\StoreManagerInterface $storeManager, + \Magento\Backend\Model\UrlInterface $backendUrl ) { $this->generalConfig = $generalConfig; $this->gatewayConfig = $gatewayConfig; @@ -73,6 +78,7 @@ public function __construct( $this->platformConfigTool = $platformConfigTool; $this->storeManager = $storeManager; $this->oauth = $oauth; + $this->backendUrl = $backendUrl; } /** @@ -98,7 +104,7 @@ public function getConfig($storeId = null) 'isActive' => $this->gatewayConfig->isActive($storeId), 'isThreeDSActive' => $this->gatewayConfig->isThreeDSActive($storeId), 'isWalletAuthorizationActive' => $this->gatewayConfig->isWalletAuthorizationActive($storeId), - 'adminOrderAmountUrl' => self::ADMIN_ORDER_AMOUNT_URL, + 'adminOrderAmountUrl' => $this->backendUrl->getUrl('subscribepro/order/amount'), 'sessionAccessToken' => $this->oauth->getSessionAccessToken($storeId), 'browserSize' => $this->gatewayConfig->getBrowserSize($storeId), 'acceptHeader' => $this->gatewayConfig->getAcceptHeader($storeId), diff --git a/composer.json b/composer.json index 45d5a9e..5a8462e 100755 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": [ "MIT" ], - "version": "1.7.4", + "version": "1.7.5", "authors": [ { "name": "SUBSCRIBE PRO INC", @@ -25,7 +25,7 @@ "magento/module-ui": "^101.0.0|^101.1.0|^101.2.0", "magento/framework": "^101.0.0|^102.0.0|^103.0.0", "subscribepro/subscribepro-php": "~1.1.6" - }, + }, "require-dev": { "magento/zendframework1": "1.12.16", "zendframework/zend-stdlib": "~2.4.6", diff --git a/etc/module.xml b/etc/module.xml index 8e9050c..76ade15 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +