Auto trigger paymentstatus = paid e-mail after payment

Hi all,

I am using a plugin to handle payments for my shop through Mollie (Dutch PSP). After direct payment, the payment status of the order reaches the ‘paid’ state. However, the corresponding e-mail is not sent. It’s not in the log and my current template contains no errors. We don’t see any errors in the logs either. I have allocated the mailtemplate to the right saleschannel. When I manually change the state of an order, the linked e-mail does get sent. 

I have two questions:

  1. Is my assumption that the mentioned e-mail should be triggered automatically by the fact the payment status of the order reaches the paid state correct? If not, how and where should I build such a trigger? 

  2. If my assumption in 1. is correct, what could I check to see what is going wrong here? The developer who’s built the payment plugin suggest that this is something that would be happening outside of their plugin / is something the can’t influence. 

Please let me know if any additional information is needed. Thanks in advance for your responses.

Its not necessary to trigger this by your self!

Just make sure there is a mail template with type ‘Bestellbestätigung’ or in englisch ‘order confirmation’ and also make sure the Sales channel is selected.

If both things are set and there are no errors in your content then the mail will be sent

Thanks for your response. This e-mail does get sent with other payment methods (like pay later), or when I change the payment status of an order manually. This means the template is there, the saleschannel is allocated, and there are no errors in the content of the mail.

However, the issue here is that the e-mail does not get triggered when a payment is made with iDEAL through Mollie (Dutch PSP)

It seems that the e-mail is not sent as a result of a change of the payment status, but that the trigger is a separate process. Is this correct? Then I would like to know how and where to create this trigger.

If the e-mail should be triggered as a result of a change of the payment status I am wondering what I could do to find out what is going wrong here.

Hopefully this clarifies my question and someone is able to give directions.

1 „Gefällt mir“

I’ve got pretty much the same problem.

 

When I click “pay” in the basket I’m redirected to Mollie, and the shop sends a confirmation email directly even though the customer hasn’t paid.

 

When the status changed to “paid” no email is being triggered.

 

Any idea why ?

1 „Gefällt mir“

Okay, that is exactly the issue I’m running into. Relieved to see I’m not the only one. Hopefully someone is able to tell whether this goes wrong in the plugin or on the Shopware side and thus where we should search for a solution.

It will be possible to define whether to send a confirmation mail when the order is placed or a payment confirmation when the payment is compleded (or both). It’s already on the external roadmap. Currently the change to paid when it’s done by a plugin won’t be send.

3 „Gefällt mir“

Thanks, that clarifies everything. We will wait for that step in the process. Keep up the good work!

1 „Gefällt mir“

How can we manually trigger this event ? Can you help us. 

 

Thanks for the clarification :wink:

any update on the date that issue will be solved? desperately waiting.

Same issue here.

It’s on the Roadmap with timeline.

Great. Thx for the update

It is a little late, but I found some solution for my case.
I have found a solution that helped me to trigger „OrderPlaced“ event.
I used „\Shopware\Core\Content\Test\Flow\FlowDispatcherTest“ for that.

Some things like this:

$event = new CheckoutOrderPlacedEvent(Context::createDefaultContext(), $this->getOrderEntity(), $this->getSalesChannel()->getId());
$this->getShopwareContainer()->get('event_dispatcher')->dispatch($event);

Am I wrong, or isn’t this issue solved in SW5 until yet?
Any idea to trigger „OrderPaid“ event?