function __construct($gateway_override = false)
 {
     $s = BigTreeAdmin::getSetting("bigtree-internal-payment-gateway");
     // Setting doesn't exist? Create it.
     if ($s === false) {
         sqlquery("INSERT INTO bigtree_settings (`id`,`system`,`encrypted`) VALUES ('bigtree-internal-payment-gateway','on','on')");
         $s = array("service" => "", "settings" => array());
         BigTreeAdmin::updateSettingValue("bigtree-internal-payment-gateway", $s);
     }
     // If for some reason the setting doesn't exist, make one.
     $this->Service = isset($s["value"]["service"]) ? $s["value"]["service"] : "";
     $this->Settings = isset($s["value"]["settings"]) ? $s["value"]["settings"] : array();
     // If you specifically request a certain service, use it instead of the default
     if ($gateway_override) {
         $this->Service = $gateway_override;
     }
     if ($this->Service == "authorize.net") {
         $this->setupAuthorize();
     } elseif ($this->Service == "paypal") {
         $this->setupPayPal();
     } elseif ($this->Service == "paypal-rest") {
         $this->setupPayPalREST();
     } elseif ($this->Service == "payflow") {
         $this->setupPayflow();
     } elseif ($this->Service == "linkpoint") {
         $this->setupLinkPoint();
     }
 }
Esempio n. 2
0
 function __construct()
 {
     $s = BigTreeAdmin::getSetting("bigtree-internal-email-service");
     // Setting doesn't exist? Create it.
     if ($s === false) {
         sqlquery("INSERT INTO bigtree_settings (`id`,`system`,`encrypted`) VALUES ('bigtree-internal-email-service','on','on')");
         $s = array("service" => "", "settings" => array());
         BigTreeAdmin::updateSettingValue("bigtree-internal-email-service", $s);
     }
     $this->Service = !empty($s["value"]["service"]) ? $s["value"]["service"] : "local";
     $this->Settings = !empty($s["value"]["settings"]) ? $s["value"]["settings"] : array();
 }
Esempio n. 3
0
 function __construct()
 {
     $admin = new BigTreeAdmin();
     $s = $admin->getSetting("bigtree-internal-payment-gateway");
     if ($s === false) {
         $admin->createSetting(array("id" => "bigtree-internal-payment-gateway", "system" => "on", "encrypted" => "on"));
         $s = array("service" => "", "settings" => array());
         $admin->updateSettingValue("bigtree-internal-payment-gateway", $s);
     }
     // If for some reason the setting doesn't exist, make one.
     $this->Service = isset($s["value"]["service"]) ? $s["value"]["service"] : "";
     $this->Settings = isset($s["value"]["settings"]) ? $s["value"]["settings"] : array();
     if ($this->Service == "authorize.net") {
         $this->setupAuthorize();
     } elseif ($this->Service == "paypal") {
         $this->setupPayPal();
     } elseif ($this->Service == "paypal-rest") {
         $this->setupPayPalREST();
     } elseif ($this->Service == "payflow") {
         $this->setupPayflow();
     } elseif ($this->Service == "linkpoint") {
         $this->setupLinkPoint();
     }
 }