-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from mollie/development
1.0.0
- Loading branch information
Showing
84 changed files
with
695 additions
and
151 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Copyright © 2017 Mollie.eu. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Mollie\Payment\Block\Adminhtml\Render; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
use Mollie\Payment\Helper\General as GeneralHelper; | ||
use Magento\Backend\Block\Template\Context; | ||
|
||
class Header extends Field | ||
{ | ||
|
||
protected $general; | ||
protected $_template = 'Mollie_Payment::system/config/fieldset/header.phtml'; | ||
|
||
/** | ||
* Header constructor. | ||
* @param Context $context | ||
* @param GeneralHelper $general | ||
*/ | ||
public function __construct( | ||
Context $context, | ||
GeneralHelper $general | ||
) { | ||
$this->general = $general; | ||
parent::__construct($context); | ||
} | ||
|
||
/** | ||
* @param AbstractElement $element | ||
* @return string | ||
*/ | ||
public function render(AbstractElement $element) | ||
{ | ||
$element->addClass('Mollie'); | ||
|
||
return $this->toHtml(); | ||
} | ||
} |
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,57 @@ | ||
<?php | ||
/** | ||
* Copyright © 2017 Magmodules.eu. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Mollie\Payment\Block; | ||
|
||
use Magento\Checkout\Model\Session; | ||
use Magento\Backend\Block\Template\Context; | ||
use Magento\Framework\View\Element\Template; | ||
|
||
class Loading extends Template | ||
{ | ||
protected $checkoutSession; | ||
|
||
/** | ||
* Loading constructor. | ||
* | ||
* @param Context $context | ||
* @param Session $checkoutSession | ||
* @param array $data | ||
*/ | ||
public function __construct( | ||
Context $context, | ||
Session $checkoutSession, | ||
array $data = [] | ||
) { | ||
$this->checkoutSession = $checkoutSession; | ||
parent::__construct($context, $data); | ||
} | ||
|
||
/** | ||
* Disable caching of block. | ||
* | ||
* @return null | ||
*/ | ||
public function getCacheLifetime() | ||
{ | ||
return null; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getRedirectUrl() | ||
{ | ||
$orderId = $this->checkoutSession->getLastRealOrder()->getId(); | ||
if ($this->checkoutSession->getMollieRedirect() == $orderId) { | ||
$this->checkoutSession->restoreQuote(); | ||
return $this->getUrl('checkout/') . '#payment'; | ||
} else { | ||
$this->checkoutSession->setMollieRedirect($orderId); | ||
return $this->getMollieRedirect(); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.