Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/2.2-develop' into backport-iss…
Browse files Browse the repository at this point in the history
…ue-19166
  • Loading branch information
nmalevanec committed Mar 1, 2019
2 parents abcf202 + 13b0fe9 commit 80e5e39
Show file tree
Hide file tree
Showing 1,640 changed files with 67,365 additions and 25,707 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ atlassian*
/.php_cs
/.php_cs.cache
/grunt-config.json
/dev/tools/grunt/configs/local-themes.js

/pub/media/*.*
!/pub/media/.htaccess
Expand Down
147 changes: 147 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/code/Magento/AdminNotification/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lib-libxml": "*"
},
"type": "magento2-module",
"version": "100.2.4",
"version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdvancedPricingImportExport/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
"version": "100.2.4",
"version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
7 changes: 6 additions & 1 deletion app/code/Magento/Analytics/Model/Cryptographer.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ private function getInitializationVector()
*/
private function validateCipherMethod($cipherMethod)
{
$methods = openssl_get_cipher_methods();
$methods = array_map(
'strtolower',
openssl_get_cipher_methods()
);
$cipherMethod = strtolower($cipherMethod);

return (false !== array_search($cipherMethod, $methods));
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
"version": "100.2.3",
"version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Authorization/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
"version": "100.2.2",
"version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Block\Adminhtml\Order\View\Info;

use Magento\Framework\Phrase;
use Magento\Payment\Block\ConfigurableInfo;

/**
* Payment information block for Authorize.net payment method.
*/
class PaymentDetails extends ConfigurableInfo
{
/**
* Returns localized label for payment info block.
*
* @param string $field
* @return string | Phrase
*/
protected function getLabel($field)
{
return __($field);
}
}
29 changes: 22 additions & 7 deletions app/code/Magento/Authorizenet/Model/Directpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet implements Tra
/**
* @var string
*/
protected $_infoBlockType = \Magento\Payment\Block\Info::class;
protected $_infoBlockType = \Magento\Authorizenet\Block\Adminhtml\Order\View\Info\PaymentDetails::class;

/**
* Payment Method feature
Expand Down Expand Up @@ -371,8 +371,7 @@ public function void(\Magento\Payment\Model\InfoInterface $payment)
}

/**
* Refund the amount
* Need to decode last 4 digits for request.
* Refund the amount need to decode last 4 digits for request.
*
* @param \Magento\Framework\DataObject|\Magento\Payment\Model\InfoInterface $payment
* @param float $amount
Expand Down Expand Up @@ -626,6 +625,14 @@ protected function fillPaymentByResponse(\Magento\Framework\DataObject $payment)
$payment->setIsTransactionPending(true)
->setIsFraudDetected(true);
}

$additionalInformationKeys = explode(',', $this->getValue('paymentInfoKeys'));
foreach ($additionalInformationKeys as $paymentInfoKey) {
$paymentInfoValue = $response->getDataByKey($paymentInfoKey);
if ($paymentInfoValue !== null) {
$payment->setAdditionalInformation($paymentInfoKey, $paymentInfoValue);
}
}
}

/**
Expand Down Expand Up @@ -682,6 +689,7 @@ protected function matchAmount($amount)

/**
* Operate with order using information from Authorize.net.
*
* Authorize order or authorize and capture it.
*
* @param \Magento\Sales\Model\Order $order
Expand Down Expand Up @@ -824,6 +832,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
->void($response);
}
$order->registerCancellation($message)->save();
$this->_eventManager->dispatch('order_cancel_after', ['order' => $order ]);
} catch (\Exception $e) {
//quiet decline
$this->getPsrLogger()->critical($e);
Expand Down Expand Up @@ -858,7 +867,7 @@ public function getConfigInterface()
* Getter for specified value according to set payment method code
*
* @param mixed $key
* @param null $storeId
* @param int|string|null|\Magento\Store\Model\Store $storeId
* @return mixed
*/
public function getValue($key, $storeId = null)
Expand Down Expand Up @@ -918,10 +927,13 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
$payment->setIsTransactionDenied(true);
}
$this->addStatusCommentOnUpdate($payment, $response, $transactionId);
return [];

return $response->getData();
}

/**
* Add statuc comment on update.
*
* @param \Magento\Sales\Model\Order\Payment $payment
* @param \Magento\Framework\DataObject $response
* @param string $transactionId
Expand Down Expand Up @@ -996,8 +1008,9 @@ protected function getTransactionResponse($transactionId)
}

/**
* @return \Psr\Log\LoggerInterface
* Get psr logger.
*
* @return \Psr\Log\LoggerInterface
* @deprecated 100.1.0
*/
private function getPsrLogger()
Expand Down Expand Up @@ -1038,7 +1051,9 @@ private function getOrderIncrementId(): string
}

