Child pages
  • [in-commerce] ORDER.SUBMIT e-mail event not sent sometimes (all versions)
Skip to end of metadata
Go to start of metadata

Imported From:

In-Commerce supports payment types of 2 types:

  • direct charge - user enters credit card on In-Portal side and gets charged right on the website
  • delayed charge - user is redirected to gw website and enters cc info there and then gw posts to gw_notify.php script to report charge status

Also there are payment gateways, that has custom notification scripts, that include gw_notify.php in them. These gateways has extra line in them: define('ADMIN', 1);

This presumably allows to substitute session to one used by user, who did a checkout. However as a side effect ORDER.SUBMIT (user type) e-mail event isn't sent, because it has "Front-End Only" checkbox set.

We of course can try to uncheck that checkbox, but this might result in ORDER.SUBMIT e-mail event being sent to user even when administrator is approving an order, but I'm not sure for 100% about that.


  1. Hi Alex,

    I suppose you didn't have a chance to actually try - you are saying it's
    not going to work in theory?

    Are we sure user session is not there at that time? what id Admin = 1 goes
    away will it break the processing?


  2. Yes, I have no way to try, because I don't have any payment gateway details
    that have define('ADMIN', 1); inside their notification scripts in

  3. What if we get rid of define('ADMIN', 1);

    Do we have parts of Order processing depend on it in those notification


  4. I'm guessing session replacement code (which replaces session from cookie
    with one from gateway response) relies on that, but I can't test because I
    don't have any payment gateway credentials to test with.

    Related to session replacement there might be related discussion with no
    attention for quite some time: