I did this recently with a custom class located within the ecommerce module using the module's DPS payment classes as an example.
I simply got my custom class and made it extend Object. e.g.
class DPS extends Object
{
var $PxPay_Key;
var $PxPay_Url;
var $PxPay_Userid;
function __construct($Url, $UserId, $Key){
error_reporting(E_ERROR);
$this->PxPay_Key = $Key;
$this->PxPay_Url = $Url;
$this->PxPay_Userid = $UserId;
}
}
The contents of the Class can remain as they would be if this were just a roll-your-own website.
After that, no include statements are necessary as it is now hooked into SS and I can access the class from anywhere simply by calling
$myDPS = new DPS($Url, $UserId, $Key);
Aaron