Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -24,15 +24,15 @@
*/
class base_checkout_plugin
{
var $checkout_id; /* current checkout plugin id */
var $name; /* plugin name */
protected $checkout_id; /* current checkout plugin id */
protected $name; /* plugin name */
var $type; /* redirect, gateway, or other */
var $recurr_only=false; /* bool */
var $return_url; /* return url */
var $success_url; /* decline url */
var $support_cur; /* supported currency array */
var $cfg;
var $flds;
protected $flds;
var $eft; /* true if checkout plugin type is eft */
var $req_all_flds=true; /* require all account fields (first/last name, address1, state/province, zip) */
var $req_fields_arr=false; /* if req_all_fields=false, use this array to define which fields will be required */
@@ -42,15 +42,32 @@ class base_checkout_plugin
/**
* Get the checkout plugin settings from the database
*/
function getDetails($checkout_id) {
if(!$checkout_id) return;
$this->checkout_id = $checkout_id;
protected function getDetails($checkout_id) {
if (! $checkout_id)
return;
$db = &DB();
$q = "SELECT * FROM ".AGILE_DB_PREFIX."checkout WHERE site_id=".DEFAULT_SITE." AND id=".$db->qstr($checkout_id);
$rs = $db->Execute($q);
if($rs && $rs->RecordCount()) {
@$this->cfg = unserialize($rs->fields["plugin_data"]);
$rs = $db->Execute(sqlSelect($db,'checkout','*',array('id'=>$checkout_id)));
if ($rs && $rs->RecordCount()) {
@$this->cfg = unserialize($rs->fields['plugin_data']);
$this->flds = $rs->fields;
$this->checkout_id = $rs->fields['id'];
}
}
/**
* Get the checkout plugin settings from the database
*/
protected function getDetailsName($checkout_name) {
if (! $checkout_name)
return;
$db = &DB();
$rs = $db->Execute(sqlSelect($db,'checkout','*',array('name'=>$checkout_name)));
if ($rs && $rs->RecordCount()) {
@$this->cfg = unserialize($rs->fields['plugin_data']);
$this->flds = $rs->fields;
$this->checkout_id = $rs->fields['id'];
}
}
@@ -427,4 +444,4 @@ class base_checkout_plugin
return false;
}
}
?>
?>