<?php

namespace Sibs\Sibs\Model\Payment;

use Magento\Payment\Model\InfoInterface;
use Sibs\Sibs\Model\SibsPayment;
use Sibs\Sibs\Model\SibsConstants;
use Sibs\Sibs\Model\SibsOrder;

class SibsBlik extends SibsPayment
{
    /**
     * (Overrided) Magento Payment Code
     * 
     * @var string
     */
    protected $_code               = SibsConstants::SIBS_PAYMENT_METHOD_BLIK;

    /**
     * (Overrided) SIBS Payment Method
     * 
     * @var string
     */
    protected $_paymentMethod      = SibsConstants::SIBS_API_METHOD_BLIK;

    /**
     * Supported Currencies
     * 
     * @var array
     */
    protected $_suportedCurrencies = [
        SibsConstants::PLN
    ];

    /**
     * Fetch transaction info.
     *
     * @param InfoInterface $payment
     * @param string $transactionId
     * @return array
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     * @api
     */
    public function fetchTransactionInfo(InfoInterface $payment, $transactionId): array
    {
        return [];
    }

    /**
     * Get Payment Email HTML
     *
     * @param SibsOrder $sibsOrder
     * @return string
     */
    public function getPaymentEmailHTML(SibsOrder $sibsOrder): string
    {
        return '';
    }

    /**
     * Check method for processing with base currency.
     *
     * @param string $currencyCode
     * @return bool
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function canUseForCurrency($currencyCode)
    {
        $storeViewCurrencyCode = $this->getStoreViewCurrencyCode($currencyCode);

        return in_array($storeViewCurrencyCode, $this->_suportedCurrencies);
    }
}
