I’m trying to use Braintree payments on my site and I got their extension working but it only works when compilation is disabled. Once I enable it I get a 500 error at the checkout page.
I enabled logs and system.log shows
2013-06-13T16:55:45+00:00 ERR (3): Warning: require_once(Braintree/lib/Braintree.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/includes/src/Braintree_Model_Paymentmethod.php on line 3
In that file line 3 is
which makes me think that compilation doesn’t do well with require_once calls. I looked in other files and it seems their require_once calls look like
so I tried to change it to that but it seems every time I enable compilation it changes it back to the original (any ideas why?)
I also tried removing that line but that just gave me
2013-06-13T17:15:49+00:00 ERR (3): Warning: include(/home/USERNAME/public_html/includes/src/Braintree_Configuration.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/includes/src/Varien_Autoload.php on line 93
2013-06-13T17:15:49+00:00 ERR (3): Warning: include(): Failed opening ‘/home/USERNAME/public_html/includes/src/Braintree_Configuration.php’ for inclusion (include_path=’/home/USERNAME/public_html/includes/src:.:/usr/share/php:/usr/share/pear’) in /home/USERNAME/public_html/includes/src/Varien_Autoload.php on line 93
What’s the correct way to include that file so that it will work when compilation is enabled?