We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 04a2db14 authored by Marcos Garcia's avatar Marcos Garcia Committed by GitHub

Merge pull request #847 from Adyen/develop

Release 6.6.1
parents 45278ee7 329eb7a3
......@@ -173,7 +173,9 @@ class AdyenThreeDS2Process implements AdyenThreeDS2ProcessInterface
// Save the payments response because we are going to need it during the place order flow
$payment->setAdditionalInformation("paymentsResponse", $result);
if (!empty($result['additionalData'])) {
$this->vaultHelper->saveRecurringDetails($payment, $result['additionalData']);
}
// To actually save the additional info changes into the quote
$order->save();
......
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2019 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Plugin;
use Magento\Quote\Api\CartRepositoryInterface;
class GuestPaymentInformationResetOrderId
{
/**
* Quote repository.
*
* @var \Magento\Quote\Api\CartRepositoryInterface
*/
protected $quoteRepository;
/**
* @var \Adyen\Payment\Logger\AdyenLogger
*/
protected $adyenLogger;
/**
* @var \Magento\Quote\Model\QuoteIdMaskFactory
*/
protected $quoteIdMaskFactory;
/**
* GuestPaymentInformationResetOrderId constructor.
* @param CartRepositoryInterface $quoteRepository
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
* @param \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory
*/
public function __construct(
CartRepositoryInterface $quoteRepository,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory
)
{
$this->quoteRepository = $quoteRepository;
$this->adyenLogger = $adyenLogger;
$this->quoteIdMaskFactory = $quoteIdMaskFactory;
}
/**
* @param \Magento\Checkout\Api\GuestPaymentInformationManagementInterface $subject
* @param $cartId
* @return null
*/
public function beforeSavePaymentInformationAndPlaceOrder(
\Magento\Checkout\Api\GuestPaymentInformationManagementInterface $subject,
$cartId
) {
try {
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
$quoteId = $quoteIdMask->getQuoteId();
$this->quoteRepository->get($quoteId)->setReservedOrderId(null);
} catch (\Exception $e) {
$this->adyenLogger->error("Failed to reset reservedOrderId for guest shopper" . $e->getMessage());
}
return null;
}
}
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2019 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Plugin;
use Magento\Quote\Api\CartRepositoryInterface;
class PaymentInformationResetOrderId
{
/**
* Quote repository.
*
* @var \Magento\Quote\Api\CartRepositoryInterface
*/
protected $quoteRepository;
/**
* @var \Adyen\Payment\Logger\AdyenLogger
*/
protected $adyenLogger;
/**
* PaymentInformationResetOrderId constructor.
* @param CartRepositoryInterface $quoteRepository
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
*/
public function __construct(
CartRepositoryInterface $quoteRepository,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger
)
{
$this->quoteRepository = $quoteRepository;
$this->adyenLogger = $adyenLogger;
}
/**
* @param \Magento\Checkout\Api\PaymentInformationManagementInterface $subject
* @param $cartId
*/
public function beforeSavePaymentInformationAndPlaceOrder(
\Magento\Checkout\Api\PaymentInformationManagementInterface $subject,
$cartId
) {
try {
$this->quoteRepository->get($cartId)->setReservedOrderId(null);
} catch (\Exception $e) {
$this->adyenLogger->error("Failed to reset reservedOrderId " . $e->getMessage());
}
return null;
}
}
......@@ -2,7 +2,7 @@
"name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module",
"version": "6.6.0",
"version": "6.6.1",
"license": [
"OSL-3.0",
"AFL-3.0"
......
......@@ -230,17 +230,5 @@
<group>adyen</group>
</adyen_google_pay>
</payment>
<dev>
<js>
<minify_exclude>
<adyen_payment>adyen.com/checkoutshopper</adyen_payment>
</minify_exclude>
</js>
<css>
<minify_exclude>
<adyen_payment>adyen.com/checkoutshopper</adyen_payment>
</minify_exclude>
</css>
</dev>
</default>
</config>
......@@ -1028,6 +1028,14 @@
<type name="Magento\Vault\Api\PaymentTokenRepositoryInterface">
<plugin name="AdyenPaymentVaultDeleteToken" type="Adyen\Payment\Plugin\PaymentVaultDeleteToken" sortOrder="10"/>
</type>
<type name="Magento\Checkout\Api\PaymentInformationManagementInterface">
<plugin name="AdyenPaymentInformationResetOrderId" type="Adyen\Payment\Plugin\PaymentInformationResetOrderId"
sortOrder="10"/>
</type>
<type name="Magento\Checkout\Api\GuestPaymentInformationManagementInterface">
<plugin name="GuestAdyenPaymentInformationResetOrderId" type="Adyen\Payment\Plugin\GuestPaymentInformationResetOrderId"
sortOrder="10"/>
</type>
<!--Notifications overview-->
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
......
......@@ -215,7 +215,10 @@ define(
return window.checkoutConfig.payment.adyen.originKey;
},
getCheckoutEnvironment: function () {
return window.checkoutConfig.payment.adyen.checkoutEnvironment;
return window.checkoutConfig.payment.adyenGooglePay.checkoutEnvironment;
},
onPaymentMethodContentChange: function (data, event) {
$(this.googlePayNode).find('button').prop('disabled', !this.validate());
}
});
}
......
......@@ -45,7 +45,7 @@
<!--/ko-->
</div>
<div class="checkout-agreements-block" afterRender="bindDomEventListener">
<div class="checkout-agreements-block">
<!-- ko foreach: $parent.getRegion('before-place-order') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment