コード例 #1
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('smsconnexion/smsconnexion');
     $this->_smxUsername = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_username');
     $this->_smxPassword = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_password');
     $this->_smxSecret = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_secret');
     $obj = new Celusion_SMSConneXion_Model_Client();
     $objResult = $obj->license();
     if (!$objResult) {
         $str = "You don't have the license to run the SMSConneXion module for License Key is Invalid";
         $str .= "\n";
         $str .= ' contact <a href="mailto:support@celusion.com">support@celusion.com</a>';
         Mage::getSingleton('adminhtml/session')->addError($str);
     }
 }
コード例 #2
0
ファイル: Client.php プロジェクト: mSupply/runnable_test_repo
 private static function _getHttpClient()
 {
     if (!self::$_httpClient instanceof Zend_Http_Client) {
         self::$_httpClient = new Zend_Http_Client();
     }
     return self::$_httpClient;
 }
コード例 #3
0
 public function SendSms($mobileno, $message)
 {
     $username = $this->_smxUsername;
     $pass = $this->_smxPassword;
     Zend_Loader::loadClass('Zend_Http_Client');
     $obj = new Celusion_SMSConneXion_Model_Client();
     $objResult = $obj->license();
     //Mage::log('License Result '.$objResult);
     if ($objResult) {
         $smx = new Zend_Http_Client('http://smsc.smsconnexion.com/api/gateway.aspx');
         $smx->setParameterPost(array('action' => 'send', 'username' => $username, 'passphrase' => $pass, 'phone' => $mobileno, 'message' => $message));
         $response = $smx->request('POST');
     }
 }