Skip to content

Commit 44b12c6

Browse files
author
Jan Polak
committed
disable oto when 3d secure is turned on
1 parent f4769fb commit 44b12c6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/code/Magento/OneTouchOrdering/Model/OneTouchOrdering.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function __construct(
5757
public function isAvailableForCustomer($customer): bool
5858
{
5959
$this->customer = $customer;
60+
6061
return $this->isOneTouchButtonEnabled()
62+
&& $this->isBrainTree3DDisabled()
6163
&& $this->isBrainTreeAvailable()
6264
&& $this->customerHasDefaultAddresses()
6365
&& $this->isAnyShippingMethodAvailable()
@@ -109,6 +111,14 @@ private function isBrainTreeAvailable(): bool
109111
return $this->brainTreeConfig->isActive();
110112
}
111113

114+
/**
115+
* @return bool
116+
*/
117+
private function isBrainTree3DDisabled()
118+
{
119+
return !$this->brainTreeConfig->isVerify3DSecure();
120+
}
121+
112122
/**
113123
* @return Customer
114124
*/

0 commit comments

Comments
 (0)