-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathAccount.php
45 lines (40 loc) · 1.2 KB
/
Account.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Phoenix Bank Prepayment module for Magento 2
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @category Mage
* @package Phoenix_BankPayment
* @copyright Copyright (c) 2018 Phoenix Media GmbH (http://www.phoenix-media.eu)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
namespace Phoenix\BankPayment\Helper;
trait Account
{
/**
* @param \Magento\Framework\DataObject $account
* @return bool
*/
public function displayFullAccountData($account) {
return ($this->displaySepaAccountData($account) && $this->displayNonSepaAccountData($account));
}
/**
* @param \Magento\Framework\DataObject $account
* @return bool
*/
public function displayNonSepaAccountData($account) {
return ($account->getAccountNumber() && $account->getSortCode());
}
/**
* @param \Magento\Framework\DataObject $account
* @return bool
*/
public function displaySepaAccountData($account) {
return ($account->getIban());
}
}