DigitalPianism_CampaignMonitor - Version 0.7.1

Version Notes

- Added OAuth authentication support.

Download this release

Release Info

Developer Digital Pianism
Extension DigitalPianism_CampaignMonitor
Version 0.7.1
Comparing to
See all releases


Code changes from version 0.7.0 to 0.7.1

Files changed (17) hide show
  1. app/code/community/DigitalPianism/CampaignMonitor/Block/Adminhtml/System/Config/Form/Field/Auth.php +19 -0
  2. app/code/community/DigitalPianism/CampaignMonitor/Block/Adminhtml/System/Config/Form/Field/Refreshtoken.php +11 -0
  3. app/code/community/DigitalPianism/CampaignMonitor/Block/Adminhtml/System/Config/Source/Authtype.php +51 -0
  4. app/code/community/DigitalPianism/CampaignMonitor/Helper/Data.php +83 -0
  5. app/code/community/DigitalPianism/CampaignMonitor/Model/Auth.php +38 -0
  6. app/code/community/DigitalPianism/CampaignMonitor/Model/Customer/Observer.php +79 -9
  7. app/code/community/DigitalPianism/CampaignMonitor/Model/System/Config/Source/Authtype.php +11 -0
  8. app/code/community/DigitalPianism/CampaignMonitor/controllers/AdminhookController.php +26 -2
  9. app/code/community/DigitalPianism/CampaignMonitor/controllers/Adminhtml/AuthController.php +108 -0
  10. app/code/community/DigitalPianism/CampaignMonitor/controllers/AuthController.php +18 -0
  11. app/code/community/DigitalPianism/CampaignMonitor/controllers/HookController.php +46 -4
  12. app/code/community/DigitalPianism/CampaignMonitor/controllers/UnsubscribeController.php +26 -3
  13. app/code/community/DigitalPianism/CampaignMonitor/etc/config.xml +13 -1
  14. app/code/community/DigitalPianism/CampaignMonitor/etc/system.xml +48 -3
  15. app/design/adminhtml/default/default/template/digitalpianism/campaignmonitor/system/config/form/field/auth.phtml +18 -0
  16. app/design/adminhtml/default/default/template/digitalpianism/campaignmonitor/system/config/form/field/refreshtoken.phtml +10 -0
  17. package.xml +6 -6
app/code/community/DigitalPianism/CampaignMonitor/Block/Adminhtml/System/Config/Form/Field/Auth.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DigitalPianism_CampaignMonitor_Block_Adminhtml_System_Config_Form_Field_Auth extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+ // Template to the button
5
+ protected $_template = "digitalpianism/campaignmonitor/system/config/form/field/auth.phtml";
6
+
7
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
8
+ {
9
+ return $this->_toHtml();
10
+ }
11
+
12
+ // Get the OAuth data once authenticated
13
+ public function getUserData()
14
+ {
15
+ $info = Mage::getModel('campaignmonitor/auth')->getUserData();
16
+ return $info;
17
+ }
18
+
19
+ }
app/code/community/DigitalPianism/CampaignMonitor/Block/Adminhtml/System/Config/Form/Field/Refreshtoken.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DigitalPianism_CampaignMonitor_Block_Adminhtml_System_Config_Form_Field_Refreshtoken extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+ // Template to the button
5
+ protected $_template = "digitalpianism/campaignmonitor/system/config/form/field/refreshtoken.phtml";
6
+
7
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
8
+ {
9
+ return $this->_toHtml();
10
+ }
11
+ }
app/code/community/DigitalPianism/CampaignMonitor/Block/Adminhtml/System/Config/Source/Authtype.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DigitalPianism_CampaignMonitor_Block_Adminhtml_System_Config_Source_Authtype extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+ /**
5
+ * Override method to output our custom HTML with JavaScript
6
+ *
7
+ * @param Varien_Data_Form_Element_Abstract $element
8
+ * @return String
9
+ */
10
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
11
+ {
12
+ // Get the default HTML for this option
13
+ $html = parent::_getElementHtml($element);
14
+ // Set up additional JavaScript for our toggle action.
15
+ // In order to hide useless fields when switching the auth type
16
+ $javaScript = "
17
+ <script type=\"text/javascript\">
18
+ Event.observe('newsletter_campaignmonitor_authentication_type', 'change', function(){
19
+ value=$('newsletter_campaignmonitor_authentication_type').value;
20
+ if (value == 'api') {
21
+ $('row_newsletter_campaignmonitor_api_key').show();
22
+ $('row_newsletter_campaignmonitor_client_id').hide();
23
+ $('row_newsletter_campaignmonitor_client_secret').hide();
24
+ $('row_newsletter_campaignmonitor_auth').hide();
25
+ } else {
26
+ $('row_newsletter_campaignmonitor_client_id').show();
27
+ $('row_newsletter_campaignmonitor_client_secret').show();
28
+ $('row_newsletter_campaignmonitor_auth').show();
29
+ $('row_newsletter_campaignmonitor_api_key').hide();
30
+ }
31
+ });
32
+ Event.observe(window, 'load', function(){
33
+ value=$('newsletter_campaignmonitor_authentication_type').value;
34
+ if (value == 'api') {
35
+ $('row_newsletter_campaignmonitor_api_key').show();
36
+ $('row_newsletter_campaignmonitor_client_id').hide();
37
+ $('row_newsletter_campaignmonitor_client_secret').hide();
38
+ $('row_newsletter_campaignmonitor_auth').hide();
39
+ } else {
40
+ $('row_newsletter_campaignmonitor_client_id').show();
41
+ $('row_newsletter_campaignmonitor_client_secret').show();
42
+ $('row_newsletter_campaignmonitor_auth').show();
43
+ $('row_newsletter_campaignmonitor_api_key').hide();
44
+ }
45
+ });
46
+ </script>";
47
+
48
+ $html .= $javaScript;
49
+ return $html;
50
+ }
51
+ }
app/code/community/DigitalPianism/CampaignMonitor/Helper/Data.php CHANGED
@@ -1,8 +1,12 @@
1
  <?php
2
  include_once MAGENTO_ROOT . "/lib/createsend/csrest_lists.php";
 
3
 
4
  class DigitalPianism_CampaignMonitor_Helper_Data extends Mage_Core_Helper_Abstract
5
  {
 
 
 
6
  protected $logFileName = 'factoryx_campaignmonitor.log';
7
 
8
  /**
@@ -14,16 +18,47 @@ class DigitalPianism_CampaignMonitor_Helper_Data extends Mage_Core_Helper_Abstra
14
  Mage::log($data, null, $this->logFileName);
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  public function getApiKey()
18
  {
19
  return trim(Mage::getStoreConfig('newsletter/campaignmonitor/api_key'));
20
  }
21
 
 
 
 
22
  public function getListId()
23
  {
24
  return trim(Mage::getStoreConfig('newsletter/campaignmonitor/list_id'));
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  // get array of linked attributes from the config settings and
28
  // populate it
29
  public static function generateCustomFields($customer)
@@ -116,5 +151,53 @@ class DigitalPianism_CampaignMonitor_Helper_Data extends Mage_Core_Helper_Abstra
116
 
117
  return $customFields;
118
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
  }
1
  <?php
2
  include_once MAGENTO_ROOT . "/lib/createsend/csrest_lists.php";
3
+ include_once MAGENTO_ROOT . "/lib/createsend/csrest_general.php";
4
 
5
  class DigitalPianism_CampaignMonitor_Helper_Data extends Mage_Core_Helper_Abstract
6
  {
7
+ const CAMPAIGNMONITOR_CONFIG_DATA_KEY = 'newsletter/campaignmonitor/campaignmonitor_data';
8
+ const CAMPAIGNMONITOR_SESSION_DATA_KEY = 'campaignmonitor_session_data';
9
+
10
  protected $logFileName = 'factoryx_campaignmonitor.log';
11
 
12
  /**
18
  Mage::log($data, null, $this->logFileName);
19
  }
20
 
21
+ /*
22
+ * Check if the auth type is OAuth
23
+ */
24
+ public function isOAuth()
25
+ {
26
+ if (Mage::getStoreConfig('newsletter/campaignmonitor/authentication_type') == "oauth") return true;
27
+ else return false;
28
+ }
29
+
30
+ /*
31
+ * Retrieve the API Key
32
+ */
33
  public function getApiKey()
34
  {
35
  return trim(Mage::getStoreConfig('newsletter/campaignmonitor/api_key'));
36
  }
37
 
38
+ /*
39
+ * Retrieve the List ID
40
+ */
41
  public function getListId()
42
  {
43
  return trim(Mage::getStoreConfig('newsletter/campaignmonitor/list_id'));
44
  }
45
 
46
+ /*
47
+ * Retrieve the Client ID
48
+ */
49
+ public function getClientId()
50
+ {
51
+ return trim(Mage::getStoreConfig('newsletter/campaignmonitor/client_id'));
52
+ }
53
+
54
+ /*
55
+ * Retrieve the Client Secret
56
+ */
57
+ public function getClientSecret()
58
+ {
59
+ return trim(Mage::getStoreConfig('newsletter/campaignmonitor/client_secret'));
60
+ }
61
+
62
  // get array of linked attributes from the config settings and
63
  // populate it
64
  public static function generateCustomFields($customer)
151
 
152
  return $customFields;
153
  }
