Send order completed email without showing the confirmation page

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
marnel
Posts: 13
Joined: 12 Feb 2022, 21:21

Send order completed email without showing the confirmation page

Post by marnel » 05 Jul 2022, 23:34

Hello!
I'm dealing with a payment method that takes a while before contacting my webhook.
I'd thus like to send the completed order email containing the order invoice in my webhook when the payment is captured.
But I'm a little lost about how I can send the email directly in my controller.
Any help? Please..!

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: Send order completed email without showing the confirmation page

Post by aimeos » 06 Jul 2022, 07:46

You should not send order e-mails in your controller because the URL can be called multiple times and then, the e-mails would be sent also multiple times. This is the reason why the Aimeos payment service providers only set the payment status and the e-mail is then sent by the order/service/payment cronjob. This avoids duplicate e-mails as well as other negative effects.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

marnel
Posts: 13
Joined: 12 Feb 2022, 21:21

Re: Send order completed email without showing the confirmation page

Post by marnel » 07 Jul 2022, 09:11

Okay.. I understand.

Post Reply