We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit bcbba30e authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #533 from Adyen/develop

Release 4.5.3
parents a3238d7b 342a4f3f
......@@ -70,11 +70,13 @@ class TransactionAuthorization implements ClientInterface
{
$request = $transferObject->getBody();
$requestOptions['idempotencyKey'] = $request['reference'];
// call lib
$service = new \Adyen\Service\Payment($this->_client);
try {
$response = $service->authorise($request);
$response = $service->authorise($request, $requestOptions);
} catch (\Adyen\AdyenException $e) {
$response['error'] = $e->getMessage();
}
......
......@@ -65,9 +65,10 @@ class TransactionPayment implements ClientInterface
$client = $this->adyenHelper->initializeAdyenClient();
$service = new \Adyen\Service\Checkout($client);
$requestOptions['idempotencyKey'] = $request['reference'];
try {
$response = $service->payments($request);
$response = $service->payments($request, $requestOptions);
} catch (\Adyen\AdyenException $e) {
$response['error'] = $e->getMessage();
}
......
......@@ -97,6 +97,8 @@ class AdyenThreeDS2Process implements AdyenThreeDS2ProcessInterface
try {
$client = $this->adyenHelper->initializeAdyenClient($quote->getStoreId());
$service = $this->adyenHelper->createAdyenCheckoutService($client);
$requestOptions['idempotencyKey'] = $quote->reserveOrderId()->getReservedOrderId();
$result = $service->paymentsDetails($request);
} catch (\Adyen\AdyenException $e) {
throw new \Magento\Framework\Exception\LocalizedException(__('3D secure 2.0 failed'));
......
......@@ -118,7 +118,8 @@ class PaymentRequest extends DataObject
try {
$client = $this->_adyenHelper->initializeAdyenClient($storeId);
$service = $this->_adyenHelper->createAdyenCheckoutService($client);
$result = $service->paymentsDetails($request);
$requestOptions['idempotencyKey'] = $order->getIncrementId();
$result = $service->paymentsDetails($request, $requestOptions);
} catch (\Adyen\AdyenException $e) {
throw new \Magento\Framework\Exception\LocalizedException(__('3D secure failed'));
}
......
......@@ -2,7 +2,7 @@
"name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module",
"version": "4.5.2",
"version": "4.5.3",
"license": [
"OSL-3.0",
"AFL-3.0"
......@@ -14,7 +14,7 @@
}
],
"require": {
"adyen/php-api-library": "~2.1",
"adyen/php-api-library": "~4.1",
"magento/framework": ">=101.0.8 <102 || >=102.0.1",
"magento/module-vault": "101.*"
},
......
......@@ -24,7 +24,7 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="4.5.2">
<module name="Adyen_Payment" setup_version="4.5.3">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Quote"/>
......
......@@ -33,5 +33,5 @@ $_info = $this->getInfo();
<dt class="title"><?php echo $_info->getAdditionalInformation('boleto_type'); ?></dt>
<dt class="title"><?php echo $_info->getAdditionalInformation('firstname'); ?></dt>
<dt class="title"><?php echo $_info->getAdditionalInformation('lastname'); ?></dt>
<dt class="title">><a target="_blank" href="<?php echo $this->getMethod()->getInfoInstance()->getAdditionalInformation('url'); ?>"><?php echo __("Click here to download Boleto PDF."); ?></a></dt>
<dt class="title"><a target="_blank" href="<?php echo $this->getMethod()->getInfoInstance()->getAdditionalInformation('url'); ?>"><?php echo __("Click here to download Boleto PDF."); ?></a></dt>
</dl>
......@@ -145,6 +145,7 @@ define(
isApplePayAllowed: function () {
var self = this;
if (!!window.ApplePaySession) {
// validate if applepay is allowed, it will be picked up by the isApplePayVisible method
var promise = window.ApplePaySession.canMakePaymentsWithActiveCard(self.getMerchantIdentifier());
promise.then(function (canMakePayments) {
......@@ -152,9 +153,11 @@ define(
canMakeApplePayPayments(true);
});
if (window.ApplePaySession && window.ApplePaySession.supportsVersion(applePayVersion) ) {
if (window.ApplePaySession && window.ApplePaySession.supportsVersion(applePayVersion)) {
return true;
}
}
return false;
},
performValidation: function (validationURL) {
......@@ -191,10 +194,10 @@ define(
}
);
},
isApplePayVisible: function() {
isApplePayVisible: function () {
return canMakeApplePayPayments();
},
getMerchantIdentifier: function() {
getMerchantIdentifier: function () {
return window.checkoutConfig.payment.adyen_apple_pay.merchant_identifier;
}
});
......
......@@ -518,13 +518,6 @@ define(
}
});
},
/** Redirect to adyen */
continueToAdyen: function () {
if (this.validate() && additionalValidators.validate()) {
this.placeRedirectOrder(this.getData());
return false;
}
},
continueToAdyenBrandCode: function () {
// set payment method to adyen_hpp
var self = this;
......
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