Skip to content

Commit 0567400

Browse files
author
Maxim Medinskiy
committed
Merge remote-tracking branch 'magento2/merchant_beta' into MAGETWO-43648
2 parents 94fc2e8 + 3123942 commit 0567400

File tree

412 files changed

+9701
-3093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+9701
-3093
lines changed

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
1.0.0-beta4
2+
=============
3+
* Fixed bugs:
4+
* Fixed an issue with Paypal WebAPI exception error when placing order within PayPal Payments Pro
5+
* Fixed an issue with wrong links on multi website store
6+
* Fixed an issue where unable to set a date limit on a promotion for 2016 onwards
7+
* Fixed an issue with saving promotions
8+
* Fixed an issue with option to pay with Paypal account for Payments Pro when configured on website level
9+
* Fixed an issue with search results after filtering
10+
* Fixed an issue with catalog product import
11+
* Fixed an issue with configurable product special price
12+
* Fixed an issue where unable to change type for color and size swatches
13+
* Fixed an issue with selected filters on layered navigation
14+
* Fixed an issue with related products block
15+
* Fixed an issue with product alert for out of stock
16+
* Fixed an issue with product selection in Products->Catalog results in no products selected
17+
* Fixed an issue where unable to remove item from Minicart
18+
* Fixed an issue where unable to deploy to production without downtime
19+
* Fixed an issue with minicart inconsistent behavior between http and https
20+
* Fixed an issue with CMS page preview on frontend
21+
* Fixed an issue where discounts is not showing in the order summary at the shipping section in the checkout
22+
* Search improvements:
23+
* Improve Catalog Performance. Quick Search
24+
* GitHub issues and requests:
25+
* [#1705](https://github.com/magento/magento2/issues/1705) -- Remove item from Minicart does not work
26+
* [#1704](https://github.com/magento/magento2/issues/1704) -- Minicart inconsistant behavior between http and https
27+
28+
29+
1.0.0-beta3
30+
=============
31+
* Fixed bugs:
32+
* Fixed an issue with cms block cache if the block was added via layout xml
33+
* Fixed an issue with error message after click "Get Payment Update" for order placed within Authorize.net Direct Post with incorrect url in "Transaction Details Url"
34+
* Fixed an issue where unable to import images for configurable products
35+
* Fixed an issue where product links API does not return the linked product's sku and position with flat tables turned on
36+
* Fixed an issue where unable to run the CLI tool after the DI compilation
37+
* Fixed an issue where copies of LESS source files are created instead of symlinks in client side less compilation
38+
* Various improvements:
39+
* Stores and stores loading improvements
40+
* Created APIs to retrieve store information
41+
* Added the ability to send the purge requests for multiple servers
42+
* GitHub issues and requests:
43+
* [#1679](https://github.com/magento/magento2/issues/1679) -- Cannot run php bin/magento setup:di:compile (have to delete contents of var/di) first
44+
* [#1510](https://github.com/magento/magento2/issues/1510) -- Multisite does not work when Full Page Cache is enabled (FPC ignores MAGE_RUN_CODE)
45+
46+
1.0.0-beta2
47+
=============
48+
* Fixed bugs:
49+
* Fixed an issue where unable to export custom product attributes
50+
* Fixed an issue where customer account page in Admin produces exception
51+
* Fixed an issue where import validation is failed in case of import products for multiple websites
52+
* Unable to import or export products with multi-select attributes
53+
* Fixed an issue where DI compilation fails on class keyword
54+
* Fixed an issue where UK PayPal Website Payments Pro Hosted Solution doesn't work
55+
* Fixed an issue where US PayPal payment methods are not working
56+
* Fixed an issue where Authorize.net does not work in production mode
57+
* Fixed an issue where widgets are not rendered on the CMS preview page
58+
* Fixed an issue where CMS page preview not works when changing store view
59+
* Fixed an issue where minicart is not cleared after placing an order via PayPal
60+
* Fixed an issue where is not possible to use Authorize.net payment on checkout
61+
* Fixed an issue where multiple stores at different paths rendering wrong store base_url
62+
* Fixed an issue where unable to change the product attribute set (Product Template)
63+
* Fixed an issue where there is address validation for guest customer
64+
* Fixed an issue where no way to set password for customer after placing order
65+
66+
1.0.0-beta1
67+
=============
68+
* Fixed bugs:
69+
* Fixed an issue where custom attribute with 'Show on Storefront' = Yes makes the customer edit form empty
70+
* Fixed an issue where product import loses images
71+
* Fixed an issue where images are not uploaded with import procedure
72+
* Fixed JS error when click 'Go to Checkout' button
73+
174
1.0.0-beta
275
=============
376
* Framework improvements:

Gruntfile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ module.exports = function (grunt) {
1515
[
1616
taskDir + '/mage-minify',
1717
taskDir + '/deploy',
18+
taskDir + '/black-list-generator',
19+
taskDir + '/clean-black-list',
20+
taskDir + '/static',
1821
'time-grunt'
1922
].forEach(function (task) {
2023
require(task)(grunt);

app/code/Magento/AdminNotification/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-store": "1.0.0-beta",
7-
"magento/module-backend": "1.0.0-beta",
8-
"magento/module-media-storage": "1.0.0-beta",
9-
"magento/framework": "1.0.0-beta",
6+
"magento/module-store": "1.0.0-beta4",
7+
"magento/module-backend": "1.0.0-beta4",
8+
"magento/module-media-storage": "1.0.0-beta4",
9+
"magento/framework": "1.0.0-beta4",
1010
"lib-libxml": "*",
1111
"magento/magento-composer-installer": "*"
1212
},
1313
"type": "magento2-module",
14-
"version": "1.0.0-beta",
14+
"version": "1.0.0-beta4",
1515
"license": [
1616
"OSL-3.0",
1717
"AFL-3.0"

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-catalog": "1.0.0-beta",
7-
"magento/module-catalog-inventory": "1.0.0-beta",
8-
"magento/module-eav": "1.0.0-beta",
9-
"magento/module-import-export": "1.0.0-beta",
10-
"magento/module-catalog-import-export": "1.0.0-beta",
11-
"magento/module-customer": "1.0.0-beta",
12-
"magento/module-store": "1.0.0-beta",
13-
"magento/framework": "1.0.0-beta",
6+
"magento/module-catalog": "1.0.0-beta4",
7+
"magento/module-catalog-inventory": "1.0.0-beta4",
8+
"magento/module-eav": "1.0.0-beta4",
9+
"magento/module-import-export": "1.0.0-beta4",
10+
"magento/module-catalog-import-export": "1.0.0-beta4",
11+
"magento/module-customer": "1.0.0-beta4",
12+
"magento/module-store": "1.0.0-beta4",
13+
"magento/framework": "1.0.0-beta4",
1414
"magento/magento-composer-installer": "*"
1515
},
1616
"type": "magento2-module",
17-
"version": "1.0.0-beta",
17+
"version": "1.0.0-beta4",
1818
"license": [
1919
"OSL-3.0",
2020
"AFL-3.0"

app/code/Magento/Authorization/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"description": "Authorization module provides access to Magento ACL functionality.",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-backend": "1.0.0-beta",
7-
"magento/framework": "1.0.0-beta",
6+
"magento/module-backend": "1.0.0-beta4",
7+
"magento/framework": "1.0.0-beta4",
88
"magento/magento-composer-installer": "*"
99
},
1010
"type": "magento2-module",
11-
"version": "1.0.0-beta",
11+
"version": "1.0.0-beta4",
1212
"license": [
1313
"OSL-3.0",
1414
"AFL-3.0"

app/code/Magento/Authorizenet/Model/Authorizenet.php

Lines changed: 49 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Authorizenet\Model;
77

8+
use Magento\Payment\Model\Method\Logger;
9+
810
/**
911
* @SuppressWarnings(PHPMD.TooManyFields)
1012
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
@@ -54,6 +56,8 @@ abstract class Authorizenet extends \Magento\Payment\Model\Method\Cc
5456

5557
const RESPONSE_REASON_CODE_PENDING_REVIEW_DECLINED = 254;
5658

59+
const PAYMENT_UPDATE_STATUS_CODE_SUCCESS = 'Ok';
60+
5761
/**
5862
* Transaction fraud state key
5963
*/
@@ -95,6 +99,11 @@ abstract class Authorizenet extends \Magento\Payment\Model\Method\Cc
9599
*/
96100
protected $transactionDetails = [];
97101

102+
/**
103+
* {@inheritdoc}
104+
*/
105+
protected $_debugReplacePrivateDataKeys = ['merchantAuthentication', 'x_login'];
106+
98107
/**
99108
* @param \Magento\Framework\Model\Context $context
100109
* @param \Magento\Framework\Registry $registry
@@ -364,11 +373,11 @@ protected function buildRequest(\Magento\Framework\Object $payment)
364373
*/
365374
protected function postRequest(\Magento\Authorizenet\Model\Request $request)
366375
{
367-
$debugData = ['request' => $request->getData()];
368376
$result = $this->responseFactory->create();
369377
$client = new \Magento\Framework\HTTP\ZendClient();
370-
$uri = $this->getConfigData('cgi_url');
371-
$client->setUri($uri ? $uri : self::CGI_URL);
378+
$url = $this->getConfigData('cgi_url') ?: self::CGI_URL;
379+
$debugData = ['url' => $url, 'request' => $request->getData()];
380+
$client->setUri($url);
372381
$client->setConfig(['maxredirects' => 0, 'timeout' => 30]);
373382

374383
foreach ($request->getData() as $key => $value) {
@@ -381,21 +390,21 @@ protected function postRequest(\Magento\Authorizenet\Model\Request $request)
381390

382391
try {
383392
$response = $client->request();
393+
$responseBody = $response->getBody();
394+
$debugData['response'] = $responseBody;
384395
} catch (\Exception $e) {
385396
$result->setXResponseCode(-1)
386397
->setXResponseReasonCode($e->getCode())
387398
->setXResponseReasonText($e->getMessage());
388399

389-
$debugData['result'] = $result->getData();
390-
$this->_debug($debugData);
391400
throw new \Magento\Framework\Exception\LocalizedException(
392401
$this->dataHelper->wrapGatewayError($e->getMessage())
393402
);
403+
} finally {
404+
$this->_debug($debugData);
394405
}
395406

396-
$responseBody = $response->getBody();
397407
$r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
398-
399408
if ($r) {
400409
$result->setXResponseCode((int)str_replace('"', '', $r[0]))
401410
->setXResponseReasonCode((int)str_replace('"', '', $r[2]))
@@ -413,10 +422,6 @@ protected function postRequest(\Magento\Authorizenet\Model\Request $request)
413422
__('Something went wrong in the payment gateway.')
414423
);
415424
}
416-
417-
$debugData['result'] = $result->getData();
418-
$this->_debug($debugData);
419-
420425
return $result;
421426
}
422427

@@ -473,24 +478,35 @@ protected function loadTransactionDetails($transactionId)
473478
);
474479

475480
$client = new \Magento\Framework\HTTP\ZendClient();
476-
$uri = $this->getConfigData('cgi_url_td');
477-
$client->setUri($uri ? $uri : self::CGI_URL_TD);
481+
$url = $this->getConfigData('cgi_url_td') ?: self::CGI_URL_TD;
482+
$client->setUri($url);
478483
$client->setConfig(['timeout' => 45]);
479484
$client->setHeaders(['Content-Type: text/xml']);
480485
$client->setMethod(\Zend_Http_Client::POST);
481486
$client->setRawData($requestBody);
482487

483-
$debugData = ['request' => $requestBody];
488+
$debugData = ['url' => $url, 'request' => $this->removePrivateDataFromXml($requestBody)];
484489

485490
try {
486491
$responseBody = $client->request()->getBody();
487-
$debugData['result'] = $responseBody;
488-
$this->_debug($debugData);
492+
$debugData['response'] = $responseBody;
489493
libxml_use_internal_errors(true);
490494
$responseXmlDocument = new \Magento\Framework\Simplexml\Element($responseBody);
491495
libxml_use_internal_errors(false);
492496
} catch (\Exception $e) {
493-
throw new \Magento\Framework\Exception\LocalizedException(__('Payment updating error.'));
497+
throw new \Magento\Framework\Exception\LocalizedException(
498+
__('Unable to get transaction details. Try again later.')
499+
);
500+
} finally {
501+
$this->_debug($debugData);
502+
}
503+
504+
if (!isset($responseXmlDocument->messages->resultCode)
505+
|| $responseXmlDocument->messages->resultCode != static::PAYMENT_UPDATE_STATUS_CODE_SUCCESS
506+
) {
507+
throw new \Magento\Framework\Exception\LocalizedException(
508+
__('Unable to get transaction details. Try again later.')
509+
);
494510
}
495511

496512
$this->transactionDetails[$transactionId] = $responseXmlDocument;
@@ -509,4 +525,20 @@ protected function getTransactionDetails($transactionId)
509525
? $this->transactionDetails[$transactionId]
510526
: $this->loadTransactionDetails($transactionId);
511527
}
528+
529+
/**
530+
* Remove nodes with private data from XML string
531+
*
532+
* Uses values from $_debugReplacePrivateDataKeys property
533+
*
534+
* @param string $xml
535+
* @return string
536+
*/
537+
protected function removePrivateDataFromXml($xml)
538+
{
539+
foreach ($this->getDebugReplacePrivateDataKeys() as $key) {
540+
$xml = preg_replace(sprintf('~(?<=<%s>).*?(?=</%s>)~', $key, $key), Logger::DEBUG_KEYS_MASK, $xml);
541+
}
542+
return $xml;
543+
}
512544
}

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -718,17 +718,21 @@ protected function processOrder(\Magento\Sales\Model\Order $order)
718718
*/
719719
protected function processPaymentFraudStatus(\Magento\Sales\Model\Order\Payment $payment)
720720
{
721-
$fraudDetailsResponse = $payment->getMethodInstance()
722-
->fetchTransactionFraudDetails($this->getResponse()->getXTransId());
723-
$fraudData = $fraudDetailsResponse->getData();
721+
try {
722+
$fraudDetailsResponse = $payment->getMethodInstance()
723+
->fetchTransactionFraudDetails($this->getResponse()->getXTransId());
724+
$fraudData = $fraudDetailsResponse->getData();
724725

725-
if (empty($fraudData)) {
726-
$payment->setIsFraudDetected(false);
727-
return $this;
728-
}
726+
if (empty($fraudData)) {
727+
$payment->setIsFraudDetected(false);
728+
return $this;
729+
}
729730

730-
$payment->setIsFraudDetected(true);
731-
$payment->setAdditionalInformation('fraud_details', $fraudData);
731+
$payment->setIsFraudDetected(true);
732+
$payment->setAdditionalInformation('fraud_details', $fraudData);
733+
} catch (\Exception $e) {
734+
//this request is optional
735+
}
732736

733737
return $this;
734738
}
@@ -741,23 +745,27 @@ protected function processPaymentFraudStatus(\Magento\Sales\Model\Order\Payment
741745
*/
742746
protected function addStatusComment(\Magento\Sales\Model\Order\Payment $payment)
743747
{
744-
$transactionId = $this->getResponse()->getXTransId();
745-
$data = $payment->getMethodInstance()->getTransactionDetails($transactionId);
746-
$transactionStatus = (string)$data->transaction->transactionStatus;
747-
$fdsFilterAction = (string)$data->transaction->FDSFilterAction;
748-
749-
if ($payment->getIsTransactionPending()) {
750-
$message = 'Amount of %1 is pending approval on the gateway.<br/>'
751-
. 'Transaction "%2" status is "%3".<br/>'
752-
. 'Transaction FDS Filter Action is "%4"';
753-
$message = __(
754-
$message,
755-
$payment->getOrder()->getBaseCurrency()->formatTxt($this->getResponse()->getXAmount()),
756-
$transactionId,
757-
$this->dataHelper->getTransactionStatusLabel($transactionStatus),
758-
$this->dataHelper->getFdsFilterActionLabel($fdsFilterAction)
759-
);
760-
$payment->getOrder()->addStatusHistoryComment($message);
748+
try {
749+
$transactionId = $this->getResponse()->getXTransId();
750+
$data = $payment->getMethodInstance()->getTransactionDetails($transactionId);
751+
$transactionStatus = (string)$data->transaction->transactionStatus;
752+
$fdsFilterAction = (string)$data->transaction->FDSFilterAction;
753+
754+
if ($payment->getIsTransactionPending()) {
755+
$message = 'Amount of %1 is pending approval on the gateway.<br/>'
756+
. 'Transaction "%2" status is "%3".<br/>'
757+
. 'Transaction FDS Filter Action is "%4"';
758+
$message = __(
759+
$message,
760+
$payment->getOrder()->getBaseCurrency()->formatTxt($this->getResponse()->getXAmount()),
761+
$transactionId,
762+
$this->dataHelper->getTransactionStatusLabel($transactionStatus),
763+
$this->dataHelper->getFdsFilterActionLabel($fdsFilterAction)
764+
);
765+
$payment->getOrder()->addStatusHistoryComment($message);
766+
}
767+
} catch (\Exception $e) {
768+
//this request is optional
761769
}
762770
return $this;
763771
}

0 commit comments

Comments
 (0)