-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathBankdata.php
More file actions
59 lines (51 loc) · 1.63 KB
/
Bankdata.php
File metadata and controls
59 lines (51 loc) · 1.63 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* Copyright (c) Ratepay GmbH
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RatePAY\Payment\Controller\Customer;
use \Magento\Framework\View\Result\PageFactory;
class Bankdata extends \Magento\Framework\App\Action\Action
{
/**
* @var \RatePAY\Payment\Helper\Data
*/
protected $rpDataHelper;
/**
* PAYONE base helper
*
* @var Base
*/
protected $baseHelper;
/**
* @param \Magento\Framework\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $pageFactory
* @param \RatePAY\Payment\Helper\Data $rpDataHelper
*/
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $pageFactory,
\RatePAY\Payment\Helper\Data $rpDataHelper
) {
parent::__construct($context);
$this->pageFactory = $pageFactory;
$this->rpDataHelper = $rpDataHelper;
}
/**
* Dispatch request
*
* @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
* @throws \Magento\Framework\Exception\NotFoundException
*/
public function execute()
{
if ((bool)$this->rpDataHelper->getRpConfigDataByPath('ratepay/general/bams_enabled') === true) {
$resultPage = $this->pageFactory->create();
$resultPage->getConfig()->getTitle()->set(__('Bank data management'));
return $resultPage;
}
return $this->resultRedirectFactory->create()->setPath('customer/account');
}
}