Skip to content

Dispatch OrderPaymentPaid event based on order payment state#433

Open
rust-le wants to merge 2 commits into
Sylius:2.2from
rust-le:issue/142
Open

Dispatch OrderPaymentPaid event based on order payment state#433
rust-le wants to merge 2 commits into
Sylius:2.2from
rust-le:issue/142

Conversation

@rust-le

@rust-le rust-le commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

fix issue #142

Comment thread config/config.yaml
knp_snappy:
pdf:
enabled: true
binary: '%env(WKHTMLTOPDF_PATH)%'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if '%env(resolve:WKHTMLTOPDF_PATH)%' will be safer 🤔

Comment on lines 53 to +57
$order = $payment->getOrder();

return null !== $order && null !== $this->invoiceRepository->findOneByOrder($order);
return null !== $order &&
$order->getPaymentState() === OrderPaymentStates::STATE_PAID &&
null !== $this->invoiceRepository->findOneByOrder($order);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$order = $payment->getOrder();
if (null === $order) {
    return false;
}

return $order->getPaymentState() === OrderPaymentStates::STATE_PAID && null !== $this->invoiceRepository->findOneByOrder($order);

I think it's more readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants