I am creating a custom payment module, which connects to some bank payment gateway, all work well if i set the Advance Parameters > Emails to "Never send email", but if i set it to anything but that, it throws me an "Invalid email template" error.
I have browse around for solutions without finding any.
I have put templates in
themes/my_theme/mails/en/ (and everywhere else i can find mails folder)
but this doesn't seem to be the issue
so i did a little research, apparently whats causing this is my module's validation.php
validateOrder() => OrderHistory::addWithemail => Mail::Send()
if i do a dump on Mail::Send() arguments, my $template value is always ''
so my question is, where can i set this $template ?
i see an initiation of OrderState object inside my install method where i can have
$orderState->template
and i have tried setting
$orderState->template = $this->name;
also with no luck
Please help