Local problem with Adyen


#1

Can I some how disable Adyen from config_local.php or fix this with adding some workaround?
p.s. We try to add special key like:
$config[AdyenConstants::SDK_CHECKOUT_SECURED_FIELDS_URL] = 'http://zed.de.suite.local/'; $config[AdyenConstants::SDK_CHECKOUT_ORIGIN_KEY] = 'key';
but it’s doesn’t help.

YVES Exception

Spryker\Shared\ZedRequest\Client\Exception\RequestException - Failed to complete request with server authority http://zed.de.suite.local. Configured with (SSL Disabled) zed.de.suite.local:80 in /data/shop/development/current/config/Shared/config_default.php. Error: Stacktrace:

ZED Exception

Error - Call to a member function getPriceToPay() on null
in /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Business/Payment/Mapper/AdyenPaymentMethodFilterMapper.php (67)

Url: /vs-bridge/gateway/paymentmethodscart?cartId=0c3672b4c6d346237b3817908eccf28a
Trace:

#0 /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Business/Payment/Mapper/AdyenPaymentMethodFilterMapper.php(53): SprykerEco\Zed\Adyen\Business\Payment\Mapper\AdyenPaymentMethodFilterMapper->createAmountTransfer(Object(Generated\Shared\Transfer\QuoteTransfer)) #1 /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Business/Payment/Mapper/AdyenPaymentMethodFilterMapper.php(39): SprykerEco\Zed\Adyen\Business\Payment\Mapper\AdyenPaymentMethodFilterMapper->createGetPaymentMethodsRequestTransfer(Object(Generated\Shared\Transfer\QuoteTransfer)) #2 /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Business/Payment/AdyenPaymentMethodFilter.php(91): SprykerEco\Zed\Adyen\Business\Payment\Mapper\AdyenPaymentMethodFilterMapper->buildRequestTransfer(Object(Generated\Shared\Transfer\QuoteTransfer)) #3 /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Business/Payment/AdyenPaymentMethodFilter.php(67): SprykerEco\Zed\Adyen\Business\Payment\AdyenPaymentMethodFilter->getAvailablePaymentMethods(Object(Generated\Shared\Transfer\QuoteTransfer)) #4 /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Business/AdyenFacade.php(41): SprykerEco\Zed\Adyen\Business\Payment\AdyenPaymentMethodFilter->filterPaymentMethods(Object(Generated\Shared\Transfer\PaymentMethodsTransfer), Object(Generated\Shared\Transfer\QuoteTransfer)) #5 /data/shop/development/current/vendor/spryker-eco/adyen/src/SprykerEco/Zed/Adyen/Communication/Plugin/AdyenPaymentMethodFilterPlugin.php(36): SprykerEco\Zed\Adyen\Business\AdyenFacade->filterPaymentMethods(Object(Generated\Shared\Transfer\PaymentMethodsTransfer), Object(Generated\Shared\Transfer\QuoteTransfer)) #6 /data/shop/development/current/vendor/spryker/payment/src/Spryker/Zed/Payment/Business/Method/PaymentMethodReader.php(75): SprykerEco\Zed\Adyen\Communication\Plugin\AdyenPaymentMethodFilterPlugin->filterPaymentMethods(Object(Generated\Shared\Transfer\PaymentMethodsTransfer), Object(Generated\Shared\Transfer\QuoteTransfer)) #7 /data/shop/development/current/vendor/spryker/payment/src/Spryker/Zed/Payment/Business/Method/PaymentMethodReader.php(45): Spryker\Zed\Payment\Business\Method\PaymentMethodReader->applyFilterPlugins(Object(Generated\Shared\Transfer\PaymentMethodsTransfer), Object(Generated\Shared\Transfer\QuoteTransfer)) #8 /data/shop/development/current/vendor/spryker/payment/src/Spryker/Zed/Payment/Business/PaymentFacade.php(118): Spryker\Zed\Payment\Business\Method\PaymentMethodReader->getAvailableMethods(Object(Generated\Shared\Transfer\QuoteTransfer)) #9 /data/shop/development/current/vendor/spryker-eco/vs-bridge/src/Spryker/Zed/VsBridge/Business/VsBridgeFacade/Quote.php(368): Spryker\Zed\Payment\Business\PaymentFacade->getAvailableMethods(Object(Generated\Shared\Transfer\QuoteTransfer)) #10 /data/shop/development/current/vendor/spryker-eco/vs-bridge/src/Spryker/Zed/VsBridge/Business/VsBridgeFacade.php(767): Spryker\Zed\VsBridge\Business\VsBridgeFacade\Quote->getPaymentArray(Object(Generated\Shared\Transfer\QuoteTransfer)) #11 /data/shop/development/current/vendor/spryker-eco/vs-bridge/src/Spryker/Zed/VsBridge/Communication/Controller/GatewayController.php(93): Spryker\Zed\VsBridge\Business\VsBridgeFacade->paymentMethodsCart() #12 /data/shop/development/current/vendor/spryker/zed-request/src/Spryker/Zed/ZedRequest/Communication/Plugin/GatewayControllerListenerPlugin.php(60): Spryker\Zed\VsBridge\Communication\Controller\GatewayController->paymentmethodscartAction(Object(Generated\Shared\Transfer\Spryker2MagentoCartPaymentMethodsTransfer), Object(Spryker\Zed\ZedRequest\Business\Client\Request)) #13 [internal function]: Spryker\Zed\ZedRequest\Communication\Plugin\GatewayControllerListenerPlugin->Spryker\Zed\ZedRequest\Communication\Plugin{closure}() #14 /data/shop/development/current/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #15 /data/shop/development/current/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /data/shop/development/current/vendor/silex/silex/src/Silex/Application.php(586): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /data/shop/development/current/vendor/silex/silex/src/Silex/Application.php(563): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request)) #18 /data/shop/development/current/public/Zed/index.php(22): Silex\Application->run() #19 {main}

