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 d734f023 authored by alessio's avatar alessio Committed by attilak

PW-1103: Execute the plugin only if payment is adyen_cc or adyen_oneclick,...

PW-1103: Execute the plugin only if payment is adyen_cc or adyen_oneclick, remove payment type since it is different for non card methods
parent 31bddd8b
...@@ -66,7 +66,7 @@ class Requests extends AbstractHelper ...@@ -66,7 +66,7 @@ class Requests extends AbstractHelper
* @param $billingAddress * @param $billingAddress
* @return mixed * @return mixed
*/ */
public function buildCustomerData($request = [], $customerId = 0, $billingAddress, \Magento\Quote\Model\Quote\Payment $payment) public function buildCustomerData($request = [], $customerId = 0, $billingAddress, $payment)
{ {
if ($customerId > 0) { if ($customerId > 0) {
$request['shopperReference'] = $customerId; $request['shopperReference'] = $customerId;
...@@ -311,7 +311,7 @@ class Requests extends AbstractHelper ...@@ -311,7 +311,7 @@ class Requests extends AbstractHelper
* @param $storeId * @param $storeId
* @param $payment * @param $payment
*/ */
public function buildRecurringData($request = [], $areaCode, int $storeId, \Magento\Quote\Model\Quote\Payment $payment) public function buildRecurringData($request = [], $areaCode, int $storeId, $payment)
{ {
// If the vault feature is on this logic is handled in the VaultDataBuilder // If the vault feature is on this logic is handled in the VaultDataBuilder
if (!$this->adyenHelper->isCreditCardVaultEnabled()) { if (!$this->adyenHelper->isCreditCardVaultEnabled()) {
......
...@@ -109,6 +109,7 @@ class PaymentInformationManagement ...@@ -109,6 +109,7 @@ class PaymentInformationManagement
\Magento\Checkout\Model\PaymentInformationManagement $subject, \Magento\Checkout\Model\PaymentInformationManagement $subject,
$response $response
) { ) {
// Get payment and cart information from session // Get payment and cart information from session
$quote = $this->checkoutSession->getQuote(); $quote = $this->checkoutSession->getQuote();
$payment = $quote->getPayment(); $payment = $quote->getPayment();
...@@ -121,7 +122,10 @@ class PaymentInformationManagement ...@@ -121,7 +122,10 @@ class PaymentInformationManagement
return $this->adyenHelper->buildThreeDS2ProcessResponseJson(); return $this->adyenHelper->buildThreeDS2ProcessResponseJson();
} }
if (strpos($payment->getMethod(), "adyen_cc") !== 0 &&
strpos($payment->getMethod(), "adyen_oneclick") !== 0) {
return $response;
}
// Init request array // Init request array
$request = []; $request = [];
......
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