Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bogdan 250 posts 427 karma points
    Jun 25, 2014 @ 09:57
    Bogdan
    0

    Cancel confirmation email when PaymentState != PaymentState.Authorized

    Hello,

    This is what I tried:

    void EmailTemplate_MailSending(EmailTemplate emailTemplate, Order order, MailMessage mailMessage)
    {
        if (order.TransactionInformation.PaymentState != PaymentState.Authorized)
        {
            LoggingService.Instance.Log("TC MailSending - mailMessage = null");
    
            mailMessage = null;
        }
    }
    

    I see the log message, but the confirmation email is still sent. How can it be canceled?

    Thanks!

    P.S. U 6.2.1, TC 2.3.0

  • Anders Burla 2560 posts 8256 karma points
    Jun 26, 2014 @ 14:39
    Anders Burla
    100

    Could you write us an email: info (at) teacommerce.net - so we can send you a nightly build with some major changed to the event model to support your case.

    Kind regards
    Anders

  • Bogdan 250 posts 427 karma points
    Jun 26, 2014 @ 15:24
    Bogdan
    0

    Thanks! Canceling the confirmation email is now done properly with e.CancelSending = true;

    One small "but" though, the issue from here happened again (except the error was ~ 'Sequence contains more than one element'), because after I installed the new package there were two

    Regards, Bogdan

  • Anders Burla 2560 posts 8256 karma points
    Jun 27, 2014 @ 09:19
    Anders Burla
    0

    Hmm we have a install action to remove the duplicates in the installedPackages.config. What was the exact name of your package element in the xml file? We look for "Tea Commerce" and "teacommerce" - that casing.

    Kind regards
    Anders

  • Bogdan 250 posts 427 karma points
    Jun 27, 2014 @ 09:31
    Bogdan
    0

    It was exactly "Tea Commerce" (from svn):

    package id="4" version="2.3.0" url="http://www.teacommerce.net" name="Tea Commerce" folder="17a8b22d-8967-4294-bf9e-1c350408ccad" packagepath="" repositoryGuid="" packageGuid="" hasUpdate="False" enableSkins="False" skinRepoGuid="00000000-0000-0000-0000-000000000000"

    and the new node:

    package id="5" version="2.3.2b3" url="http://www.teacommerce.net" name="Tea Commerce" folder="2785f18d-ff38-4ab9-b4a2-aa3b043237bf" packagepath="" repositoryGuid="" packageGuid="" hasUpdate="False" enableSkins="False" skinRepoGuid="00000000-0000-0000-0000-000000000000"

Please Sign in or register to post replies

Write your reply to:

Draft