diff --git a/src/Client/ClientPayloadFactory.php b/src/Client/ClientPayloadFactory.php index f189e254..3c7225ad 100644 --- a/src/Client/ClientPayloadFactory.php +++ b/src/Client/ClientPayloadFactory.php @@ -16,7 +16,6 @@ use Payum\Core\Bridge\Spl\ArrayObject; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\PaymentInterface; -use Sylius\Component\Currency\Context\CurrencyContextInterface; use Sylius\RefundPlugin\Event\RefundPaymentGenerated; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -33,9 +32,6 @@ final class ClientPayloadFactory implements ClientPayloadFactoryInterface /** @var RequestStack */ private $requestStack; - /** @var CurrencyContextInterface */ - private $currencyContext; - /** @var array */ private $allowedMethodsList = [ 'ideal', @@ -68,13 +64,11 @@ final class ClientPayloadFactory implements ClientPayloadFactoryInterface public function __construct( VersionResolverInterface $versionResolver, NormalizerInterface $normalizer, - RequestStack $requestStack, - CurrencyContextInterface $currencyContext + RequestStack $requestStack ) { $this->versionResolver = $versionResolver; $this->normalizer = $normalizer; $this->requestStack = $requestStack; - $this->currencyContext = $currencyContext; } public function createForAvailablePaymentMethods( @@ -90,7 +84,7 @@ public function createForAvailablePaymentMethods( $payload = [ 'amount' => [ 'value' => $order->getTotal(), - 'currency' => $this->currencyContext->getCurrencyCode(), + 'currency' => (string) $order->getCurrencyCode(), ], 'merchantAccount' => $options['merchantAccount'], 'countryCode' => $countryCode, @@ -133,7 +127,7 @@ public function createForSubmitPayment( $payload = [ 'amount' => [ 'value' => $order->getTotal(), - 'currency' => (string) $order->getCurrencyCode(), + 'currency' => $order->getCurrencyCode(), ], 'reference' => (string) $order->getNumber(), 'merchantAccount' => $options['merchantAccount'], diff --git a/src/Resources/config/services/adyen.xml b/src/Resources/config/services/adyen.xml index 9be12d2f..d739a3b1 100644 --- a/src/Resources/config/services/adyen.xml +++ b/src/Resources/config/services/adyen.xml @@ -23,7 +23,6 @@ -