Esempio n. 1
0
 public function __construct($api_key)
 {
     $this->api_key = $api_key;
     parent::__construct();
     $this->setMethod(self::METHOD_POST);
     $this->setUrl($this->endpoint);
 }
Esempio n. 2
0
 public function __construct(Am_Paysystem_Abstract $plugin)
 {
     $this->plugin = $plugin;
     $cert_file = APPLICATION_PATH . '/configs/cert_key_pem.txt';
     if (is_file($cert_file) && is_readable($cert_file)) {
         $this->use_cert = true;
     }
     if (!$this->use_cert) {
         $url = $this->plugin->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL;
     } else {
         $url = $this->plugin->getConfig('testing') ? self::CERT_SANDBOX_URL : self::CERT_LIVE_URL;
     }
     parent::__construct($url, self::METHOD_POST);
     if ($adapter = $this->plugin->createHttpRequest()->getConfig('adapter')) {
         $this->setConfig('adapter', $adapter);
     }
     // Check certificate file.
     if ($this->use_cert) {
         $this->setConfig('ssl_local_cert', $cert_file);
     }
     // Check certificate file.
     $ca_file = APPLICATION_PATH . "/configs/api_cert_chain.crt";
     if ($this->use_cert && is_file($ca_file) && is_readable($ca_file)) {
         $this->setConfig('ssl_cafile', $cert_file);
     }
     if (!$this->use_cert) {
         $this->addPostParameter('SIGNATURE', $this->plugin->getConfig('api_signature'));
     }
     $this->addPostParameter('VERSION', '63.0')->addPostParameter('BUTTONSOURCE', 'CgiCentral.aMemberPro')->addPostParameter('USER', $this->plugin->getConfig('api_username'))->addPostParameter('PWD', $this->plugin->getConfig('api_password'));
 }
 public function __construct(Am_Paysystem_Abstract $plugin)
 {
     $this->plugin = $plugin;
     parent::__construct($this->plugin->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL, self::METHOD_POST);
     if ($adapter = $this->plugin->createHttpRequest()->getConfig('adapter')) {
         $this->setConfig('adapter', $adapter);
     }
     $this->addPostParameter('VERSION', '63.0')->addPostParameter('SIGNATURE', $this->plugin->getConfig('api_signature'))->addPostParameter('USER', $this->plugin->getConfig('api_username'))->addPostParameter('PWD', $this->plugin->getConfig('api_password'));
 }
Esempio n. 4
0
 public function __construct($plugin, $requestType)
 {
     $this->plugin = $plugin;
     $this->requestType = $requestType;
     parent::__construct();
     $this->setUrl($this->plugin->getConfig('testMode') ? Am_Paysystem_Intuit::URL_TEST : Am_Paysystem_Intuit::URL_LIVE);
     $this->setMethod(Am_Request::METHOD_POST);
     $this->setHeader('Content-type', 'application/x-qbmsxml');
 }
Esempio n. 5
0
 public function __construct($url, $debug = false)
 {
     parent::__construct();
     $this->setMethod(self::METHOD_POST);
     $this->setHeader('Content-type: text/xml; charset=utf-8');
     $this->setUrl($url);
     $this->debuglog = $debug;
 }
Esempio n. 6
0
 public function __construct($xmlOut, $requestType, $debugMode = false)
 {
     $this->requestType = $requestType;
     $this->debugMode = $debugMode;
     parent::__construct(Am_Paysystem_PaymentExpress::URL, self::METHOD_POST);
     $this->setBody($xmlOut);
 }
Esempio n. 7
0
 public function __construct(Am_Newsletter_Plugin_Madmimi $plugin)
 {
     $this->plugin = $plugin;
     parent::__construct();
 }
Esempio n. 8
0
 public function __construct(Am_Newsletter_Plugin_Icontact $plugin)
 {
     parent::__construct();
     if ($plugin->getConfig('testmode')) {
         $this->setLink($this->urlTest . '/icp/a/' . $plugin->getConfig('accountid') . '/c/' . $plugin->getConfig('clientfolderid'));
     } else {
         $this->setLink($this->urlWork . '/icp/a/' . $plugin->getConfig('accountid') . '/c/' . $plugin->getConfig('clientfolderid'));
     }
     $this->debugLog = $plugin->getConfig('debuglog');
     $this->setHeader(array('Accept: application/json', 'Content-Type: application/json', 'Api-Version: 2.0', 'Api-Username: '******'user'), 'Api-AppId: ' . $plugin->getConfig('apiappid'), 'Api-Password: '******'apipass')));
 }
Esempio n. 9
0
 public function __construct(Am_Newsletter_Plugin_Autoresponderpro $plugin)
 {
     $this->plugin = $plugin;
     parent::__construct();
     $this->setMethod(self::METHOD_POST);
     $this->setHeader('Content-type: text/xml; charset=utf-8');
     $this->setUrl($this->url);
 }
Esempio n. 10
0
 public function __construct($account_id, $auth_token)
 {
     $this->account_id = $account_id;
     $this->auth_token = $auth_token;
     parent::__construct();
 }
Esempio n. 11
0
 public function __construct(Am_Newsletter_Plugin_Sendgrid $plugin)
 {
     $this->plugin = $plugin;
     parent::__construct();
     $this->setMethod(self::METHOD_POST);
 }