154
+
155
+ /**
156
+ * Get module config section url in admin configuration
157
+ * @return string
158
+ */
159
+ public function getAdminConfigSectionUrl()
160
+ {
161
+ $url = Mage::getModel('adminhtml/url');
162
+ return $url->getUrl('adminhtml/system_config/edit', array(
163
+ '_current' => true,
164
+ 'section' => 'newsletter'
165
+ ));
166
+ }
167
+
168
+ /*
169
+ * Refresh the token
170
+ */
171
+ public function refreshToken()
172
+ {
173
+ // Check if auth type is OAuth
174
+ if ($this->isOAuth())
175
+ {
176
+ // Get the credentials
177
+ $accessToken = Mage::getModel('campaignmonitor/auth')->getAccessToken();
178
+ $refreshToken = Mage::getModel('campaignmonitor/auth')->getRefreshToken();
179
+
180
+ $auth = array(
181
+ 'access_token' => $accessToken,
182
+ 'refresh_token' => $refreshToken
183
+ );
184
+
185
+ // Use the REST lib to refresh the token
186
+ $wrap = new CS_REST_General($auth);
187
+ list($new_access_token, $new_expires_in, $new_refresh_token) = $wrap->refresh_token();
188
+
189
+ // Use stdClass as it's the same type as OG response
190
+ $response = new stdClass;
191
+ $response->access_token = $new_access_token;
192
+ $response->expires_in = $new_expires_in;
193
+ $response->refresh_token = $new_refresh_token;
194
+
195
+ $session = Mage::getModel('core/session');
196
+ $session->setData(self::CAMPAIGNMONITOR_SESSION_DATA_KEY, $response);
197
+
198
+ // Save $new_access_token, $new_expires_in, and $new_refresh_token
199
+ Mage::getConfig()->saveConfig(self::CAMPAIGNMONITOR_CONFIG_DATA_KEY, serialize($response), 'default', 0);
200
+ }
201
+ }
202
 
203
  }
app/code/community/DigitalPianism/CampaignMonitor/Model/Auth.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DigitalPianism_CampaignMonitor_Model_Auth
3
+ {
4
+ const CAMPAIGNMONITOR_SESSION_DATA_KEY = 'campaignmonitor_session_data';
5
+ const CAMPAIGNMONITOR_CONFIG_DATA_KEY = 'newsletter/campaignmonitor/campaignmonitor_data';
6
+
7
+ public function getUserData()
8
+ {
9
+ /** @var $session Mage_Core_Model_Session */
10
+ $session = Mage::getModel('core/session');
11
+ $info = $session->getData(self::CAMPAIGNMONITOR_SESSION_DATA_KEY);
12
+
13
+ if (!$info) {
14
+ $configDataKey = self::CAMPAIGNMONITOR_CONFIG_DATA_KEY;
15
+
16
+ $info = unserialize(Mage::getStoreConfig($configDataKey, 0));
17
+ }
18
+
19
+ return $info;
20
+ }
21
+
22
+ public function isValid()
23
+ {
24
+ $configDataKey = self::CAMPAIGNMONITOR_CONFIG_DATA_KEY;
25
+ return (!!$this->getUserData() || Mage::getStoreConfig($configDataKey, 0));
26
+ }
27
+
28
+ public function getAccessToken()
29
+ {
30
+ return $this->getUserData()->access_token;
31
+ }
32
+
33
+ public function getRefreshToken()
34
+ {
35
+ return $this->getUserData()->refresh_token;
36
+ }
37
+
38
+ }
app/code/community/DigitalPianism/CampaignMonitor/Model/Customer/Observer.php CHANGED
@@ -8,9 +8,23 @@ class DigitalPianism_CampaignMonitor_Model_Customer_Observer
8
 
9
  $event = $observer->getEvent();
10
  $customer = $event->getCustomer();
11
-
12
- $apiKey = Mage::helper('campaignmonitor')->getApiKey();
13
- $listID = Mage::helper('campaignmonitor')->getListId();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  $name = $customer->getFirstname() . " " . $customer->getLastname();
16
  $newEmail = $customer->getEmail();
@@ -27,14 +41,13 @@ class DigitalPianism_CampaignMonitor_Model_Customer_Observer
27
  }
28
 
29
  //print "Name: $name, New email: $newEmail, Subscribed: $subscribed, Old email: $oldEmail<br />\n";
