18 lines
412 B
PHP
18 lines
412 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\Oceanpayment\Model;
|
|
|
|
use Magento\Quote\Api\Data\CartInterface;
|
|
|
|
class OnepagePaymentMethod extends PaymentMethod
|
|
{
|
|
protected $_code = Config::ONEPAGE_METHOD_CODE;
|
|
|
|
public function isAvailable(?CartInterface $quote = null): bool
|
|
{
|
|
return parent::isAvailable($quote)
|
|
&& trim((string)$this->getConfigData('public_key')) !== '';
|
|
}
|
|
}
|