30 lines
714 B
PHP
30 lines
714 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\OceanpaymentKlarna\Model;
|
|
|
|
use Magento\Checkout\Model\ConfigProviderInterface;
|
|
use Magento\Framework\UrlInterface;
|
|
|
|
class ConfigProvider implements ConfigProviderInterface
|
|
{
|
|
public function __construct(
|
|
private readonly UrlInterface $urlBuilder
|
|
) {
|
|
}
|
|
|
|
public function getConfig(): array
|
|
{
|
|
return [
|
|
'payment' => [
|
|
Config::METHOD_CODE => [
|
|
'redirectUrl' => $this->urlBuilder->getUrl(
|
|
'oceanpaymentklarna/payment/redirect',
|
|
['_secure' => true, '_nosid' => true]
|
|
),
|
|
],
|
|
],
|
|
];
|
|
}
|
|
}
|