-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
2,845 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
.idea | ||
vendor | ||
vendor | ||
auth.json | ||
/Test/Dummy | ||
phpunit_report.xml | ||
phpcs_report.xml | ||
phpmd_report.xml | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
/* | ||
* Copyright (C) 2018-2024 emerchantpay Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* @author emerchantpay | ||
* @copyright 2018-2024 emerchantpay Ltd. | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2 (GPL-2.0) | ||
*/ | ||
|
||
namespace EMerchantPay\Genesis\Block\Frontend; | ||
|
||
use EMerchantPay\Genesis\Model\Config as BackendConfig; | ||
use EMerchantPay\Genesis\Model\Method\Checkout; | ||
use Magento\Framework\View\Element\Template; | ||
|
||
/** | ||
* Get iframe payment processing option to the frontend | ||
* | ||
* Class Config | ||
*/ | ||
class Config extends Template | ||
{ | ||
/** | ||
* @var BackendConfig | ||
*/ | ||
protected BackendConfig $_backendConfig; | ||
|
||
/** | ||
* @param Template\Context $context | ||
* @param BackendConfig $backendConfig | ||
* @param array $data | ||
*/ | ||
public function __construct( | ||
Template\Context $context, | ||
BackendConfig $backendConfig, | ||
array $data = [] | ||
) { | ||
$this->_backendConfig = $backendConfig; | ||
parent::__construct($context, $data); | ||
} | ||
|
||
/** | ||
* Return for frontend is the payment in iframe enabled | ||
* | ||
* @return bool | ||
*/ | ||
public function isIframeProcessingEnabled(): bool | ||
{ | ||
$this->_backendConfig->setMethodCode(Checkout::CODE); | ||
|
||
return $this->_backendConfig->isIframeProcessingEnabled(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.