Skip to content

Commit

Permalink
[Backport] Fixed - Lifetime update syntax error magento#13309 (#4)
Browse files Browse the repository at this point in the history
* Escaped output of html attributes

* MAGETWO-97466: Refreshing checkout page deletes shipping address on guest checkout

* MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed

* MAGETWO-72879: Update product from mini shopping cart doesn't reflect in the shopping cart

* meassage icon alignment issue resolved

* ENGCOM-3851: Static test fix.

* ENGCOM-3893: Static test fix.

* MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed

* MAGETWO-97826: Skipped Randomly failing MFTF test AdminCheckingCreditMemoTotalsTest

* MAGETWO-97825: Skipped Randomly failing test AdminCreateCreditMemoWhenCartRuleDeletedTest

* Fixed-19800: Contact us : design improvement.

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* ENGCOM-3763: Static test fix.

* Fixed-19791: Logo vertical misalignment.

* Fixed-Checkbox-Alignement: Checkbox alignment issue.

* MAGETWO-72879: Update product from mini shopping cart doesn't reflect in the shopping cart

* MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* magento#18362: Fixed static tests

* Added constants to unit codes to make it easier to reuse it if necessary.

* ENGCOM-3774: Static test fix.

* MAGETWO-96815: There is no option to remove the Store Credit from the payment page of checkout

* Fix negative credit memo bug caused by credit memo discount total calculator

* ENGCOM-3720: Static test fix.

* Added required error message.

If any JSON error occurs user will be be shown error message if the app mode is not in Production.

* Fixed Unused Local variable

* Fixed unused local variable

* Removed use of Class ObjectManager in Construct

* Updated to show error message to all Env.

* Update lib/internal/Magento/Framework/Serialize/Serializer/Json.php

Co-Authored-By: vinogcs <vinogcs@users.noreply.github.com>

* ENGCOM-3782: Static test fix.

* Add useful debug info for which website has not been found

* Add with code/with id text

* MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values)

* MAGETWO-96815: There is no option to remove the Store Credit from the payment page of checkout

* Issue fixed magento#19985 Send email confirmation popup close button area overlapping to content

Issue fixed magento#19985 Send email confirmation popup close button area overlapping to content

* Issue fixed magento#19985 Send email confirmation popup close button area overlapping

Issue fixed magento#19985 Send email confirmation popup close button area overlapping

* Order API resources updated.

* 'wishlist-page-edit-remove-item-misalign' :: On wish list page edit, remove item misalign in 640 X 767 resolution

* Order-view-invoices :: Order view invoices template not display proper on ipad

* Updated CancelOrderItemObserver.php

Fixed Issue magento#20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No

* ENGCOM-3845: Static test fix.

* MAGETWO-74604: Event clean_cache_by_tags didn't clean all tags pointed in getIdentity

* MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values)

* MAGETWO-97899: [FT] [MFTF] AdminAvailabilityCreditMemoWithNoPaymentTest fails because of bad design

* MAGETWO-94157: Issue with products with customizable options

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-93832: Automate with MFTF Copy Single Update to Another Update

* MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values)

* Static test fix.

* MAGETWO-95276: Varnish "Connection reset by peer" error when large catalog is reindexed on schedule

* MAGETWO-95176: Detaching category from product causes massive product url regeneration

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-73625: Products change in one category will cause cache miss for other categories (Only reproducible by unassigning products from backend category page)

* admin-order-info-issue2.2

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* Fix static test.

* MAGETWO-95176: Detaching category from product causes massive product url regeneration

* magento#20376 Fix issue with file uploading if an upload field is disabled

* magento#20461 Add translate component