in /data/shop/development/current/vendor/spryker/zed-request/src/Spryker/Shared/ZedRequest/Client/AbstractHttpClient.php (224)

Url: /vsbridge/cart/payment-methods?token=&cartId=0c3672b4c6d346237b3817908eccf28a

Trace:

#0 /data/shop/development/current/vendor/spryker/zed-request/src/Spryker/Shared/ZedRequest/Client/AbstractZedClient.php(80): Spryker\Shared\ZedRequest\Client\AbstractHttpClient->request(’/vs-bridge/gate…’, Object(Generated\Shared\Transfer\Spryker2MagentoCartPaymentMethodsTransfer), Array, NULL) #1 /data/shop/development/current/vendor/spryker/zed-request/src/Spryker/Client/ZedRequest/ZedRequestClient.php(50): Spryker\Shared\ZedRequest\Client\AbstractZedClient->call(’/vs-bridge/gate…’, Object(Generated\Shared\Transfer\Spryker2MagentoCartPaymentMethodsTransfer), NULL) #2 /data/shop/development/current/vendor/spryker-eco/vs-bridge/src/Spryker/Client/VsBridge/Zed/VsBridgeStub.php(200): Spryker\Client\ZedRequest\ZedRequestClient->call(’/vs-bridge/gate…’, Object(Generated\Shared\Transfer\Spryker2MagentoCartPaymentMethodsTransfer)) #3 /data/shop/development/current/vendor/spryker-eco/vs-bridge/src/Spryker/Client/VsBridge/VsBridgeClient.php(91): Spryker\Client\VsBridge\Zed\VsBridgeStub->paymentMethodsCart(‘0c3672b4c6d3462…’) #4 /data/shop/development/current/vendor/spryker-eco/vs-bridge/src/Spryker/Yves/VsBridge/Controller/CartController.php(227): Spryker\Client\VsBridge\VsBridgeClient->paymentMethodsCart(‘0c3672b4c6d3462…’) #5 [internal function]: Spryker\Yves\VsBridge\Controller\CartController->paymentMethodsAction(Object(Symfony\Component\HttpFoundation\Request)) #6 /data/shop/development/current/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Array, Array) #7 /data/shop/development/current/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #8 /data/shop/development/current/vendor/silex/silex/src/Silex/Application.php(586): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 /data/shop/development/current/vendor/silex/silex/src/Silex/Application.php(563): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request)) #10 /data/shop/development/current/public/Yves/index.php(22): Silex\Application->run() #11 {main}


#2

Hi there!
You can simply disable Adyen by comment/remove OMS configuration:

$config[OmsConstants::PROCESS_LOCATION] = [
APPLICATION_ROOT_DIR . ‘/vendor/spryker-eco/adyen/config/Zed/Oms’,
];

Remove it from active process:

$config[OmsConstants::ACTIVE_PROCESSES] = [
‘AdyenSofort01’,
‘AdyenDirectDebit01’,
‘AdyenKlarnaInvoice01’,
‘AdyenPrepayment01’,
‘AdyenIdeal01’,
‘AdyenPayPal01’,
‘AdyenAliPay01’,
‘AdyenWeChatPay01’,
];

And remove it from statemachine mapping;

$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [
AdyenConfig::ADYEN_CREDIT_CARD => ‘AdyenCreditCard01’,
AdyenConfig::ADYEN_SOFORT => ‘AdyenSofort01’,
AdyenConfig::ADYEN_DIRECT_DEBIT => ‘AdyenDirectDebit01’,
AdyenConfig::ADYEN_KLARNA_INVOICE => ‘AdyenKlarnaInvoice01’,
AdyenConfig::ADYEN_PREPAYMENT => ‘AdyenPrepayment01’,
AdyenConfig::ADYEN_IDEAL => ‘AdyenIdeal01’,
AdyenConfig::ADYEN_PAY_PAL => ‘AdyenPayPal01’,
AdyenConfig::ADYEN_ALI_PAY => ‘AdyenAliPay01’,
AdyenConfig::ADYEN_WE_CHAT_PAY => ‘AdyenWeChatPay01’,
];

In additional please remove filter payment plugin from

src/Pyz/Zed/Payment/PaymentDependencyProvider.php

protected function getPaymentMethodFilterPlugins()
{
return [
//new AdyenPaymentMethodFilterPlugin(),
];
}


#3

Thank you! Adyen disabled without any errors :+1: