2CheckOut
To setup the callback process for 2CheckOut to automatically mark invoices paid, go to the Account > Site Management section in the 2CO Vendor Admin and set "Direct Return" to Immediate and the "Approved URL" to http://www.yourdomain.com/whmcs/modules/gateways/callback/2checkout.php
For added security, on the same page you can set a "Secret Word". If you set this, in the payment gateway configuration page of your WHMCS system, enter the same secret word so that WHMCS can verify that the callbacks it receives are coming from 2CheckOut.
Please note when using demo mode, that all callbacks will fail with the error MD5 Hash Failure if a secret word is specified. This is done intentionally by 2Checkout to protect those who sell digital goods from fraudulent purchases through the demo mode.