30
-
31
- if($apiKey && $listID)
32
  {
33
  $customFields = Mage::helper('campaignmonitor')->generateCustomFields($customer);
34
 
35
  try
36
  {
37
- $client = new CS_REST_Subscribers($listID,$apiKey);
38
  }
39
  catch(Exception $e)
40
  {
@@ -56,6 +69,16 @@ class DigitalPianism_CampaignMonitor_Model_Customer_Observer
56
  try
57
  {
58
  $result = $client->unsubscribe($oldEmail);
 
 
 
 
 
 
 
 
 
 
59
  }
60
  catch(Exception $e)
61
  {
@@ -75,6 +98,20 @@ class DigitalPianism_CampaignMonitor_Model_Customer_Observer
75
  "Name" => $name,
76
  "CustomFields" => $customFields,
77
  "Resubscribe" => true));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
  catch(Exception $e)
80
  {
@@ -89,6 +126,16 @@ class DigitalPianism_CampaignMonitor_Model_Customer_Observer
89
  try
90
  {
91
  $result = $client->unsubscribe($oldEmail);
 
 
 
 
 
 
 
 
 
 
92
  }
93
  catch(Exception $e)
94
  {
@@ -104,18 +151,41 @@ class DigitalPianism_CampaignMonitor_Model_Customer_Observer
104
  $event = $observer->getEvent();
105
  $customer = $event->getCustomer();
106
 
107
- $apiKey = Mage::helper('campaignmonitor')->getApiKey();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  $listID = Mage::helper('campaignmonitor')->getListId();
109
 
110
  $email = $customer->getEmail();
111
 
112
- if($apiKey && $listID)
113
  {
114
  Mage::helper('campaignmonitor')->log("Customer deleted, unsubscribing: $email");
115
  try
116
  {
117
- $client = new CS_REST_Subscribers($listID,$apiKey);
118
  $result = $client->unsubscribe($email);
 
 
 
 
 
 
 
 
 
119
  }
120
  catch(Exception $e)
121
  {
8
 
9
  $event = $observer->getEvent();
10
  $customer = $event->getCustomer();
11
+
12
+ if (Mage::helper('campaignmonitor')->isOAuth())
13
+ {
14
+ $accessToken = Mage::getModel('campaignmonitor/auth')->getAccessToken();
15
+ $refreshToken = Mage::getModel('campaignmonitor/auth')->getRefreshToken();
16
+
17
+ $auth = array(
18
+ 'access_token' => $accessToken,
19
+ 'refresh_token' => $refreshToken
20
+ );
21
+ }
22
+ else
23
+ {
24
+ $auth = Mage::helper('campaignmonitor')->getApiKey();
25
+ }
26
+
27
+ $listID = Mage::helper('campaignmonitor')->getListId();
28
 
29
  $name = $customer->getFirstname() . " " . $customer->getLastname();
30
  $newEmail = $customer->getEmail();
41
  }
42
 
43
  //print "Name: $name, New email: $newEmail, Subscribed: $subscribed, Old email: $oldEmail<br />\n";
44
+ if($auth && $listID)
 
45
  {
46
  $customFields = Mage::helper('campaignmonitor')->generateCustomFields($customer);
47
 
48
  try
49
  {
50
+ $client = new CS_REST_Subscribers($listID,$auth);
51
  }
52
  catch(Exception $e)
53
  {
69
  try
70
  {
71
  $result = $client->unsubscribe($oldEmail);
72
+
73
+ if (!$result->was_successful()) {
74
+ // If you receive '121: Expired OAuth Token', refresh the access token
75
+ if ($result->response->Code == 121) {
76
+ // Refresh the token
77
+ Mage::helper('campaignmonitor')->refreshToken();
78
+ }
79
+ // Make the call again
80
+ $result = $client->unsubscribe($oldEmail);
81
+ }
82
  }
83
  catch(Exception $e)
84
  {
98
  "Name" => $name,
99
  "CustomFields" => $customFields,
100
  "Resubscribe" => true));
101
+
102
+ if (!$result->was_successful()) {
103
+ // If you receive '121: Expired OAuth Token', refresh the access token
104
+ if ($result->response->Code == 121) {
105
+ // Refresh the token
106
+ Mage::helper('campaignmonitor')->refreshToken();
107
+ }
108
+ // Make the call again
109
+ $result = $client->add(array(
110
+ "EmailAddress" => $newEmail,
111
+ "Name" => $name,
112
+ "CustomFields" => $customFields,
113
+ "Resubscribe" => true));
114
+ }
115
  }
116
  catch(Exception $e)
117
  {
126
  try
127
  {
128
  $result = $client->unsubscribe($oldEmail);
129
+
130
+ if (!$result->was_successful()) {
131
+ // If you receive '121: Expired OAuth Token', refresh the access token
132
+ if ($result->response->Code == 121) {
133
+ // Refresh the token
134
+ Mage::helper('campaignmonitor')->refreshToken();
135
+ }
136
+ // Make the call again
137
+ $result = $client->unsubscribe($oldEmail);
138
+ }
139
  }
140
  catch(Exception $e)
141
  {
151
  $event = $observer->getEvent();
152
  $customer = $event->getCustomer();
153
 
154
+ if (Mage::helper('campaignmonitor')->isOAuth())
155
+ {
156
+ $accessToken = Mage::getModel('campaignmonitor/auth')->getAccessToken();
157
+ $refreshToken = Mage::getModel('campaignmonitor/auth')->getRefreshToken();
158
+
159
+ $auth = array(
160
+ 'access_token' => $accessToken,
161
+ 'refresh_token' => $refreshToken
162
+ );
163
+ }
164
+ else
165
+ {
166
+ $auth = Mage::helper('campaignmonitor')->getApiKey();
167
+ }
168
+
169
  $listID = Mage::helper('campaignmonitor')->getListId();
170
 
171
  $email = $customer->getEmail();
172
 
173
+ if($auth && $listID)
174
  {
175
  Mage::helper('campaignmonitor')->log("Customer deleted, unsubscribing: $email");
176
  try
177
  {
178
+ $client = new CS_REST_Subscribers($listID,$auth);
179
  $result = $client->unsubscribe($email);
180
+ if (!$result->was_successful()) {
181
+ // If you receive '121: Expired OAuth Token', refresh the access token
182
+ if ($result->response->Code == 121) {
183
+ // Refresh the token
184
+ Mage::helper('campaignmonitor')->refreshToken();
185
+ }
186
+ // Make the call again
187
+ $result = $client->unsubscribe($email);
188
+ }
189
  }
190
  catch(Exception $e)
191
  {
app/code/community/DigitalPianism/CampaignMonitor/Model/System/Config/Source/Authtype.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DigitalPianism_CampaignMonitor_Model_System_Config_Source_Authtype
3
+ {
4
+ public function toOptionArray()
5
+ {
6
+ return array(
7
+ array('value' => 'api', 'label'=>Mage::helper('campaignmonitor')->__('API Key')),
8
+ array('value' => 'oauth', 'label'=>Mage::helper('campaignmonitor')->__('OAuth 2')),
9
+ );
10
+ }
11
+ }
app/code/community/DigitalPianism/CampaignMonitor/controllers/AdminhookController.php CHANGED
@@ -15,12 +15,27 @@ class DigitalPianism_CampaignMonitor_ManageController extends Mage_Newsletter_Su
15
  }
16
  else {
17
  try {
18
- $apiKey = Mage::helper('campaignmonitor')->getApiKey();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  $listID = Mage::helper('campaignmonitor')->getListId();
20
 
21
  try
22
  {
23
- $client = new CS_REST_Subscribers($listID,$apiKey);
24
  }
25
  catch(Exception $e)
26
  {
@@ -38,6 +53,15 @@ class DigitalPianism_CampaignMonitor_ManageController extends Mage_Newsletter_Su
38
  try
39
  {
40
  $result = $client->unsubscribe($email);
 
 
 
 
 
 
 
 
 
41
  }
42
  catch (Exception $e)
43
  {
15
  }
16
  else {
17
  try {
18
+
19
+ if (Mage::helper('campaignmonitor')->isOAuth())
20
+ {
21
+ $accessToken = Mage::getModel('campaignmonitor/auth')->getAccessToken();
22
+ $refreshToken = Mage::getModel('campaignmonitor/auth')->getRefreshToken();
23
+
24
+ $auth = array(
25
+ 'access_token' => $accessToken,
26
+ 'refresh_token' => $refreshToken
27
+ );
28
+ }
29
+ else
30
+ {
31
+ $auth = Mage::helper('campaignmonitor')->getApiKey();
32
+ }
33
+
34
  $listID = Mage::helper('campaignmonitor')->getListId();
35
 
36
  try
37
  {
38
+ $client = new CS_REST_Subscribers($listID,$auth);
39
  }
40
  catch(Exception $e)
41
  {
53
  try
54
  {
55
  $result = $client->unsubscribe($email);
56
+ if (!$result->was_successful()) {
57
+ // If you receive '121: Expired OAuth Token', refresh the access token
58
+ if ($result->response->Code == 121) {
59
+ // Refresh the token
60
+ Mage::helper('campaignmonitor')->refreshToken();
61
+ }
62
+ // Make the call again
63
+ $result = $client->unsubscribe($email);
64
+ }
65
  }
66
  catch (Exception $e)
67
  {
app/code/community/DigitalPianism/CampaignMonitor/controllers/Adminhtml/AuthController.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once MAGENTO_ROOT . "/lib/createsend/csrest_general.php";
3
+
4
+ class DigitalPianism_CampaignMonitor_Adminhtml_AuthController extends Mage_Adminhtml_Controller_Action
5
+ {
6
+
7
+ const CAMPAIGNMONITOR_AUTH_URL = 'https://api.createsend.com/oauth';
8
+ const CAMPAIGNMONITOR_ACCESSS_TOKEN_URL = 'https://api.createsend.com/oauth/token';
9
+
10
+ const CAMPAIGNMONITOR_SESSION_DATA_KEY = 'campaignmonitor_session_data';
11
+ const CAMPAIGNMONITOR_CONFIG_DATA_KEY = 'newsletter/campaignmonitor/campaignmonitor_data';
12
+
13
+ public function preDispatch()
14
+ {
15
+ Mage::getSingleton('adminhtml/url')->turnOffSecretKey();
16
+ parent::preDispatch();
17
+ }
18
+
19
+ public function indexAction()
20
+ {
21
+ $this->_redirectUrl($this->_getAuthUrl());
22
+ }
23
+
24
+ public function refreshtokenAction()
25
+ {
26
+ Mage::helper('campaignmonitor')->refreshToken();
27
+
28
+ $redirectUrl = Mage::helper('campaignmonitor')->getAdminConfigSectionUrl();
29
+ $this->_redirectUrl($redirectUrl);
30
+ }
31
+
32
+ public function callbackAction()
33
+ {
34
+ $code = $this->getRequest()->getParam('code');
35
+ $state = $this->getRequest()->getParam('state');
36
+ $response = $this->_getAccessToken($code);
37
+ if ($response)
38
+ {
39
+ /** @var $session Mage_Core_Model_Session */
40
+ $session = Mage::getModel('core/session');
41
+ $session->setData(self::CAMPAIGNMONITOR_SESSION_DATA_KEY, $response);
42
+
43
+ Mage::getConfig()->saveConfig(self::CAMPAIGNMONITOR_CONFIG_DATA_KEY, serialize($response), 'default', 0);
44
+ }
45
+ else
46
+ {
47
+ // Error
48
+ }
49
+
50
+ $redirectUrl = Mage::helper('campaignmonitor')->getAdminConfigSectionUrl();
51
+ $this->_redirectUrl($redirectUrl);
52
+ }
53
+
54
+ protected function _getAccessToken($code)
55
+ {
56
+ $result = CS_REST_General::exchange_token(
57
+ $this->_getClientId(),
58
+ $this->_getClientSecret(),
59
+ $this->_getAuthRedirectUri(),
60
+ $code
61
+ );
62
+
63
+ if ($result->was_successful()) {
64
+ $access_token = $result->response->access_token;
65
+ $expires_in = $result->response->expires_in;
66
+ $refresh_token = $result->response->refresh_token;
67
+
68
+ return $result->response;
69
+ } else {
70
+ echo 'An error occurred:\n';
71
+ echo $result->response->error.': '.$result->response->error_description."\n";
72
+ return false;
73
+ }
74
+
75
+ }
76
+
77
+ /**
78
+ * Get url for authentification on Instagram
79
+ * @return string
80
+ */
81
+ protected function _getAuthUrl()
82
+ {
83
+ $url = CS_REST_General::authorize_url(
84
+ $this->_getClientId(),
85
+ $this->_getAuthRedirectUri(),
86
+ 'ImportSubscribers,ManageLists'
87
+ );
88
+
89
+ return $url;
90
+ }
91
+
92
+ protected function _getAuthRedirectUri()
93
+ {
94
+ return str_replace('http','https',Mage::app()->getStore(1)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK)."campaignmonitor/auth/index");
95
+ }
96
+
97
+ protected function _getClientId()
98
+ {
99
+ return Mage::helper('campaignmonitor')->getClientId();
100
+ }
101
+
102
+
103
+ protected function _getClientSecret()
104
+ {
105
+ return Mage::helper('campaignmonitor')->getClientSecret();
106
+ }
107
+
108
+ }
app/code/community/DigitalPianism/CampaignMonitor/controllers/AuthController.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DigitalPianism_CampaignMonitor_AuthController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ // Frontend redirect URI for the CM OAuth authentication
5
+ public function indexAction()
6
+ {
7
+ //@TODO check isAdmin login
8
+ $code = $this->getRequest()->getQuery('code');
9
+ $state = $this->getRequest()->getQuery('state');
10
+
11
+ $adminUrl = Mage::helper("adminhtml")->getUrl("campaignmonitor/adminhtml_auth/callback", array( 'code' => $code, 'state' => $state ));
12
+
13
+ $this->_redirectUrl($adminUrl);
14
+ return;
15
+
16
+ }
17
+
18
+ }
app/code/community/DigitalPianism/CampaignMonitor/controllers/HookController.php CHANGED
@@ -11,16 +11,30 @@ class DigitalPianism_CampaignMonitor_HookController extends Mage_Newsletter_Subs
11
  $session = Mage::getSingleton('core/session');
12
  $email = (string)$this->getRequest()->getPost('email');
13
 
14
- Mage::log("Fontis_CampaignMonitor: Adding newsletter subscription via frontend 'Sign up' block for $email");
15
 
16
- $apiKey = Mage::helper('campaignmonitor')->getApiKey();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  $listID = Mage::helper('campaignmonitor')->getListId();
18
 
19
- if($apiKey && $listID)
20
  {
21
  try
22
  {
23
- $client = new CS_REST_Subscribers($listID,$apiKey);
24
  }
25
  catch(Exception $e)
26
  {
@@ -47,6 +61,20 @@ class DigitalPianism_CampaignMonitor_HookController extends Mage_Newsletter_Subs
47
  "CustomFields" => $customFields,
48
  "Resubscribe" => true // if the subscriber is already unsubscried - subscribe again!
49
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
  catch(Exception $e)
52
  {
@@ -66,6 +94,20 @@ class DigitalPianism_CampaignMonitor_HookController extends Mage_Newsletter_Subs
66
  "Name" => "(Guest)",
67
  "Resubscribe" => true // if the subscriber is already unsubscried - subscribe again!
68
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
  catch (Exception $e)
71
  {
11
  $session = Mage::getSingleton('core/session');
12
  $email = (string)$this->getRequest()->getPost('email');
13
 
14
+ Mage::log("DigitalPianism_CampaignMonitor: Adding newsletter subscription via frontend 'Sign up' block for $email");
15
 
16
+ if (Mage::helper('campaignmonitor')->isOAuth())
17
+ {
18
+ $accessToken = Mage::getModel('campaignmonitor/auth')->getAccessToken();
19
+ $refreshToken = Mage::getModel('campaignmonitor/auth')->getRefreshToken();
20
+
21
+ $auth = array(
22
+ 'access_token' => $accessToken,
23
+ 'refresh_token' => $refreshToken
24
+ );
25
+ }
26
+ else
27
+ {
28
+ $auth = Mage::helper('campaignmonitor')->getApiKey();
29
+ }
30
+
31
  $listID = Mage::helper('campaignmonitor')->getListId();
32
 
33
+ if($auth && $listID)
34
  {
35
  try
36
  {
37
+ $client = new CS_REST_Subscribers($listID,$auth);
38
  }
39
  catch(Exception $e)
40
  {
61
  "CustomFields" => $customFields,
62
  "Resubscribe" => true // if the subscriber is already unsubscried - subscribe again!
63
  ));
64
+ if (!$result->was_successful()) {
65
+ // If you receive '121: Expired OAuth Token', refresh the access token
66
+ if ($result->response->Code == 121) {
67
+ // Refresh the token
68
+ Mage::helper('campaignmonitor')->refreshToken();
69
+ }
70
+ // Make the call again
71
+ $result = $client->add(array(
72
+ "EmailAddress" => $email,
73
+ "Name" => $name,
74
+ "CustomFields" => $customFields,
75
+ "Resubscribe" => true // if the subscriber is already unsubscried - subscribe again!
76
+ ));
77
+ }
78
  }
79
  catch(Exception $e)
80
  {
94
  "Name" => "(Guest)",
95
  "Resubscribe" => true // if the subscriber is already unsubscried - subscribe again!
96
  ));
97
+
98
+ if (!$result->was_successful()) {
99
+ // If you receive '121: Expired OAuth Token', refresh the access token
100
+ if ($result->response->Code == 121) {
101
+ // Refresh the token
102
+ Mage::helper('campaignmonitor')->refreshToken();
103
+ }
104
+ // Make the call again
105
+ $result = $client->add(array(
106
+ "EmailAddress" => $email,
107
+ "Name" => "(Guest)",
108
+ "Resubscribe" => true // if the subscriber is already unsubscried - subscribe again!
109
+ ));
110
+ }
111
  }
112
  catch (Exception $e)
113
  {
app/code/community/DigitalPianism/CampaignMonitor/controllers/UnsubscribeController.php CHANGED
@@ -11,17 +11,40 @@ class DigitalPianism_CampaignMonitor_UnsubscribeController extends Mage_Core_Con
11
  $email = $_GET['email'];
12
 
13
  // Get the CampaignMonitor credentials
14
- $apiKey = Mage::helper('campaignmonitor')->getApiKey();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  $listID = Mage::helper('campaignmonitor')->getListId();
16
 
17
  // Check that the email address actually is unsubscribed in Campaign Monitor.
18
- if($apiKey && $listID)
19
  {
20
  // Retrieve the subscriber
21
  try
22
  {
23
- $client = new CS_REST_Subscribers($listID,$apiKey);
24
  $result = $client->get($email);
 
 
 
 
 
 
 
 
 
25
  }
26
  catch (Exception $e)
27
  {
11
  $email = $_GET['email'];
12
 
13
  // Get the CampaignMonitor credentials
14
+ if (Mage::helper('campaignmonitor')->isOAuth())
15
+ {
16
+ $accessToken = Mage::getModel('campaignmonitor/auth')->getAccessToken();
17
+ $refreshToken = Mage::getModel('campaignmonitor/auth')->getRefreshToken();
18
+
19
+ $auth = array(
20
+ 'access_token' => $accessToken,
21
+ 'refresh_token' => $refreshToken
22
+ );
23
+ }
24
+ else
25
+ {
26
+ $auth = Mage::helper('campaignmonitor')->getApiKey();
27
+ }
28
+
29
  $listID = Mage::helper('campaignmonitor')->getListId();
30
 
31
  // Check that the email address actually is unsubscribed in Campaign Monitor.
32
+ if($auth && $listID)
33
  {
34
  // Retrieve the subscriber
35
  try
36
  {
37
+ $client = new CS_REST_Subscribers($listID,$auth);
38
  $result = $client->get($email);
39
+ if (!$result->was_successful()) {
40
+ // If you receive '121: Expired OAuth Token', refresh the access token
41
+ if ($result->response->Code == 121) {
42
+ // Refresh the token
43
+ Mage::helper('campaignmonitor')->refreshToken();
44
+ }
45
+ // Make the call again
46
+ $result = $client->get($email));
47
+ }
48
  }
49
  catch (Exception $e)
50
  {
app/code/community/DigitalPianism/CampaignMonitor/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
 
4
  <modules>
5
  <DigitalPianism_CampaignMonitor>
6
- <version>0.7.0</version>
7
  </DigitalPianism_CampaignMonitor>
8
  </modules>
9
 
@@ -19,6 +19,18 @@
19
  </campaignmonitor>
20
  </routers>
21
  </frontend>
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  <global>
24
 
3
 
4
  <modules>
5
  <DigitalPianism_CampaignMonitor>
6
+ <version>0.7.1</version>
7
  </DigitalPianism_CampaignMonitor>
8
  </modules>
9
 
19
  </campaignmonitor>
20
  </routers>
21
  </frontend>
22
+
23
+ <admin>
24
+ <routers>
25
+ <campaignmonitor>
26
+ <use>admin</use>
27
+ <args>
28
+ <module>DigitalPianism_CampaignMonitor</module>
29
+ <frontName>campaignmonitor</frontName>
30
+ </args>
31
+ </campaignmonitor>
32
+ </routers>
33
+ </admin>
34
 
35
  <global>
36
 
app/code/community/DigitalPianism/CampaignMonitor/etc/system.xml CHANGED
@@ -11,10 +11,55 @@
11
  <show_in_website>1</show_in_website>
12
  <show_in_store>1</show_in_store>
13
  <fields>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  <api_key translate="label">
15
  <label>API Key</label>
16
  <frontend_type>text</frontend_type>
17
- <sort_order>1</sort_order>
18
  <show_in_default>1</show_in_default>
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
@@ -23,7 +68,7 @@
23
  <list_id translate="label">
24
  <label>API List ID</label>
25
  <frontend_type>text</frontend_type>
26
- <sort_order>2</sort_order>
27
  <show_in_default>1</show_in_default>
28
  <show_in_website>1</show_in_website>
29
  <show_in_store>1</show_in_store>
@@ -33,7 +78,7 @@
33
  <label>Mapping betweens form, models and CM</label>
34
  <frontend_model>digitalPianism_campaignMonitor_block_linkedattributes</frontend_model>
35
  <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
36
- <sort_order>5</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
39
  <show_in_store>1</show_in_store>
11
  <show_in_website>1</show_in_website>
12
  <show_in_store>1</show_in_store>
13
  <fields>
14
+ <authentication_type translate="label">
15
+ <label>Authentication Type</label>
16
+ <frontend_type>select</frontend_type>
17
+ <frontend_model>digitalPianism_campaignMonitor_block_adminhtml_system_config_source_authtype</frontend_model>
18
+ <source_model>campaignmonitor/system_config_source_authtype</source_model>
19
+ <sort_order>10</sort_order>
20
+ <show_in_default>1</show_in_default>
21
+ <show_in_website>1</show_in_website>
22
+ <show_in_store>1</show_in_store>
23
+ </authentication_type>
24
+ <client_id translate="label">
25
+ <label>Campaign Monitor Client ID</label>
26
+ <frontend_type>text</frontend_type>
27
+ <sort_order>11</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
+ </client_id>
32
+ <client_secret translate="label">
33
+ <label>Campaign Monitor Client Secret</label>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>12</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ </client_secret>
40
+ <auth translate="label comment">
41
+ <label>Auth user</label>
42
+ <frontend_type>text</frontend_type>
43
+ <frontend_model>digitalPianism_campaignMonitor_block_adminhtml_system_config_form_field_auth</frontend_model>
44
+ <sort_order>13</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ <comment>Auth user on Campaign Monitor</comment>
49
+ </auth>
50
+ <refresh_token translate="label comment">
51
+ <label>Refresh Token</label>
52
+ <frontend_type>text</frontend_type>
53
+ <frontend_model>digitalPianism_campaignMonitor_block_adminhtml_system_config_form_field_refreshtoken</frontend_model>
54
+ <sort_order>14</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ </refresh_token>
59
  <api_key translate="label">
60
  <label>API Key</label>
61
  <frontend_type>text</frontend_type>
62
+ <sort_order>20</sort_order>
63
  <show_in_default>1</show_in_default>
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
68
  <list_id translate="label">
69
  <label>API List ID</label>
70
  <frontend_type>text</frontend_type>
71
+ <sort_order>21</sort_order>
72
  <show_in_default>1</show_in_default>
73
  <show_in_website>1</show_in_website>
74
  <show_in_store>1</show_in_store>
78
  <label>Mapping betweens form, models and CM</label>
79
  <frontend_model>digitalPianism_campaignMonitor_block_linkedattributes</frontend_model>
80
  <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
81
+ <sort_order>30</sort_order>
82
  <show_in_default>1</show_in_default>
83
  <show_in_website>1</show_in_website>
84
  <show_in_store>1</show_in_store>
app/design/adminhtml/default/default/template/digitalpianism/campaignmonitor/system/config/form/field/auth.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /** @var $this DigitalPianism_CampaignMonitor_Block_Adminhtml_System_Config_Form_Field_Auth */ ?>
2
+
3
+ <?php $userData = $this->getUserData(); ?>
4
+ <?php if($userData): ?>
5
+
6
+ <h6>Access Token: <?php echo $userData->access_token; ?> </h6>
7
+ <h6>Expires In (days): <?php echo ($userData->expires_in/60/60/24); ?></h6>
8
+ <h6>Refresh Token: <?php echo $userData->refresh_token; ?></h6>
9
+
10
+ <?php endif; ?>
11
+ <?php $authUrl = Mage::helper("adminhtml")->getUrl("campaignmonitor/adminhtml_auth/index"); ?>
12
+ <button class="scalable save" type="button" title="Auth on Campaign Monitor" onclick="setLocation('<?php echo $authUrl; ?>')">
13
+ <span>
14
+ <span>
15
+ <span>Auth on Campaign Monitor</span>
16
+ </span>
17
+ </span>
18
+ </button>
app/design/adminhtml/default/default/template/digitalpianism/campaignmonitor/system/config/form/field/refreshtoken.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php /** @var $this DigitalPianism_CampaignMonitor_Block_Adminhtml_System_Config_Form_Field_Refreshtoken */ ?>
2
+
3
+ <?php $refreshTokenUrl = Mage::helper("adminhtml")->getUrl("campaignmonitor/adminhtml_auth/refreshtoken"); ?>
4
+ <button class="scalable save" type="button" title="Refresh Token" onclick="setLocation('<?php echo $refreshTokenUrl; ?>')">
5
+ <span>
6
+ <span>
7
+ <span>Refresh Token</span>
8
+ </span>
9
+ </span>
10
+ </button>
package.xml CHANGED
@@ -1,22 +1,22 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DigitalPianism_CampaignMonitor</name>
4
- <version>0.7.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Integrates Magento with the Campaign Monitor mailing list manager using API V3. </summary>
10
- <description>&lt;p&gt;This extension is entirely based on the &lt;a href="http://www.magentocommerce.com/magento-connect/fontis-campaign-monitor.html"&gt;Fontis Campaign Monitor&lt;/a&gt; extension, except it uses the Campaign Monitor API V3 instead of V2.&lt;/p&gt;&#xD;
11
  &#xD;
12
  &lt;p&gt;Campaign Monitor is built for designers who can create great looking emails for themselves and their clients, but need software to send each campaign, track the results and manage their subscribers." www.campaignmonitor.com&lt;/p&gt;&#xD;
13
  &#xD;
14
  &lt;p&gt;This extension integrates Magento with the Campaign Monitor mailing list manager. Users are added to a specified Campaign Monitor email list when they subscribe to the newsletter in Magento, and removed when they unsubscribe. Users are also marked as unsubscribed in Magento when they click an unsubscribe link in a Campaign Monitor email.&lt;/p&gt;</description>
15
- <notes>Stable version.</notes>
16
  <authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
17
- <date>2014-05-04</date>
18
- <time>16:35:05</time>
19
- <contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CampaignMonitor"><dir name="Block"><file name="Linkedattributes.php" hash="3c5d00f9352fa53fbd36243c0d87db6e"/></dir><dir name="Helper"><file name="Data.php" hash="064e59d8ce4d2077e0289a8a38e54ab2"/></dir><dir name="Model"><dir name="Customer"><file name="Observer.php" hash="ea4398b92ea511796dad1f9680c8d942"/></dir></dir><dir name="controllers"><file name="AdminhookController.php" hash="1fe56150d1fc30a61505a511ac009a30"/><file name="HookController.php" hash="b2ed9bc478929c2497a8ba16682b31fa"/><file name="UnsubscribeController.php" hash="3653ee5c2bf509f83bb284d3af243fd3"/></dir><dir name="etc"><file name="config.xml" hash="5256e5abdaae0d513834b2258cceaadd"/><file name="system.xml" hash="da9449ef7c9561cd57dfd4059a75513e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_CampaignMonitor.xml" hash="6044d29d2b2e7d0689315376e3c27acd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="campaignmonitor"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array_dropdown.phtml" hash="ac84db9b1e8b342337a478ecba62e0b1"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="createsend"><file name="HISTORY.md" hash="ab283bd0126e8c10edf6da099c80a661"/><file name="LICENSE" hash="e4306d4b6c77f2db816ec4aed73a13c7"/><file name="README.md" hash="90a7855700d85e14211baf5399810a3d"/><file name="RELEASE.md" hash="5efce8234607beab27bf466b23fc4535"/><dir name="class"><file name="base_classes.php" hash="8a3f82c1204d7de080d2f3d15cb70ea9"/><file name="cacert.pem" hash="c29d362201b1bd232898d2b658811db2"/><file name="log.php" hash="11ff6a9006a6386c1cd8880cd3c0f41b"/><file name="serialisation.php" hash="3eb39437970e8787f0ef9ac292b688e6"/><file name="services_json.php" hash="c9e9ef0d35d7d34f9d216344da27915d"/><file name="transport.php" hash="da2967846daf164a70e649c9f2ee0094"/></dir><file name="composer.json" hash="eccad7521596b5fe0d81af51ab2f16a1"/><file name="composer.lock" hash="e64bca0a5accd8086e4e49bf41aa8629"/><file name="csrest_administrators.php" hash="72480342a46e8d82fd44096b4818f090"/><file name="csrest_campaigns.php" hash="38e2c429abaaa4609d30f28622e5fc3f"/><file name="csrest_clients.php" hash="df11ce1c1fd5fd43980db42cb83a6fa3"/><file name="csrest_general.php" hash="b8d1de7d1e435231955cdf8bc0311632"/><file name="csrest_lists.php" hash="42904680a424977d7c6f3211cf0d7a9c"/><file name="csrest_people.php" hash="ff2a14af7e171a11d73bef3d4995f512"/><file name="csrest_segments.php" hash="bac0e031058e7e08ae97906738cc65fc"/><file name="csrest_subscribers.php" hash="b5ad794e2cc2f65a278a8aa9de4af7d7"/><file name="csrest_templates.php" hash="4c94511a505a868eef2f8109ca3c35d6"/><dir name="samples"><dir name="campaign"><file name="create.php" hash="af4016e1b3539b3710d4b8e05bc7001b"/><file name="create_from_template.php" hash="4868b7f363abebc3d9fe9f561e59a743"/><file name="delete.php" hash="b96c2421084e77c241ea270894719aff"/><file name="get_bounces.php" hash="3bd2b2faa8d4b99bf7b9d682ce7402d3"/><file name="get_clicks.php" hash="92209680bdd73ecf3f94ecd1c33374ce"/><file name="get_email_client_usage.php" hash="fcf3a316f03460f26b6f12bcb20c17b0"/><file name="get_lists_and_segments.php" hash="e7d07e56924abfbd2d390b468d2df14b"/><file name="get_opens.php" hash="e155bf6a72a26fd34997d9024bd9911c"/><file name="get_recipients.php" hash="488f76fba7f7e2dc0680abefe5fe1fb5"/><file name="get_spam.php" hash="35c0beea84a51e3e447546f6b11ba754"/><file name="get_summary.php" hash="85ee04ac9adc616aa41d5a02824e6f7c"/><file name="get_unsubscribes.php" hash="af39956e9f46d9ecd1e78fff830f87b0"/><file name="send.php" hash="9e33ed7bd15e246929f52847f93827ce"/><file name="send_preview.php" hash="4eb7bff25251b00915791b96b20ee2ab"/><file name="unschedule.php" hash="83f0374d69eee6ae284c7fe27fdb65d7"/></dir><dir name="client"><file name="create.php" hash="8fbadcd57df2246a8447d3a3b9843d64"/><file name="delete.php" hash="a7a9945427a64737981c4a3a5c047d97"/><file name="get.php" hash="0b53f225d317d3d97bb0f3bafe83cf53"/><file name="get_campaigns.php" hash="242ed8ed7338a502751ead210283cb04"/><file name="get_drafts.php" hash="2efeea55251ec1e7e7c7767820dd28f1"/><file name="get_lists.php" hash="97ffa5cd9ccc765ae79baff0f50ece64"/><file name="get_lists_for_email.php" hash="a402b11a7b93dc6992dc69998a0ebf80"/><file name="get_scheduled.php" hash="163d89985d5fdc29d9f3a5d50787fd81"/><file name="get_segments.php" hash="9acd7c148db84fd03d825a6eaebd0b88"/><file name="get_suppressionlist.php" hash="2ae6c31510338b307f93d49369c964d1"/><file name="get_templates.php" hash="756789c223be6664b3517b79063f5143"/><file name="set_basics.php" hash="839bc9f656d26caf7335b2a4f4336ae8"/><file name="set_monthly_billing.php" hash="7f4ff840e6fe78932f9bc72e68c282da"/><file name="set_payg_billing.php" hash="2f67604445e8807a70a9e28759f3bb55"/><file name="suppress.php" hash="f78f0ddb442c9dfc53865c00ee57d266"/><file name="transfer_credits.php" hash="3fe8a12cef59a2d126d8ed7437563ec8"/><file name="unsuppress.php" hash="3442665090da89c2f5d91f6b69c18ade"/></dir><file name="get_apikey.php" hash="36f399338a612b2771ed3c53058d1d6f"/><file name="get_billing_details.php" hash="bfe297ec441b25eaa6155e283b4c0bf7"/><file name="get_clients.php" hash="521e3174750e8c41236c1c4fae5ae8f4"/><file name="get_countries.php" hash="6a71a585ef76eedec4589ecc303415f5"/><file name="get_systemdate.php" hash="7b5eeae853d164667140fb3c99a5b8ff"/><file name="get_timezones.php" hash="f756ab9b392af894320defe0f7f7296d"/><dir name="list"><file name="activate_webhook.php" hash="ca496e62c78429fa745f624738b80ce7"/><file name="create.php" hash="16a635a4de9ec820b08a7f30319534bd"/><file name="create_custom_field.php" hash="59ad0fe4d6b2038ceeda7681e4515dd0"/><file name="create_webhook.php" hash="d968c28b19521f6d3c5e6852c5c13806"/><file name="deactivate_webhook.php" hash="68478920fca13c0c1f98a450be8cb3c2"/><file name="delete.php" hash="12f035403835a63c7a0c1ba4704b3e46"/><file name="delete_custom_field.php" hash="f5031a6eac6ba776b54ac22a79c023b5"/><file name="delete_webhook.php" hash="080320b7e078ce0e33586e4c6a944172"/><file name="get.php" hash="25dcb3de68cd41792ec88d7d937217e8"/><file name="get_active_subscribers.php" hash="afcee93bc1b922a99c9e19f48894417b"/><file name="get_bounced_subscribers.php" hash="2fa45e557cca0d93924a6415fbc302d5"/><file name="get_custom_fields.php" hash="ddcaf8ee644474bb77d597894f8e501e"/><file name="get_deleted_subscribers.php" hash="400adee5529e1e0f16ff7b64b09e8bca"/><file name="get_segments.php" hash="1ddba11f0968d2d7e7109e14140e7663"/><file name="get_stats.php" hash="74ab2cf477a5049505f1959c3e9e272c"/><file name="get_unconfirmed_subscribers.php" hash="e6062d83308ccc7648d8c17200d5f277"/><file name="get_unsubscribed_subscribers.php" hash="366d5bbd88a4028b664be59420a1a0aa"/><file name="get_webhooks.php" hash="bbcb6401f2a1d3268f25405b3cbe4598"/><file name="list_webhook_receiver.php" hash="12ca45146c050f341423f80acbe688aa"/><file name="test_webhook.php" hash="22bf2bdf4c277bc86300d43018e4926e"/><file name="update.php" hash="acb1f015b02b9d66da6d286843def237"/><file name="update_custom_field.php" hash="8b5f33bc803fa29fb0a44847a0d399ec"/><file name="update_field_options.php" hash="809ed63991f1e799ee2c2b70f3c692f4"/></dir><dir name="segment"><file name="add_rule.php" hash="3ed9335f70c354cf068a176eb6dd8f6f"/><file name="clear_rules.php" hash="da68802f93c3c25a60fcf1a2b7603273"/><file name="create.php" hash="4f12c0099e9edc42ab55acfd80239ecd"/><file name="delete.php" hash="9079d2812da34ce862f9543513eb7efc"/><file name="get.php" hash="f4e65cd88d02dc5fa0c2d9d7d1a444e6"/><file name="get_subscribers.php" hash="a580a7c33025bd516cae2e8b87cc10dd"/><file name="update.php" hash="cb37cd60257eb361f80f69dfa830ab94"/></dir><dir name="subscriber"><file name="add.php" hash="f266ce4459f71665e29d25bb5181ba76"/><file name="delete.php" hash="08325db91e593b855749bc5d9381f5e3"/><file name="get.php" hash="e4d4cda7ed515df7ab7e81c72906601d"/><file name="get_history.php" hash="445b5dfc75fec5433986655437f5f608"/><file name="import.php" hash="119de43ee1e4b31ce2b710ad4507a25f"/><file name="unsubscribe.php" hash="7896a14a7bbb69a8b4d1db9ead52053f"/><file name="update.php" hash="4a62f2b72d31cb168258738483366707"/></dir><dir name="template"><file name="create.php" hash="0ed844ae8d5fc1025902a7fcfb8a949b"/><file name="delete.php" hash="ddd8cbab53644e863d5f0d4807e03719"/><file name="get.php" hash="3d5147086b92c85e7b0289ba065f9434"/><file name="update.php" hash="0854c3686f1339434cb6fb12897f801f"/></dir></dir><dir name="tests"><file name="all_tests.php" hash="3fafbd947aa885d9056ed62e832ca61b"/><dir name="class_tests"><file name="response_tests.php" hash="ae5b4f541ac5bcba7a9417544d2156a9"/><file name="transport_test.php" hash="3033343417f283136c43d0bab77ac355"/></dir><file name="csrest_administrators_test.php" hash="77830067da14a226bfdc86b445f68f30"/><file name="csrest_campaigns_test.php" hash="ce68576c81c314dbdeba2b229903d865"/><file name="csrest_clients_test.php" hash="d3023b37bc3ebf222171606a100532d5"/><file name="csrest_lists_test.php" hash="533753c96477cad7598382c94e9a8937"/><file name="csrest_people_test.php" hash="72269f3d21caaf5648684da44b0ad319"/><file name="csrest_segments_test.php" hash="33f275bcab02eacb32299d6fc63e1b7c"/><file name="csrest_subscribers_test.php" hash="8b6ec2dade2d5b59d8f27f7e32df049f"/><file name="csrest_template_test.php" hash="3645fc50d5e43da11fa1a2b496b692c4"/><file name="csrest_test.php" hash="de298e06f8b584018f8e6b1d14000f32"/><dir name="responses"><file name="active_subscribers.json" hash="414033ce6952d88c0edd3c7b04d4f14e"/><file name="add_subscriber.json" hash="236507977b97832343c87955243068ad"/><file name="apikey.json" hash="4ca4132cc99f80bfc3d4a029a77a7a6e"/><file name="bounced_subscribers.json" hash="78c52687485c30c0fb031eb82e472fb3"/><file name="campaign_bounces.json" hash="55471525555dacee6ca1eb9ed5826cea"/><file name="campaign_clicks.json" hash="57d3357f4a0d8b55042a80e6d984e1ea"/><file name="campaign_listsandsegments.json" hash="a0d21dda2042a25b1266036b5d945f0c"/><file name="campaign_opens.json" hash="50c3052eebc922dfd0293498b5374ef0"/><file name="campaign_recipients.json" hash="be59c57f1f497669260f5124c13d109e"/><file name="campaign_spam.json" hash="48fa85397d6d8da1a685a94c404d14a9"/><file name="campaign_summary.json" hash="248d074230990e424dedb26afac895eb"/><file name="campaign_unsubscribes.json" hash="87d6b967ec28f8b3cd7845acc3ba0a16"/><file name="campaigns.json" hash="3b160d6e1a5de3e6163f2fffa502e4cb"/><file name="client_details.json" hash="964787a45923035cdd7330d4af13dfd9"/><file name="clients.json" hash="b243ae5d2f1b0686a6f45bbc262b1ad5"/><file name="countries.json" hash="7baa975380541216a7829128d4d7fb5b"/><file name="create_campaign.json" hash="61079127bd26d95434347f30803a85b2"/><file name="create_client.json" hash="0b5ea68aeecf1f61c8a00fb5d2b89104"/><file name="create_custom_field.json" hash="49b9878fd944fa8ea2f283a3d0b6576b"/><file name="create_list.json" hash="33b7d284c287fa44edb649234bc2ac6b"/><file name="create_list_webhook.json" hash="8a1c9ea0268a3a58d8f8fdaa4f159519"/><file name="create_segment.json" hash="6183146c3898ae281ea640e40fb5b3b0"/><file name="create_template.json" hash="9b1fcc1ae0925bd552cb23e364d48cca"/><file name="custom_api_error.json" hash="6be6c0df48a411fc54a5abf1d8502690"/><file name="custom_fields.json" hash="fe40aa43df15068516cdc6b7d9e2148c"/><file name="deleted_subscribers.json" hash="176235e9b24405ed329cc40a9ac5d1cd"/><file name="drafts.json" hash="8b36d3bf66ebb683b6926fcef95ae106"/><file name="import_subscribers.json" hash="3c7c7d85d510224197dc597d3a6cf585"/><file name="import_subscribers_partial_success.json" hash="4e1ff5c7b33a77d709530a31f544a22d"/><file name="list_details.json" hash="09d06afb7cd013e74fe615ddfd5a6799"/><file name="list_stats.json" hash="b8cd04e30e5e30862f005208997655de"/><file name="list_webhooks.json" hash="93194d66734e07372cac1b5c9c04f2b5"/><file name="lists.json" hash="0b7f8013e3e93a105a7a7d8c156daf4d"/><file name="listsforemail.json" hash="c7eb2e23b02883e0a0f9a9b2ca9bc94a"/><file name="scheduled.json" hash="d7c9df96fbfa5bafb1e1cfc0643123b7"/><file name="segment_details.json" hash="9ec00f104a565fc723270e3ceb91d509"/><file name="segment_subscribers.json" hash="cf5cec4bc4e7970315ea929a0bd29ecd"/><file name="segments.json" hash="d2d9265fd87ed661cd65c9c96b31a2f0"/><file name="subscriber_details.json" hash="1c5733a762560ed1dc27449edea3c27f"/><file name="subscriber_history.json" hash="93d3efaa0f0373156146e9f3060ca855"/><file name="suppressionlist.json" hash="13fff3aeddf64804cf8d9232b79ab45b"/><file name="systemdate.json" hash="5f2f368919effd4c7d36bc11d42d8198"/><file name="template_details.json" hash="81fa02e23c0a9c00c55730956a2868b0"/><file name="templates.json" hash="64aca93871da82620071a26c818da4ce"/><file name="timezones.json" hash="ff9bbd7171fe05f5bace2fc8087953d0"/><file name="unsubscribed_subscribers.json" hash="0f7cec268e4241426a5c7dcc33ba99eb"/></dir></dir><file name=".gitignore" hash="1416491a3a84679680a343e7adf1f20d"/><file name=".travis.yml" hash="3f3c6ec40583a10d8ec8dfa89a2010e8"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DigitalPianism_CampaignMonitor</name>
4
+ <version>0.7.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Integrates Magento with the Campaign Monitor mailing list manager using API V3. </summary>
10
+ <description>&lt;p&gt;This extension is entirely based on the &lt;a href="http://www.magentocommerce.com/magento-connect/fontis-campaign-monitor.html"&gt;Fontis Campaign Monitor&lt;/a&gt; extension, except it uses the Campaign Monitor API V3 instead of V2 and it supports OAuth authentication.&lt;/p&gt;&#xD;
11
  &#xD;
12
  &lt;p&gt;Campaign Monitor is built for designers who can create great looking emails for themselves and their clients, but need software to send each campaign, track the results and manage their subscribers." www.campaignmonitor.com&lt;/p&gt;&#xD;
13
  &#xD;
14
  &lt;p&gt;This extension integrates Magento with the Campaign Monitor mailing list manager. Users are added to a specified Campaign Monitor email list when they subscribe to the newsletter in Magento, and removed when they unsubscribe. Users are also marked as unsubscribed in Magento when they click an unsubscribe link in a Campaign Monitor email.&lt;/p&gt;</description>
15
+ <notes>- Added OAuth authentication support.</notes>
16
  <authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
17
+ <date>2014-09-16</date>
18
+ <time>14:24:17</time>
19
+ <contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CampaignMonitor"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Auth.php" hash="a95501d852759b07a4f5f5e24743a0e7"/><file name="Refreshtoken.php" hash="8053f23d810219471e581e071bef96c6"/></dir></dir><dir name="Source"><file name="Authtype.php" hash="c261b58e15cc0bc9f2aa49bfc7ed81de"/></dir></dir></dir></dir><file name="Linkedattributes.php" hash="3c5d00f9352fa53fbd36243c0d87db6e"/></dir><dir name="Helper"><file name="Data.php" hash="dacf12b145ebc49e06249155c35de7b8"/></dir><dir name="Model"><file name="Auth.php" hash="5f21e27b1b71d778ff49e3e46ab95bd5"/><dir name="Customer"><file name="Observer.php" hash="2b6cb4bfdfb63b2e611d5dea60fa667b"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Authtype.php" hash="2bba7379821e48b18d78327d02868b54"/></dir></dir></dir></dir><dir name="controllers"><file name="AdminhookController.php" hash="0598814f0cd09e4fd200520c94f9bad6"/><dir name="Adminhtml"><file name="AuthController.php" hash="cf5040b79ec840f6b2104c0b61f36dfa"/></dir><file name="AuthController.php" hash="5a007aa6d45de22198202d0263c29706"/><file name="HookController.php" hash="4e93ea76a5eb65bfbc40ef073578f091"/><file name="UnsubscribeController.php" hash="10fab41617bfd1430c426cf3458739cd"/></dir><dir name="etc"><file name="config.xml" hash="63b6692ee75527fe3d734c47efcaad55"/><file name="system.xml" hash="d3b61d1e71d59de1aa1aa9afe41744a4"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_CampaignMonitor.xml" hash="6044d29d2b2e7d0689315376e3c27acd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="campaignmonitor"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array_dropdown.phtml" hash="ac84db9b1e8b342337a478ecba62e0b1"/><file name="auth.phtml" hash="782158554acf66e6cbfa5ff4b1195756"/><file name="refreshtoken.phtml" hash="5fa2f574548f62ff7f84ae4d864c1352"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="createsend"><file name="HISTORY.md" hash="ab283bd0126e8c10edf6da099c80a661"/><file name="LICENSE" hash="e4306d4b6c77f2db816ec4aed73a13c7"/><file name="README.md" hash="90a7855700d85e14211baf5399810a3d"/><file name="RELEASE.md" hash="5efce8234607beab27bf466b23fc4535"/><dir name="class"><file name="base_classes.php" hash="8a3f82c1204d7de080d2f3d15cb70ea9"/><file name="cacert.pem" hash="c29d362201b1bd232898d2b658811db2"/><file name="log.php" hash="11ff6a9006a6386c1cd8880cd3c0f41b"/><file name="serialisation.php" hash="3eb39437970e8787f0ef9ac292b688e6"/><file name="services_json.php" hash="c9e9ef0d35d7d34f9d216344da27915d"/><file name="transport.php" hash="da2967846daf164a70e649c9f2ee0094"/></dir><file name="composer.json" hash="eccad7521596b5fe0d81af51ab2f16a1"/><file name="composer.lock" hash="e64bca0a5accd8086e4e49bf41aa8629"/><file name="csrest_administrators.php" hash="72480342a46e8d82fd44096b4818f090"/><file name="csrest_campaigns.php" hash="38e2c429abaaa4609d30f28622e5fc3f"/><file name="csrest_clients.php" hash="df11ce1c1fd5fd43980db42cb83a6fa3"/><file name="csrest_general.php" hash="b8d1de7d1e435231955cdf8bc0311632"/><file name="csrest_lists.php" hash="42904680a424977d7c6f3211cf0d7a9c"/><file name="csrest_people.php" hash="ff2a14af7e171a11d73bef3d4995f512"/><file name="csrest_segments.php" hash="bac0e031058e7e08ae97906738cc65fc"/><file name="csrest_subscribers.php" hash="b5ad794e2cc2f65a278a8aa9de4af7d7"/><file name="csrest_templates.php" hash="4c94511a505a868eef2f8109ca3c35d6"/><dir name="samples"><dir name="campaign"><file name="create.php" hash="af4016e1b3539b3710d4b8e05bc7001b"/><file name="create_from_template.php" hash="4868b7f363abebc3d9fe9f561e59a743"/><file name="delete.php" hash="b96c2421084e77c241ea270894719aff"/><file name="get_bounces.php" hash="3bd2b2faa8d4b99bf7b9d682ce7402d3"/><file name="get_clicks.php" hash="92209680bdd73ecf3f94ecd1c33374ce"/><file name="get_email_client_usage.php" hash="fcf3a316f03460f26b6f12bcb20c17b0"/><file name="get_lists_and_segments.php" hash="e7d07e56924abfbd2d390b468d2df14b"/><file name="get_opens.php" hash="e155bf6a72a26fd34997d9024bd9911c"/><file name="get_recipients.php" hash="488f76fba7f7e2dc0680abefe5fe1fb5"/><file name="get_spam.php" hash="35c0beea84a51e3e447546f6b11ba754"/><file name="get_summary.php" hash="85ee04ac9adc616aa41d5a02824e6f7c"/><file name="get_unsubscribes.php" hash="af39956e9f46d9ecd1e78fff830f87b0"/><file name="send.php" hash="9e33ed7bd15e246929f52847f93827ce"/><file name="send_preview.php" hash="4eb7bff25251b00915791b96b20ee2ab"/><file name="unschedule.php" hash="83f0374d69eee6ae284c7fe27fdb65d7"/></dir><dir name="client"><file name="create.php" hash="8fbadcd57df2246a8447d3a3b9843d64"/><file name="delete.php" hash="a7a9945427a64737981c4a3a5c047d97"/><file name="get.php" hash="0b53f225d317d3d97bb0f3bafe83cf53"/><file name="get_campaigns.php" hash="242ed8ed7338a502751ead210283cb04"/><file name="get_drafts.php" hash="2efeea55251ec1e7e7c7767820dd28f1"/><file name="get_lists.php" hash="97ffa5cd9ccc765ae79baff0f50ece64"/><file name="get_lists_for_email.php" hash="a402b11a7b93dc6992dc69998a0ebf80"/><file name="get_scheduled.php" hash="163d89985d5fdc29d9f3a5d50787fd81"/><file name="get_segments.php" hash="9acd7c148db84fd03d825a6eaebd0b88"/><file name="get_suppressionlist.php" hash="2ae6c31510338b307f93d49369c964d1"/><file name="get_templates.php" hash="756789c223be6664b3517b79063f5143"/><file name="set_basics.php" hash="839bc9f656d26caf7335b2a4f4336ae8"/><file name="set_monthly_billing.php" hash="7f4ff840e6fe78932f9bc72e68c282da"/><file name="set_payg_billing.php" hash="2f67604445e8807a70a9e28759f3bb55"/><file name="suppress.php" hash="f78f0ddb442c9dfc53865c00ee57d266"/><file name="transfer_credits.php" hash="3fe8a12cef59a2d126d8ed7437563ec8"/><file name="unsuppress.php" hash="3442665090da89c2f5d91f6b69c18ade"/></dir><file name="get_apikey.php" hash="36f399338a612b2771ed3c53058d1d6f"/><file name="get_billing_details.php" hash="bfe297ec441b25eaa6155e283b4c0bf7"/><file name="get_clients.php" hash="521e3174750e8c41236c1c4fae5ae8f4"/><file name="get_countries.php" hash="6a71a585ef76eedec4589ecc303415f5"/><file name="get_systemdate.php" hash="7b5eeae853d164667140fb3c99a5b8ff"/><file name="get_timezones.php" hash="f756ab9b392af894320defe0f7f7296d"/><dir name="list"><file name="activate_webhook.php" hash="ca496e62c78429fa745f624738b80ce7"/><file name="create.php" hash="16a635a4de9ec820b08a7f30319534bd"/><file name="create_custom_field.php" hash="59ad0fe4d6b2038ceeda7681e4515dd0"/><file name="create_webhook.php" hash="d968c28b19521f6d3c5e6852c5c13806"/><file name="deactivate_webhook.php" hash="68478920fca13c0c1f98a450be8cb3c2"/><file name="delete.php" hash="12f035403835a63c7a0c1ba4704b3e46"/><file name="delete_custom_field.php" hash="f5031a6eac6ba776b54ac22a79c023b5"/><file name="delete_webhook.php" hash="080320b7e078ce0e33586e4c6a944172"/><file name="get.php" hash="25dcb3de68cd41792ec88d7d937217e8"/><file name="get_active_subscribers.php" hash="afcee93bc1b922a99c9e19f48894417b"/><file name="get_bounced_subscribers.php" hash="2fa45e557cca0d93924a6415fbc302d5"/><file name="get_custom_fields.php" hash="ddcaf8ee644474bb77d597894f8e501e"/><file name="get_deleted_subscribers.php" hash="400adee5529e1e0f16ff7b64b09e8bca"/><file name="get_segments.php" hash="1ddba11f0968d2d7e7109e14140e7663"/><file name="get_stats.php" hash="74ab2cf477a5049505f1959c3e9e272c"/><file name="get_unconfirmed_subscribers.php" hash="e6062d83308ccc7648d8c17200d5f277"/><file name="get_unsubscribed_subscribers.php" hash="366d5bbd88a4028b664be59420a1a0aa"/><file name="get_webhooks.php" hash="bbcb6401f2a1d3268f25405b3cbe4598"/><file name="list_webhook_receiver.php" hash="12ca45146c050f341423f80acbe688aa"/><file name="test_webhook.php" hash="22bf2bdf4c277bc86300d43018e4926e"/><file name="update.php" hash="acb1f015b02b9d66da6d286843def237"/><file name="update_custom_field.php" hash="8b5f33bc803fa29fb0a44847a0d399ec"/><file name="update_field_options.php" hash="809ed63991f1e799ee2c2b70f3c692f4"/></dir><dir name="segment"><file name="add_rule.php" hash="3ed9335f70c354cf068a176eb6dd8f6f"/><file name="clear_rules.php" hash="da68802f93c3c25a60fcf1a2b7603273"/><file name="create.php" hash="4f12c0099e9edc42ab55acfd80239ecd"/><file name="delete.php" hash="9079d2812da34ce862f9543513eb7efc"/><file name="get.php" hash="f4e65cd88d02dc5fa0c2d9d7d1a444e6"/><file name="get_subscribers.php" hash="a580a7c33025bd516cae2e8b87cc10dd"/><file name="update.php" hash="cb37cd60257eb361f80f69dfa830ab94"/></dir><dir name="subscriber"><file name="add.php" hash="f266ce4459f71665e29d25bb5181ba76"/><file name="delete.php" hash="08325db91e593b855749bc5d9381f5e3"/><file name="get.php" hash="e4d4cda7ed515df7ab7e81c72906601d"/><file name="get_history.php" hash="445b5dfc75fec5433986655437f5f608"/><file name="import.php" hash="119de43ee1e4b31ce2b710ad4507a25f"/><file name="unsubscribe.php" hash="7896a14a7bbb69a8b4d1db9ead52053f"/><file name="update.php" hash="4a62f2b72d31cb168258738483366707"/></dir><dir name="template"><file name="create.php" hash="0ed844ae8d5fc1025902a7fcfb8a949b"/><file name="delete.php" hash="ddd8cbab53644e863d5f0d4807e03719"/><file name="get.php" hash="3d5147086b92c85e7b0289ba065f9434"/><file name="update.php" hash="0854c3686f1339434cb6fb12897f801f"/></dir></dir><dir name="tests"><file name="all_tests.php" hash="3fafbd947aa885d9056ed62e832ca61b"/><dir name="class_tests"><file name="response_tests.php" hash="ae5b4f541ac5bcba7a9417544d2156a9"/><file name="transport_test.php" hash="3033343417f283136c43d0bab77ac355"/></dir><file name="csrest_administrators_test.php" hash="77830067da14a226bfdc86b445f68f30"/><file name="csrest_campaigns_test.php" hash="ce68576c81c314dbdeba2b229903d865"/><file name="csrest_clients_test.php" hash="d3023b37bc3ebf222171606a100532d5"/><file name="csrest_lists_test.php" hash="533753c96477cad7598382c94e9a8937"/><file name="csrest_people_test.php" hash="72269f3d21caaf5648684da44b0ad319"/><file name="csrest_segments_test.php" hash="33f275bcab02eacb32299d6fc63e1b7c"/><file name="csrest_subscribers_test.php" hash="8b6ec2dade2d5b59d8f27f7e32df049f"/><file name="csrest_template_test.php" hash="3645fc50d5e43da11fa1a2b496b692c4"/><file name="csrest_test.php" hash="de298e06f8b584018f8e6b1d14000f32"/><dir name="responses"><file name="active_subscribers.json" hash="414033ce6952d88c0edd3c7b04d4f14e"/><file name="add_subscriber.json" hash="236507977b97832343c87955243068ad"/><file name="apikey.json" hash="4ca4132cc99f80bfc3d4a029a77a7a6e"/><file name="bounced_subscribers.json" hash="78c52687485c30c0fb031eb82e472fb3"/><file name="campaign_bounces.json" hash="55471525555dacee6ca1eb9ed5826cea"/><file name="campaign_clicks.json" hash="57d3357f4a0d8b55042a80e6d984e1ea"/><file name="campaign_listsandsegments.json" hash="a0d21dda2042a25b1266036b5d945f0c"/><file name="campaign_opens.json" hash="50c3052eebc922dfd0293498b5374ef0"/><file name="campaign_recipients.json" hash="be59c57f1f497669260f5124c13d109e"/><file name="campaign_spam.json" hash="48fa85397d6d8da1a685a94c404d14a9"/><file name="campaign_summary.json" hash="248d074230990e424dedb26afac895eb"/><file name="campaign_unsubscribes.json" hash="87d6b967ec28f8b3cd7845acc3ba0a16"/><file name="campaigns.json" hash="3b160d6e1a5de3e6163f2fffa502e4cb"/><file name="client_details.json" hash="964787a45923035cdd7330d4af13dfd9"/><file name="clients.json" hash="b243ae5d2f1b0686a6f45bbc262b1ad5"/><file name="countries.json" hash="7baa975380541216a7829128d4d7fb5b"/><file name="create_campaign.json" hash="61079127bd26d95434347f30803a85b2"/><file name="create_client.json" hash="0b5ea68aeecf1f61c8a00fb5d2b89104"/><file name="create_custom_field.json" hash="49b9878fd944fa8ea2f283a3d0b6576b"/><file name="create_list.json" hash="33b7d284c287fa44edb649234bc2ac6b"/><file name="create_list_webhook.json" hash="8a1c9ea0268a3a58d8f8fdaa4f159519"/><file name="create_segment.json" hash="6183146c3898ae281ea640e40fb5b3b0"/><file name="create_template.json" hash="9b1fcc1ae0925bd552cb23e364d48cca"/><file name="custom_api_error.json" hash="6be6c0df48a411fc54a5abf1d8502690"/><file name="custom_fields.json" hash="fe40aa43df15068516cdc6b7d9e2148c"/><file name="deleted_subscribers.json" hash="176235e9b24405ed329cc40a9ac5d1cd"/><file name="drafts.json" hash="8b36d3bf66ebb683b6926fcef95ae106"/><file name="import_subscribers.json" hash="3c7c7d85d510224197dc597d3a6cf585"/><file name="import_subscribers_partial_success.json" hash="4e1ff5c7b33a77d709530a31f544a22d"/><file name="list_details.json" hash="09d06afb7cd013e74fe615ddfd5a6799"/><file name="list_stats.json" hash="b8cd04e30e5e30862f005208997655de"/><file name="list_webhooks.json" hash="93194d66734e07372cac1b5c9c04f2b5"/><file name="lists.json" hash="0b7f8013e3e93a105a7a7d8c156daf4d"/><file name="listsforemail.json" hash="c7eb2e23b02883e0a0f9a9b2ca9bc94a"/><file name="scheduled.json" hash="d7c9df96fbfa5bafb1e1cfc0643123b7"/><file name="segment_details.json" hash="9ec00f104a565fc723270e3ceb91d509"/><file name="segment_subscribers.json" hash="cf5cec4bc4e7970315ea929a0bd29ecd"/><file name="segments.json" hash="d2d9265fd87ed661cd65c9c96b31a2f0"/><file name="subscriber_details.json" hash="1c5733a762560ed1dc27449edea3c27f"/><file name="subscriber_history.json" hash="93d3efaa0f0373156146e9f3060ca855"/><file name="suppressionlist.json" hash="13fff3aeddf64804cf8d9232b79ab45b"/><file name="systemdate.json" hash="5f2f368919effd4c7d36bc11d42d8198"/><file name="template_details.json" hash="81fa02e23c0a9c00c55730956a2868b0"/><file name="templates.json" hash="64aca93871da82620071a26c818da4ce"/><file name="timezones.json" hash="ff9bbd7171fe05f5bace2fc8087953d0"/><file name="unsubscribed_subscribers.json" hash="0f7cec268e4241426a5c7dcc33ba99eb"/></dir></dir><file name=".gitignore" hash="1416491a3a84679680a343e7adf1f20d"/><file name=".travis.yml" hash="3f3c6ec40583a10d8ec8dfa89a2010e8"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>