Version Notes
Stable
Download this release
Release Info
Developer | WebsiteAlive |
Extension | WebsiteAlive_LiveChat |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 2.0.1
app/code/community/WebsiteAlive/Connector/Model/Rewrite/Paypal/Api/Nvp.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* NOTICE OF LICENSE
|
4 |
+
*
|
5 |
+
* This source file is subject to the End User Software Agreement (EULA).
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.harapartners.com/license
|
8 |
+
* If you did not receive a copy of the license and are unable to
|
9 |
+
* obtain it through the world-wide-web, please send an email
|
10 |
+
* to eula@harapartners.com so we can send you a copy immediately.
|
11 |
+
*
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class WebsiteAlive_Connector_Model_Rewrite_Paypal_Api_Nvp extends Mage_Paypal_Model_Api_Nvp {
|
15 |
+
|
16 |
+
public function getButtonSourceEc(){
|
17 |
+
return $this->getBuildNotationCode();
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getButtonSourceDp(){
|
21 |
+
return $this->getBuildNotationCode();
|
22 |
+
}
|
23 |
+
|
24 |
+
//Important build code update, for Mage_Paypal 1.4 -
|
25 |
+
public function getBuildNotationCode($countryCode = null){
|
26 |
+
if($this->_isModuleActive('Enterprise_Enterprise')){
|
27 |
+
return 'Hara_SI_MagentoEE_PPA';
|
28 |
+
}else{
|
29 |
+
return 'Hara_SI_MagentoCE_PPA';
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
private function _isModuleActive($code) {
|
34 |
+
$module = Mage::getConfig()->getNode("modules/$code");
|
35 |
+
$model = Mage::getConfig()->getNode("global/models/$code");
|
36 |
+
return $module && $module->is('active') || $model;
|
37 |
+
}
|
38 |
+
|
39 |
+
}
|
app/code/community/WebsiteAlive/Connector/Model/Rewrite/Paypal/Config.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* NOTICE OF LICENSE
|
4 |
+
*
|
5 |
+
* This source file is subject to the End User Software Agreement (EULA).
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.harapartners.com/license
|
8 |
+
* If you did not receive a copy of the license and are unable to
|
9 |
+
* obtain it through the world-wide-web, please send an email
|
10 |
+
* to eula@harapartners.com so we can send you a copy immediately.
|
11 |
+
*
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class WebsiteAlive_Connector_Model_Rewrite_Paypal_Config extends Mage_Paypal_Model_Config {
|
15 |
+
|
16 |
+
protected $_isStagingMode = null;
|
17 |
+
|
18 |
+
/* Compatibility for Staging server SSL verification */
|
19 |
+
public function __get($key){
|
20 |
+
if(strcmp($key, 'verifyPeer') == 0 || strcmp($key, 'verify_peer') == 0){
|
21 |
+
if($this->_isStagingMode === null){
|
22 |
+
$this->_isStagingMode = 0;
|
23 |
+
try{
|
24 |
+
$curlResource = curl_init("https://www.paypal.com/");
|
25 |
+
curl_setopt($curlResource, CURLOPT_TIMEOUT, 3);
|
26 |
+
curl_setopt($curlResource, CURLOPT_RETURNTRANSFER, false);
|
27 |
+
curl_setopt($curlResource, CURLOPT_SSL_VERIFYPEER, true);
|
28 |
+
curl_exec($curlResource);
|
29 |
+
$curlError = curl_error($curlResource);
|
30 |
+
curl_close($curlResource);
|
31 |
+
if(!!$curlError){
|
32 |
+
$this->_isStagingMode = 1;
|
33 |
+
}
|
34 |
+
}catch (Exception $ex){
|
35 |
+
$this->_isStagingMode = 1;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
if($this->_isStagingMode == 1){
|
39 |
+
return 0;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
return parent::__get($key);
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getBuildNotationCode($countryCode = null){
|
46 |
+
if($this->_isModuleActive('Enterprise_Enterprise')){
|
47 |
+
return 'Hara_SI_MagentoEE_PPA';
|
48 |
+
}else{
|
49 |
+
return 'Hara_SI_MagentoCE_PPA';
|
50 |
+
}
|
51 |
+
}
|
52 |
+
private function _isModuleActive($code) {
|
53 |
+
$module = Mage::getConfig()->getNode("modules/$code");
|
54 |
+
$model = Mage::getConfig()->getNode("global/models/$code");
|
55 |
+
return $module && $module->is('active') || $model;
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/WebsiteAlive/Connector/etc/config.xml
CHANGED
@@ -31,6 +31,13 @@
|
|
31 |
<waconnector>
|
32 |
<class>WebsiteAlive_Connector_Model</class>
|
33 |
</waconnector>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
</models>
|
35 |
</global>
|
36 |
<frontend>
|
@@ -83,5 +90,12 @@
|
|
83 |
<is_enabled>1</is_enabled>
|
84 |
</general>
|
85 |
</waconnector>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
</default>
|
87 |
</config>
|
31 |
<waconnector>
|
32 |
<class>WebsiteAlive_Connector_Model</class>
|
33 |
</waconnector>
|
34 |
+
<paypal>
|
35 |
+
<rewrite>
|
36 |
+
<!-- /* Compatibility for Staging server SSL verification */ -->
|
37 |
+
<config>WebsiteAlive_Connector_Model_Rewrite_Paypal_Config</config>
|
38 |
+
<api_nvp>WebsiteAlive_Connector_Model_Rewrite_Paypal_Api_Nvp</api_nvp>
|
39 |
+
</rewrite>
|
40 |
+
</paypal>
|
41 |
</models>
|
42 |
</global>
|
43 |
<frontend>
|
90 |
<is_enabled>1</is_enabled>
|
91 |
</general>
|
92 |
</waconnector>
|
93 |
+
<paypal>
|
94 |
+
<!-- /* Compatibility for Staging server SSL verification */ -->
|
95 |
+
<wpp>
|
96 |
+
<button_source_ec>Hara_SI_MagentoCE_PPA</button_source_ec>
|
97 |
+
<button_source_dp>Hara_SI_MagentoCE_PPA</button_source_dp>
|
98 |
+
</wpp>
|
99 |
+
</paypal>
|
100 |
</default>
|
101 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>WebsiteAlive_LiveChat</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.harapartners.com/terms/eula">Hara Partners End User License Agreement</license>
|
7 |
<channel>community</channel>
|
@@ -11,8 +11,8 @@
|
|
11 |
<notes>Stable</notes>
|
12 |
<authors><author><name>WebsiteAlive</name><user>websitealive</user><email>magento@websitealive.com</email></author></authors>
|
13 |
<date>2013-11-15</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="WebsiteAlive"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Login.php" hash="b1ee8c7310d15eb35115b6ffd4d044b5"/></dir></dir></dir><file name="Connector.php" hash="e95a72c77c0cd98c91b1cf1a5629d5e2"/></dir><dir name="Helper"><file name="Data.php" hash="47bdea73889322389a027bd02e25783c"/></dir><dir name="Model"><file name="Observer.php" hash="f21787936f41a2aeaceb7ad8286ed3a2"/><dir name="Source"><file name="Website.php" hash="86d9a5a424bd8d77c18aca2b0d778c80"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="AjaxController.php" hash="a1fb99cdcb15b8ac2582a8981a55ebb7"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>WebsiteAlive_LiveChat</name>
|
4 |
+
<version>2.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.harapartners.com/terms/eula">Hara Partners End User License Agreement</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>Stable</notes>
|
12 |
<authors><author><name>WebsiteAlive</name><user>websitealive</user><email>magento@websitealive.com</email></author></authors>
|
13 |
<date>2013-11-15</date>
|
14 |
+
<time>22:33:11</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="WebsiteAlive"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Login.php" hash="b1ee8c7310d15eb35115b6ffd4d044b5"/></dir></dir></dir><file name="Connector.php" hash="e95a72c77c0cd98c91b1cf1a5629d5e2"/></dir><dir name="Helper"><file name="Data.php" hash="47bdea73889322389a027bd02e25783c"/></dir><dir name="Model"><file name="Observer.php" hash="f21787936f41a2aeaceb7ad8286ed3a2"/><dir name="Rewrite"><dir name="Paypal"><dir name="Api"><file name="Nvp.php" hash="f0b37435eed050cb177a12cc40405224"/></dir><file name="Config.php" hash="443bd0e7dc15edfad0a01430614a1a89"/></dir></dir><dir name="Source"><file name="Website.php" hash="86d9a5a424bd8d77c18aca2b0d778c80"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="AjaxController.php" hash="a1fb99cdcb15b8ac2582a8981a55ebb7"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="a6fa062292884659d17691a5c9460fb8"/><file name="system.xml" hash="940a0c6175a107b1276bbd7cff09620b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="WebsiteAlive_Connector.xml" hash="26a4ea76879343a98f522ad9d6240ff2"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|