Make sure the user needs to select store.
This commit is contained in:
parent
2356aa3750
commit
4c340ee466
@ -291,8 +291,11 @@ class Data
|
||||
|
||||
$applicationIdentifier = 'magento2';
|
||||
$baseUrl = $this->btcPayService->getBtcPayServerBaseUrl();
|
||||
$authorizeUrl = null;
|
||||
|
||||
$authorizeUrl = \BTCPayServer\Client\ApiKey::getAuthorizeUrl($baseUrl, \Storefront\BTCPay\Helper\Data::REQUIRED_API_PERMISSIONS, 'Magento 2 @ ' . $magentoRootDomain, true, false, $redirectToUrlAfterCreation, $applicationIdentifier);
|
||||
if ($baseUrl) {
|
||||
$authorizeUrl = \BTCPayServer\Client\ApiKey::getAuthorizeUrl($baseUrl, \Storefront\BTCPay\Helper\Data::REQUIRED_API_PERMISSIONS, 'Magento 2 @ ' . $magentoRootDomain, true, true, $redirectToUrlAfterCreation, $applicationIdentifier);
|
||||
}
|
||||
|
||||
return $authorizeUrl;
|
||||
}
|
||||
|
||||
@ -68,10 +68,10 @@ class ApiKeyComment implements CommentInterface
|
||||
|
||||
$baseUrl = $this->btcPayService->getBtcPayServerBaseUrl();
|
||||
if ($baseUrl) {
|
||||
$authorizeUrl = \BTCPayServer\Client\ApiKey::getAuthorizeUrl($baseUrl, \Storefront\BTCPay\Helper\Data::REQUIRED_API_PERMISSIONS, 'Magento 2 @ ' . $magentoRootDomain, true, false, $redirectToUrlAfterCreation, $applicationIdentifier);
|
||||
$authorizeUrl = \BTCPayServer\Client\ApiKey::getAuthorizeUrl($baseUrl, \Storefront\BTCPay\Helper\Data::REQUIRED_API_PERMISSIONS, 'Magento 2 @ ' . $magentoRootDomain, true, true, $redirectToUrlAfterCreation, $applicationIdentifier);
|
||||
$r = '<a target="_blank" href="' . $authorizeUrl . '">Generate API key</a>, but be sure to save any changes first.';
|
||||
} else {
|
||||
$r = 'Make sure you configure the <strong>VTCPay Base Url</strong> above';
|
||||
$r = 'Make sure you configure the <strong>BTCPay Base Url</strong> above';
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user