Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive setup #3

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: php

sudo: false

php:
- 7.0
- 7.1

script:
# Run your tests here.
- echo 'Tested'
14 changes: 0 additions & 14 deletions code/Bitpay/BPCheckout/Api/IpnManagementInterface.php

This file was deleted.

15 changes: 0 additions & 15 deletions code/Bitpay/BPCheckout/Api/ModalManagementInterface.php

This file was deleted.

24 changes: 0 additions & 24 deletions code/Bitpay/BPCheckout/BitPayLib/BPC_Buttons.php

This file was deleted.

11 changes: 0 additions & 11 deletions code/Bitpay/BPCheckout/BitPayLib/BPC_Client.php

This file was deleted.

45 changes: 0 additions & 45 deletions code/Bitpay/BPCheckout/BitPayLib/BPC_Configuration.php

This file was deleted.

106 changes: 0 additions & 106 deletions code/Bitpay/BPCheckout/BitPayLib/BPC_Invoice.php

This file was deleted.

21 changes: 0 additions & 21 deletions code/Bitpay/BPCheckout/BitPayLib/BPC_Item.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
*
*/

/**
* This is used to display php extensions and if they are installed or not
*/
namespace Bitpay\Core\Block\Adminhtml\System\Config\Form\Field;

use Magento\Framework\App\ObjectManager;
use Magento\Framework\Data\Form\Element\AbstractElement;

class Extension extends \Magento\Config\Block\System\Config\Form\Field
{
/**
* Render element html
*
* @param AbstractElement $element
* @return string
* @throws \Exception
*/
protected function _getElementHtml(AbstractElement $element)
{
if (false === isset($element) || true === empty($element)) {
/* @var $helper \Bitpay\Core\Helper\Data */
$helper = ObjectManager::getInstance()->get('Bitpay\Core\Helper\Data');
$message = $helper->logError('Missing or invalid $element parameter passed to function.', __METHOD__);
throw new \Exception($message);
}

$config = $element->getFieldConfig();
$phpExtension = isset($config['php_extension']) ? $config['php_extension'] : 'null';

if (true === in_array($phpExtension, get_loaded_extensions())) {
return 'Installed';
}

return 'Not Installed';
}
}
44 changes: 44 additions & 0 deletions code/Bitpay/BPCheckout/Block/Form/Bitpay.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @see https://github.com/bitpay/magento-plugin/blob/master/LICENSE
*/

namespace Bitpay\Core\Block\Form;

use Bitpay\Core\Model\Method\Bitcoin;
use Magento\Customer\Helper\Session\CurrentCustomer;
use Magento\Framework\App\ObjectManager;
use Magento\Payment\Block\Form;

class Bitpay extends Form
{

/**
* Payment method code
*
* @var string
*/
protected $_methodCode = Bitcoin::CODE;

/**
* @var CurrentCustomer
*/
protected $currentCustomer;

protected function _construct()
{
$template = 'Bitpay_Core::bitpay/form/bitpay.phtml';
$this->setTemplate($template);

parent::_construct();
}

/**
* @return \Bitpay\Core\Helper\Data
*/
public function getHelper() {
return ObjectManager::getInstance()->get('Bitpay\Core\Helper\Data');
}

}
Loading