From 988d44d19364dfbe1f0c78d24d93ce13de244e05 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Mon, 31 Aug 2020 13:41:43 +0200 Subject: [PATCH] order complete processor gets factory name --- spec/Processor/PayPalOrderCompleteProcessorSpec.php | 4 ++-- src/Processor/PayPalOrderCompleteProcessor.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/Processor/PayPalOrderCompleteProcessorSpec.php b/spec/Processor/PayPalOrderCompleteProcessorSpec.php index 59e5358e..6ed54bdb 100644 --- a/spec/Processor/PayPalOrderCompleteProcessorSpec.php +++ b/spec/Processor/PayPalOrderCompleteProcessorSpec.php @@ -39,7 +39,7 @@ function it_completes_pay_pal_order( $payment->getMethod()->willReturn($paymentMethod); $paymentMethod->getGatewayConfig()->willReturn($gatewayConfig); - $gatewayConfig->getGatewayName()->willReturn('paypal'); + $gatewayConfig->getFactoryName()->willReturn('sylius.pay_pal'); $paymentStateManager->complete($payment)->shouldBeCalled(); @@ -57,7 +57,7 @@ function it_does_nothing_if_processing_payment_is_not_pay_pal( $payment->getMethod()->willReturn($paymentMethod); $paymentMethod->getGatewayConfig()->willReturn($gatewayConfig); - $gatewayConfig->getGatewayName()->willReturn('stripe'); + $gatewayConfig->getFactoryName()->willReturn('stripe'); $paymentStateManager->complete($payment)->shouldNotBeCalled(); diff --git a/src/Processor/PayPalOrderCompleteProcessor.php b/src/Processor/PayPalOrderCompleteProcessor.php index ab4f4910..c177513a 100644 --- a/src/Processor/PayPalOrderCompleteProcessor.php +++ b/src/Processor/PayPalOrderCompleteProcessor.php @@ -32,7 +32,7 @@ public function completePayPalOrder(OrderInterface $order): void /** @var GatewayConfigInterface $gatewayConfig */ $gatewayConfig = $paymentMethod->getGatewayConfig(); - if ($gatewayConfig->getGatewayName() !== 'paypal') { + if ($gatewayConfig->getFactoryName() !== 'sylius.pay_pal') { return; }