/**
* Checks if filter action is Report Only. Transactions that trigger this filter are processed as normal,
* Checks if filter action is Report Only.
*
* Transactions that trigger this filter are processed as normal,
* but are also reported in the Merchant Interface as triggering this filter.
*
* @param string $fdsFilterAction
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Authorizenet/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
"version": "100.2.2",
"version": "100.2.3",
"license": [
"proprietary"
],
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Authorizenet/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url>
<cgi_url_td_test_mode>https://apitest.authorize.net/xml/v1/request.api</cgi_url_td_test_mode>
<cgi_url_td>https://api2.authorize.net/xml/v1/request.api</cgi_url_td>
<paymentInfoKeys>x_card_type,x_account_number,x_avs_code,x_auth_code,x_response_reason_text,x_cvv2_resp_code</paymentInfoKeys>
</authorizenet_directpost>
</payment>
</default>
Expand Down
5 changes: 5 additions & 0 deletions app/code/Magento/Authorizenet/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@
</argument>
</arguments>
</type>
<type name="Magento\Authorizenet\Block\Adminhtml\Order\View\Info\PaymentDetails">
<arguments>
<argument name="config" xsi:type="object">Magento\Authorizenet\Model\Directpost</argument>
</arguments>
</type>
</config>
6 changes: 6 additions & 0 deletions app/code/Magento/Authorizenet/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@ Debug,Debug
"Minimum Order Total","Minimum Order Total"
"Maximum Order Total","Maximum Order Total"
"Sort Order","Sort Order"
"x_card_type","Credit Card Type"
"x_account_number", "Credit Card Number"
"x_avs_code","AVS Response Code"
"x_auth_code","Processor Authentication Code"
"x_response_reason_text","Processor Response Text"
"x_cvv2_resp_code","CVV2 Response Code"
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ $fraudDetails = $payment->getAdditionalInformation('fraud_details');
<?php endif; ?>

<?php if(!empty($fraudDetails['fraud_filters'])): ?>
<b><?= $block->escapeHtml(__('Fraud Filters')) ?>:
</b></br>
<strong><?= $block->escapeHtml(__('Fraud Filters')) ?>:
</strong></br>
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
<?= $block->escapeHtml($filter['name']) ?>:
<?= $block->escapeHtml($filter['action']) ?>
Expand Down
38 changes: 35 additions & 3 deletions app/code/Magento/Backend/Block/System/Store/Delete/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,39 @@
*/
namespace Magento\Backend\Block\System\Store\Delete;

use Magento\Backup\Helper\Data as BackupHelper;
use Magento\Framework\App\ObjectManager;

/**
* Adminhtml cms block edit form
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Form extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
* @var BackupHelper
*/
private $backup;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Data\FormFactory $formFactory
* @param array $data
* @param BackupHelper|null $backup
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Data\FormFactory $formFactory,
array $data = [],
BackupHelper $backup = null
) {
parent::__construct($context, $registry, $formFactory, $data);
$this->backup = $backup ?? ObjectManager::getInstance()->get(BackupHelper::class);
}

/**
* Init form
*
Expand All @@ -25,7 +51,7 @@ protected function _construct()
}

/**
* {@inheritdoc}
* @inheritDoc
*/
protected function _prepareForm()
{
Expand All @@ -45,15 +71,21 @@ protected function _prepareForm()

$fieldset->addField('item_id', 'hidden', ['name' => 'item_id', 'value' => $dataObject->getId()]);

$backupOptions = ['0' => __('No')];
$backupSelected = '0';
if ($this->backup->isEnabled()) {
$backupOptions['1'] = __('Yes');
$backupSelected = '1';
}
$fieldset->addField(
'create_backup',
'select',
[
'label' => __('Create DB Backup'),
'title' => __('Create DB Backup'),
'name' => 'create_backup',
'options' => ['1' => __('Yes'), '0' => __('No')],
'value' => '1'
'options' => $backupOptions,
'value' => $backupSelected
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected function _toHtml()
}

/**
* Field dependences JSON map generator
* Field dependencies JSON map generator
* @return string
*/
protected function _getDependsJson()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Magento\Backend\Block\Widget\Grid\Massaction;

use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\DataObject;

/**
Expand Down Expand Up @@ -51,7 +52,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand Down Expand Up @@ -216,6 +217,7 @@ public function getGridJsObjectName()
* Retrieve JSON string of selected checkboxes
*
* @return string
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelectedJson()
{
Expand All @@ -230,6 +232,7 @@ public function getSelectedJson()
* Retrieve array of selected checkboxes
*
* @return string[]
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelected()
{
Expand All @@ -251,6 +254,8 @@ public function getApplyButtonHtml()
}

/**
* Get mass action javascript code.
*
* @return string
*/
public function getJavaScript()
Expand All @@ -267,6 +272,8 @@ public function getJavaScript()
}

/**
* Get grid ids in JSON format.
*
* @return string
*/
public function getGridIdsJson()
Expand All @@ -282,7 +289,11 @@ public function getGridIdsJson()
} else {
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
}

if ($allIdsCollection instanceof AbstractDb) {
$allIdsCollection->getSelect()->limit();
$allIdsCollection->clear();
}

$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
return join(",", $gridIds);
Expand All @@ -291,6 +302,8 @@ public function getGridIdsJson()
}

/**
* Get Html id.
*
* @return string
*/
public function getHtmlId()
Expand Down
Loading

0 comments on commit 80e5e39

Please sign in to comment.