-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:MONEI/MONEI-AdobeCommerce-Magento2 …
…into php74 # Conflicts: # build/package.json # composer.json # etc/module.xml
- Loading branch information
Showing
72 changed files
with
1,124 additions
and
14,742 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
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,25 @@ | ||
<?php | ||
|
||
/** | ||
* @author Monei Team | ||
* @copyright Copyright © Monei (https://monei.com) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Monei\MoneiPayment\Api\Config; | ||
|
||
/** | ||
* Get payment method configuration interface. | ||
*/ | ||
interface AllMoneiPaymentModuleConfigInterface | ||
{ | ||
|
||
/** | ||
* Check if any payment methods is enabled | ||
* | ||
* @param null $storeId | ||
* @return bool | ||
*/ | ||
public function isAnyPaymentEnabled($storeId = null): bool; | ||
} |
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 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 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 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 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,49 @@ | ||
<?php | ||
|
||
/** | ||
* @author Monei Team | ||
* @copyright Copyright © Monei (https://monei.com) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Monei\MoneiPayment\Model\Config; | ||
|
||
use Monei\MoneiPayment\Api\Config\AllMoneiPaymentModuleConfigInterface; | ||
use Monei\MoneiPayment\Api\Config\MoneiBizumPaymentModuleConfigInterface; | ||
use Monei\MoneiPayment\Api\Config\MoneiCardPaymentModuleConfigInterface; | ||
use Monei\MoneiPayment\Api\Config\MoneiGoogleApplePaymentModuleConfigInterface; | ||
use Monei\MoneiPayment\Api\Config\MoneiPaymentModuleConfigInterface; | ||
|
||
class AllMoneiPaymentModuleConfig implements AllMoneiPaymentModuleConfigInterface | ||
{ | ||
|
||
private MoneiPaymentModuleConfigInterface $moneiPaymentModuleConfig; | ||
private MoneiCardPaymentModuleConfigInterface $moneiCardPaymentModuleConfig; | ||
private MoneiBizumPaymentModuleConfigInterface $moneiBizumPaymentModuleConfig; | ||
private MoneiGoogleApplePaymentModuleConfigInterface $moneiGoogleApplePaymentModuleConfig; | ||
|
||
public function __construct( | ||
MoneiPaymentModuleConfigInterface $moneiPaymentModuleConfig, | ||
MoneiCardPaymentModuleConfigInterface $moneiCardPaymentModuleConfig, | ||
MoneiBizumPaymentModuleConfigInterface $moneiBizumPaymentModuleConfig, | ||
MoneiGoogleApplePaymentModuleConfigInterface $moneiGoogleApplePaymentModuleConfig, | ||
) { | ||
|
||
$this->moneiPaymentModuleConfig = $moneiPaymentModuleConfig; | ||
$this->moneiCardPaymentModuleConfig = $moneiCardPaymentModuleConfig; | ||
$this->moneiBizumPaymentModuleConfig = $moneiBizumPaymentModuleConfig; | ||
$this->moneiGoogleApplePaymentModuleConfig = $moneiGoogleApplePaymentModuleConfig; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function isAnyPaymentEnabled($storeId = null): bool | ||
{ | ||
return (bool) $this->moneiPaymentModuleConfig->isEnabled($storeId) | ||
|| (bool) $this->moneiCardPaymentModuleConfig->isEnabled($storeId) | ||
|| (bool) $this->moneiBizumPaymentModuleConfig->isEnabled($storeId) | ||
|| (bool) $this->moneiGoogleApplePaymentModuleConfig->isEnabled($storeId); | ||
} | ||
} |
Oops, something went wrong.