Its not clear from your post at what point the transaction fails, but I have a suggestion which may help.
One of the pages created from the checkout wizard is confirm.php.
On this page there are parameters for the return url and the cancel url.
Check these out, as they should also point to the subdirectory