Skip to content

Commit

Permalink
4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin-Magmodules committed Feb 20, 2018
1 parent d0d0df5 commit 7fa6278
Show file tree
Hide file tree
Showing 96 changed files with 5,181 additions and 5,135 deletions.
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2014, Mollie B.V.
Copyright (c) 2012-2018, Mollie B.V.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
62 changes: 62 additions & 0 deletions app/code/community/Mollie/Mpm/Block/Adminhtml/Render/Heading.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php
/**
* Copyright (c) 2012-2018, Mollie B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* @category Mollie
* @package Mollie_Mpm
* @author Mollie B.V. (info@mollie.nl)
* @copyright Copyright (c) 2012-2018 Mollie B.V. (https://www.mollie.nl)
* @license http://www.opensource.org/licenses/bsd-license.php BSD-License 2
*/

class Mollie_Mpm_Block_Adminhtml_Render_Heading extends Mage_Adminhtml_Block_Abstract
implements Varien_Data_Form_Element_Renderer_Interface
{

/**
* @param Varien_Data_Form_Element_Abstract $element
*
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$html = sprintf(
'<tr id="row_%s">
<td colspan="5">
<h4 id="%s" style="border-bottom: 1px solid #dddddd;padding: 20px 5px 5px 5px;">%s</h4>
<div class="comment">
<span>%s</span>
</div>
</td>
</tr>',
$element->getHtmlId(),
$element->getHtmlId(),
$element->getLabel(),
$element->getComment()
);

return $html;
}
}
53 changes: 53 additions & 0 deletions app/code/community/Mollie/Mpm/Block/Adminhtml/Render/Note.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
* Copyright (c) 2012-2018, Mollie B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* @category Mollie
* @package Mollie_Mpm
* @author Mollie B.V. (info@mollie.nl)
* @copyright Copyright (c) 2012-2018 Mollie B.V. (https://www.mollie.nl)
* @license http://www.opensource.org/licenses/bsd-license.php BSD-License 2
*/

class Mollie_Mpm_Block_Adminhtml_Render_Note extends Mage_Adminhtml_Block_Abstract
implements Varien_Data_Form_Element_Renderer_Interface
{

/**
* @param Varien_Data_Form_Element_Abstract $element
*
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
return sprintf(
'<tr id="row_%s">
<td colspan="5" class="label" style="margin-bottom: 10px;">%s</td>
</tr>',
$element->getHtmlId(),
$element->getLabel()
);
}
}
94 changes: 94 additions & 0 deletions app/code/community/Mollie/Mpm/Block/Adminhtml/Render/Status.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php
/**
* Copyright (c) 2012-2018, Mollie B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* @category Mollie
* @package Mollie_Mpm
* @author Mollie B.V. (info@mollie.nl)
* @copyright Copyright (c) 2012-2018 Mollie B.V. (https://www.mollie.nl)
* @license http://www.opensource.org/licenses/bsd-license.php BSD-License 2
*/

class Mollie_Mpm_Block_Adminhtml_Render_Status extends Mage_Adminhtml_Block_Abstract
implements Varien_Data_Form_Element_Renderer_Interface
{

/**
* Mollie Payments Model.
*
* @var Mollie_Mpm_Model_Payments
*/
public $molliePaymentsModel;
/**
* Mollie Methods Model.
*
* @var Mollie_Mpm_Model_Methods
*/
public $mollieMethodsModel;
/**
* Mollie API Model.
*
* @var Mollie_Mpm_Model_Api
*/
public $mollieModel;
/**
* Mollie Helper.
*
* @var Mollie_Mpm_Helper_Api
*/
public $mollieHelper;
/**
* Path to template file in theme.
*
* @var string
*/
protected $_template = 'mollie/mpm/system/config/status.phtml';

/**
* Mollie_Mpm_Block_Adminhtml_System_Config_Status constructor.
*/
public function __construct()
{
parent::__construct();
$this->mollieHelper = Mage::helper('mpm/api');
}

/**
* Render fieldset html.
*
* @param Varien_Data_Form_Element_Abstract $element
*
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$apiCheck = $this->mollieHelper->checkApiInstalled();
if ($apiCheck) {
return $this->toHtml();
} else {
return $this->mollieHelper->getPhpApiErrorMessage();
}
}
}
62 changes: 62 additions & 0 deletions app/code/community/Mollie/Mpm/Block/Adminhtml/Render/Version.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php
/**
* Copyright (c) 2012-2018, Mollie B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* @category Mollie
* @package Mollie_Mpm
* @author Mollie B.V. (info@mollie.nl)
* @copyright Copyright (c) 2012-2018 Mollie B.V. (https://www.mollie.nl)
* @license http://www.opensource.org/licenses/bsd-license.php BSD-License 2
*/

class Mollie_Mpm_Block_Adminhtml_Render_Version extends Mage_Adminhtml_Block_System_Config_Form_Field
{

/**
* Mollie Helper.
*
* @var Mollie_Mpm_Helper_Data
*/
public $mollieHelper;

/**
* Mollie_Mpm_Block_Adminhtml_Render_Version constructor.
*/
public function __construct()
{
parent::__construct();
$this->mollieHelper = Mage::helper('mpm');
}

/**
* @param Varien_Data_Form_Element_Abstract $element
*
* @return mixed
*/
public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
return $this->mollieHelper->getModuleVersion();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?php
/**
* Copyright (c) 2012-2018, Mollie B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* @category Mollie
* @package Mollie_Mpm
* @author Mollie B.V. (info@mollie.nl)
* @copyright Copyright (c) 2012-2018 Mollie B.V. (https://www.mollie.nl)
* @license http://www.opensource.org/licenses/bsd-license.php BSD-License 2
*/

class Mollie_Mpm_Block_Adminhtml_System_Config_Form_Apitest_Button
extends Mage_Adminhtml_Block_System_Config_Form_Field
{

/**
* @var Mage_Adminhtml_Helper_Data
*/
public $helper;

/**
* @inheritdoc.
*/
public function _construct()
{
parent::_construct();
$this->setTemplate('mollie/mpm/system/config/apitest_button.phtml');
$this->helper = Mage::helper('adminhtml');
}

/**
* Return element html
*
* @param Varien_Data_Form_Element_Abstract $element
*
* @return string
*/
public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
return $this->_toHtml();
}

/**
* Return ajax url for button
*
* @return string
*/
public function getAjaxCheckUrl()
{
return $this->helper->getUrl('adminhtml/adminhtml_mollie/apitest');
}

/**
* Generate button html
*
* @return string
*/
public function getButtonHtml()
{
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
->setData(
array(
'id' => 'apitest_check_button',
'label' => $this->helper('adminhtml')->__('Test API key'),
'onclick' => 'javascript:checkApikey(); return false;'
)
);

return $button->toHtml();
}
}
Loading

0 comments on commit 7fa6278

Please sign in to comment.