* (Fixes issue magento#18027) Round the total amount to 4 decimal places, to avoid floating point overflows

* round the total amount only if it is float

* round base total amount

* cast formatted number to float

* thousand separator removed from number format

* use round instead of number_format to round the total amount

* unnecessary comments removed

* ENGCOM-3464: Static tests fixed.

* fixed Negative order amount in dashboard - magento#18754

* Fix static test.

* Update styles-old.less

* update-button-issue-while-updating-billing-and-shipping-address

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* issue fixed magento#20563 Go to shipping information, Update qty & Addresses and Enter a new address button Not aligned from left and right in 767px screen size

issue fixed magento#20563 Go to shipping information, Update qty & Addresses and Enter a new address button Not aligned from left and right in 767px screen size

* recent-order-product-title-misaligned

* Fix static tests.

* Fix static tests.

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* MAGETWO-94114: Cannot refresh Captcha image in production mode

* MQE-1420: Bump MFTF version in Magento

- MFTF version bump + allure-codeception dependency update.

* MQE-1420: Bump MFTF version in Magento

- changing argument from its own attribute to part of the command

* Fixed issue of Lifetime update syntax error

* Fix static test.
  • Loading branch information
nirav-kadiya authored Feb 1, 2019
1 parent 8a059e6 commit 18cf222
Show file tree
Hide file tree
Showing 719 changed files with 18,293 additions and 2,807 deletions.
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
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
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
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Model/Search/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function load()

$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
$searchFields = ['firstname', 'lastname', 'company'];
$searchFields = ['firstname', 'lastname', 'billing_company'];
$filters = [];
foreach ($searchFields as $field) {
$filters[] = $this->filterBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
<element name="save" type="button" selector="#save" timeout="30"/>
<element name="delete" type="button" selector="#delete"/>
<element name="add" type="button" selector="#add" timeout="30"/>
<element name="back" type="button" selector="#back" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminMessagesSection">
<element name="test" type="input" selector=".test"/>
<element name="success" type="text" selector="#messages div.message-success"/>
<element name="successMessageByIndex" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
<element name="error" type="text" selector="#messages div.message-error"/>
<element name="notice" type="text" selector=".message.message-notice.notice"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminSlideOutDialogSection">
<element name="closeButton" type="button" selector=".modal-slide._show [data-role='closeBtn']" timeout="30"/>
<element name="cancelButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Cancel']" timeout="30"/>
<element name="doneButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Done']" timeout="30"/>
<element name="saveButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Save']" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ $permissions = $block->getData('permissions');
?>
<?php if ($permissions && $permissions->hasAccessToAdditionalActions()): ?>
<div class="additional-cache-management">
<h2>
<span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
</h2>
<?php if ($permissions->hasAccessToFlushCatalogImages()): ?>
<h2>
<span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
</h2>
<p>
<button onclick="setLocation('<?= $block->escapeJs($block->getCleanImagesUrl()); ?>')" type="button">
<?= $block->escapeHtml(__('Flush Catalog Images Cache')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
<?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
<li>
<a href="<?= /* @escapeNotVerified */ $_tabHref ?>" id="<?= /* @escapeNotVerified */ $block->getTabId($_tab) ?>" title="<?= /* @escapeNotVerified */ $block->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
<a href="<?= $block->escapeHtmlAttr($_tabHref) ?>" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>" class="<?= $block->escapeHtmlAttr($_tabClass) ?>" data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
<span>
<span class="changed" title="<?= /* @escapeNotVerified */ __('The information in this tab has been changed.') ?>"></span>
<span class="error" title="<?= /* @escapeNotVerified */ __('This tab contains invalid data. Please resolve this before saving.') ?>"></span>
Expand Down
6 changes: 5 additions & 1 deletion app/code/Magento/Braintree/Controller/Paypal/PlaceOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function __construct(

/**
* @inheritdoc
*
* @throws LocalizedException
*/
public function execute()
Expand All @@ -71,7 +72,10 @@ public function execute()
return $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]);
} catch (\Exception $e) {
$this->logger->critical($e);
$this->messageManager->addExceptionMessage($e, $e->getMessage());
$this->messageManager->addExceptionMessage(
$e,
'The order #' . $quote->getReservedOrderId() . ' cannot be processed.'
);
}

return $resultRedirect->setPath('checkout/cart', ['_secure' => true]);
Expand Down
Loading

0 comments on commit 18cf222

Please sign in to comment.