diff --git a/spec/Sender/OrderPaymentLinkSenderSpec.php b/spec/Sender/OrderPaymentLinkSenderSpec.php index 9536b30f..0c397c4f 100644 --- a/spec/Sender/OrderPaymentLinkSenderSpec.php +++ b/spec/Sender/OrderPaymentLinkSenderSpec.php @@ -36,7 +36,14 @@ function it_sends_payment_link_for_order_to_the_customer( $customer->getEmail()->willReturn('john@example.com'); $sender - ->send('order_created_in_admin_panel', ['john@example.com'], ['paymentLink' => 'http://payment-link.com']) + ->send( + 'order_created_in_admin_panel', + ['john@example.com'], + [ + 'order' => $order, + 'paymentLink' => 'http://payment-link.com', + ] + ) ->shouldBeCalled() ; diff --git a/src/Sender/OrderPaymentLinkSender.php b/src/Sender/OrderPaymentLinkSender.php index f52a119d..51d1c63b 100644 --- a/src/Sender/OrderPaymentLinkSender.php +++ b/src/Sender/OrderPaymentLinkSender.php @@ -36,7 +36,10 @@ public function sendPaymentLink(OrderInterface $order): void ->send( 'order_created_in_admin_panel', [$order->getCustomer()->getEmail()], - ['paymentLink' => $paymentDetails['payment-link']] + [ + 'order' => $order, + 'paymentLink' => $paymentDetails['payment-link'], + ] ) ; }