/** * requireDefaultRecords * Populate the Gateway DataObject with information about our gateway, so that it installs correctly. * * @return void */ public function requireDefaultRecords() { /* Inherit Default Record Creation */ parent::requireDefaultRecords(); $gateway_name = get_class($this); /* If no records exist, create defaults */ if (!DataObject::get_one($gateway_name)) { $n = new $gateway_name(); //Disable the courier by default. $n->Enabled = 0; //System name for this gateway $n->SystemName = "PayPal Payments Standard"; //Friendly name for this courier. $n->Title = "PayPal"; //Sandbox $n->Sandbox = 0; //Debug $n->Debug = "0"; //Write our configuration changes to the courier database tables. $n->write(); unset($n); DB::alteration_message('Successfully installed the gateway "' . $gateway_name . '"', 'created'); } }