Skip to content

Commit

Permalink
order complete processor gets factory name
Browse files Browse the repository at this point in the history
  • Loading branch information
SirDomin committed Aug 31, 2020
1 parent eca96f1 commit 988d44d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/Processor/PayPalOrderCompleteProcessorSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/Processor/PayPalOrderCompleteProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 988d44d

Please sign in to comment.