-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1139 from mailchimp/pre-release/1.1.19
Pre release/1.1.19
- Loading branch information
Showing
123 changed files
with
5,670 additions
and
4,608 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
app/code/community/Ebizmarts/MailChimp/Block/Adminhtml/Mailchimperrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* mc-magento Magento Component | ||
* | ||
|
1 change: 1 addition & 0 deletions
1
app/code/community/Ebizmarts/MailChimp/Block/Adminhtml/Mailchimpstores.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* mc-magento Magento Component | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/** | ||
* | ||
* MailChimp For Magento | ||
* | ||
* Class Ebizmarts_MailChimp_Helper_Curl | ||
* @category Ebizmarts_MailChimp | ||
* @author Ebizmarts Team <[email protected]> | ||
* @copyright Ebizmarts (http://ebizmarts.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @date: 9/5/19 3:55 PM | ||
* @file: Curl.php | ||
*/ | ||
|
||
class Ebizmarts_MailChimp_Helper_Curl extends Mage_Core_Helper_Abstract | ||
{ | ||
/** | ||
* @param array $options | ||
* @return array An array with... | ||
*/ | ||
public function curlExec($url, $httpMethod, $curlOptions = array(), $params = array()) | ||
{ | ||
if ($url === false) { | ||
return array('error' => "It's required an URL to be requested with any http method."); | ||
} | ||
|
||
if ($httpMethod === false) { | ||
return array('error' => "It's required to specify the HTTP method."); | ||
} | ||
|
||
$curlError = null; | ||
$curl = new Mage_HTTP_Client_Curl(); | ||
|
||
foreach ($curlOptions as $key => $value) { | ||
if (isset($value)) { | ||
$curl->setOption($key, $value); | ||
} | ||
} | ||
|
||
$curlResult = null; | ||
|
||
try { | ||
if ($httpMethod == Zend_Http_Client::GET) { | ||
$curl->get($url); | ||
} elseif ($httpMethod == Zend_Http_Client::POST) { | ||
$curl->post($url, $params); | ||
} | ||
|
||
$curlResult = $curl->getBody(); | ||
} catch (Exception $e) { | ||
$curlError = $e->getMessage(); | ||
} | ||
|
||
return array('response' => $curlResult, 'error' => $curlError); | ||
} | ||
} |
Oops, something went wrong.