Version Notes
Fix for ActiveCampaign contact being auto-unsubscribed shortly after subscribing.
Download this release
Release Info
| Developer | ActiveCampaign, Inc. |
| Extension | ActiveCampaign_Subscriptions |
| Version | 1.5.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.5.2 to 1.5.3
- app/code/community/ActiveCampaign/Subscriptions/Model/Observer.php +33 -33
- app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Automation.class.php +0 -51
- app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Deal.class.php +0 -139
- app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Settings.class.php +0 -25
- app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Subscriber.class.php +0 -6
- app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Tracking.class.php +0 -118
- package.xml +5 -7
app/code/community/ActiveCampaign/Subscriptions/Model/Observer.php
CHANGED
|
@@ -106,7 +106,7 @@ protected function file_append($content) {
|
|
| 106 |
|
| 107 |
if ($test_connection) {
|
| 108 |
|
| 109 |
-
$
|
| 110 |
"email" => $customer_email,
|
| 111 |
"first_name" => $customer_first_name,
|
| 112 |
"last_name" => $customer_last_name,
|
|
@@ -114,21 +114,21 @@ protected function file_append($content) {
|
|
| 114 |
|
| 115 |
// add lists
|
| 116 |
foreach ($connection["list_ids"] as $list_id) {
|
| 117 |
-
$
|
| 118 |
-
$
|
| 119 |
}
|
| 120 |
|
| 121 |
-
$
|
| 122 |
|
| 123 |
-
$
|
| 124 |
|
| 125 |
-
if ((int)$
|
| 126 |
// successful request
|
| 127 |
-
//$
|
| 128 |
}
|
| 129 |
else {
|
| 130 |
// request failed
|
| 131 |
-
//print_r($
|
| 132 |
//exit();
|
| 133 |
}
|
| 134 |
}
|
|
@@ -161,39 +161,39 @@ protected function file_append($content) {
|
|
| 161 |
|
| 162 |
if ($connection["api_url"] && $connection["api_key"] && $connection["list_ids"]) {
|
| 163 |
|
| 164 |
-
|
| 165 |
-
|
| 166 |
|
| 167 |
-
|
| 168 |
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
// add lists
|
| 176 |
-
foreach ($connection["list_ids"] as $list_id) {
|
| 177 |
-
$subscriber["p[{$list_id}]"] = $list_id;
|
| 178 |
-
$subscriber["status[{$list_id}]"] = $list_status;
|
| 179 |
-
}
|
| 180 |
|
| 181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
|
| 183 |
-
|
| 184 |
|
| 185 |
-
|
| 186 |
-
// successful request
|
| 187 |
-
//$subscriber_id = (int)$subscriber_request->subscriber_id;
|
| 188 |
-
}
|
| 189 |
-
else {
|
| 190 |
-
// request failed
|
| 191 |
-
//print_r($subscriber_request->error);
|
| 192 |
-
//exit();
|
| 193 |
-
}
|
| 194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
}
|
| 196 |
|
|
|
|
|
|
|
| 197 |
}
|
| 198 |
|
| 199 |
return;
|
| 106 |
|
| 107 |
if ($test_connection) {
|
| 108 |
|
| 109 |
+
$contact = array(
|
| 110 |
"email" => $customer_email,
|
| 111 |
"first_name" => $customer_first_name,
|
| 112 |
"last_name" => $customer_last_name,
|
| 114 |
|
| 115 |
// add lists
|
| 116 |
foreach ($connection["list_ids"] as $list_id) {
|
| 117 |
+
$contact["p[{$list_id}]"] = $list_id;
|
| 118 |
+
$contact["status[{$list_id}]"] = 1;
|
| 119 |
}
|
| 120 |
|
| 121 |
+
$contact["form"] = $connection["form_id"];
|
| 122 |
|
| 123 |
+
$contact_request = $ac->api("contact/sync?service=magento", $contact);
|
| 124 |
|
| 125 |
+
if ((int)$contact_request->success) {
|
| 126 |
// successful request
|
| 127 |
+
//$contact_id = (int)$contact_request->contact_id;
|
| 128 |
}
|
| 129 |
else {
|
| 130 |
// request failed
|
| 131 |
+
//print_r($contact_request->error);
|
| 132 |
//exit();
|
| 133 |
}
|
| 134 |
}
|
| 161 |
|
| 162 |
if ($connection["api_url"] && $connection["api_key"] && $connection["list_ids"]) {
|
| 163 |
|
| 164 |
+
$ac = new ActiveCampaign($connection["api_url"], $connection["api_key"]);
|
| 165 |
+
$test_connection = $ac->credentials_test();
|
| 166 |
|
| 167 |
+
if ($test_connection) {
|
| 168 |
|
| 169 |
+
$contact = array(
|
| 170 |
+
"email" => $customer_email,
|
| 171 |
+
"first_name" => $customer_first_name,
|
| 172 |
+
"last_name" => $customer_last_name,
|
| 173 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
|
| 175 |
+
// add lists
|
| 176 |
+
foreach ($connection["list_ids"] as $list_id) {
|
| 177 |
+
$contact["p[{$list_id}]"] = $list_id;
|
| 178 |
+
$contact["status[{$list_id}]"] = $list_status;
|
| 179 |
+
}
|
| 180 |
|
| 181 |
+
$contact["form"] = $connection["form_id"];
|
| 182 |
|
| 183 |
+
$contact_request = $ac->api("contact/sync?service=magento", $contact);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
|
| 185 |
+
if ((int)$contact_request->success) {
|
| 186 |
+
// successful request
|
| 187 |
+
//$contact_id = (int)$contact_request->contact_id;
|
| 188 |
+
}
|
| 189 |
+
else {
|
| 190 |
+
// request failed
|
| 191 |
+
//print_r($contact_request->error);
|
| 192 |
+
//exit();
|
| 193 |
}
|
| 194 |
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
}
|
| 198 |
|
| 199 |
return;
|
app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Automation.class.php
DELETED
|
@@ -1,51 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class AC_Automation extends ActiveCampaign {
|
| 4 |
-
|
| 5 |
-
public $version;
|
| 6 |
-
public $url_base;
|
| 7 |
-
public $url;
|
| 8 |
-
public $api_key;
|
| 9 |
-
|
| 10 |
-
function __construct($version, $url_base, $url, $api_key) {
|
| 11 |
-
$this->version = $version;
|
| 12 |
-
$this->url_base = $url_base;
|
| 13 |
-
$this->url = $url;
|
| 14 |
-
$this->api_key = $api_key;
|
| 15 |
-
}
|
| 16 |
-
|
| 17 |
-
function list_($params) {
|
| 18 |
-
$request_url = "{$this->url}&api_action=automation_list&api_output={$this->output}&{$params}";
|
| 19 |
-
$response = $this->curl($request_url);
|
| 20 |
-
return $response;
|
| 21 |
-
}
|
| 22 |
-
|
| 23 |
-
function contact_add($params, $post_data) {
|
| 24 |
-
$request_url = "{$this->url}&api_action=automation_contact_add&api_output={$this->output}";
|
| 25 |
-
if ($params) $request_url .= "&{$params}";
|
| 26 |
-
$response = $this->curl($request_url, $post_data);
|
| 27 |
-
return $response;
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
function contact_remove($params, $post_data) {
|
| 31 |
-
$request_url = "{$this->url}&api_action=automation_contact_remove&api_output={$this->output}";
|
| 32 |
-
if ($params) $request_url .= "&{$params}";
|
| 33 |
-
$response = $this->curl($request_url, $post_data);
|
| 34 |
-
return $response;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
function contact_list($params) {
|
| 38 |
-
$request_url = "{$this->url}&api_action=automation_contact_list&api_output={$this->output}&{$params}";
|
| 39 |
-
$response = $this->curl($request_url);
|
| 40 |
-
return $response;
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
function contact_view($params) {
|
| 44 |
-
$request_url = "{$this->url}&api_action=automation_contact_view&api_output={$this->output}&{$params}";
|
| 45 |
-
$response = $this->curl($request_url);
|
| 46 |
-
return $response;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Deal.class.php
DELETED
|
@@ -1,139 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class AC_Deal extends ActiveCampaign {
|
| 4 |
-
|
| 5 |
-
public $version;
|
| 6 |
-
public $url_base;
|
| 7 |
-
public $url;
|
| 8 |
-
public $api_key;
|
| 9 |
-
|
| 10 |
-
function __construct($version, $url_base, $url, $api_key) {
|
| 11 |
-
$this->version = $version;
|
| 12 |
-
$this->url_base = $url_base;
|
| 13 |
-
$this->url = $url;
|
| 14 |
-
$this->api_key = $api_key;
|
| 15 |
-
}
|
| 16 |
-
|
| 17 |
-
function add($params, $post_data) {
|
| 18 |
-
$request_url = "{$this->url}&api_action=deal_add&api_output={$this->output}";
|
| 19 |
-
$response = $this->curl($request_url, $post_data);
|
| 20 |
-
return $response;
|
| 21 |
-
}
|
| 22 |
-
|
| 23 |
-
function edit($params, $post_data) {
|
| 24 |
-
$request_url = "{$this->url}&api_action=deal_edit&api_output={$this->output}";
|
| 25 |
-
$response = $this->curl($request_url, $post_data);
|
| 26 |
-
return $response;
|
| 27 |
-
}
|
| 28 |
-
|
| 29 |
-
function delete($params, $post_data) {
|
| 30 |
-
$request_url = "{$this->url}&api_action=deal_delete&api_output={$this->output}";
|
| 31 |
-
$response = $this->curl($request_url, $post_data);
|
| 32 |
-
return $response;
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
function get($params) {
|
| 36 |
-
$request_url = "{$this->url}&api_action=deal_get&api_output={$this->output}&{$params}";
|
| 37 |
-
$response = $this->curl($request_url);
|
| 38 |
-
return $response;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
function list_($params) {
|
| 42 |
-
$request_url = "{$this->url}&api_action=deal_list&api_output={$this->output}&{$params}";
|
| 43 |
-
$response = $this->curl($request_url);
|
| 44 |
-
return $response;
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
-
function note_add($params, $post_data) {
|
| 48 |
-
$request_url = "{$this->url}&api_action=deal_note_add&api_output={$this->output}";
|
| 49 |
-
$response = $this->curl($request_url, $post_data);
|
| 50 |
-
return $response;
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
function note_edit($params, $post_data) {
|
| 54 |
-
$request_url = "{$this->url}&api_action=deal_note_edit&api_output={$this->output}";
|
| 55 |
-
$response = $this->curl($request_url, $post_data);
|
| 56 |
-
return $response;
|
| 57 |
-
}
|
| 58 |
-
|
| 59 |
-
function pipeline_add($params, $post_data) {
|
| 60 |
-
$request_url = "{$this->url}&api_action=deal_pipeline_add&api_output={$this->output}";
|
| 61 |
-
$response = $this->curl($request_url, $post_data);
|
| 62 |
-
return $response;
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
function pipeline_edit($params, $post_data) {
|
| 66 |
-
$request_url = "{$this->url}&api_action=deal_pipeline_edit&api_output={$this->output}";
|
| 67 |
-
$response = $this->curl($request_url, $post_data);
|
| 68 |
-
return $response;
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
function pipeline_delete($params, $post_data) {
|
| 72 |
-
$request_url = "{$this->url}&api_action=deal_pipeline_delete&api_output={$this->output}";
|
| 73 |
-
$response = $this->curl($request_url, $post_data);
|
| 74 |
-
return $response;
|
| 75 |
-
}
|
| 76 |
-
|
| 77 |
-
function pipeline_list($params) {
|
| 78 |
-
$request_url = "{$this->url}&api_action=deal_pipeline_list&api_output={$this->output}&{$params}";
|
| 79 |
-
$response = $this->curl($request_url);
|
| 80 |
-
return $response;
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
function stage_add($params, $post_data) {
|
| 84 |
-
$request_url = "{$this->url}&api_action=deal_stage_add&api_output={$this->output}";
|
| 85 |
-
$response = $this->curl($request_url, $post_data);
|
| 86 |
-
return $response;
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
-
function stage_edit($params, $post_data) {
|
| 90 |
-
$request_url = "{$this->url}&api_action=deal_stage_edit&api_output={$this->output}";
|
| 91 |
-
$response = $this->curl($request_url, $post_data);
|
| 92 |
-
return $response;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
function stage_delete($params, $post_data) {
|
| 96 |
-
$request_url = "{$this->url}&api_action=deal_stage_delete&api_output={$this->output}";
|
| 97 |
-
$response = $this->curl($request_url, $post_data);
|
| 98 |
-
return $response;
|
| 99 |
-
}
|
| 100 |
-
|
| 101 |
-
function stage_list($params) {
|
| 102 |
-
$request_url = "{$this->url}&api_action=deal_stage_list&api_output={$this->output}&{$params}";
|
| 103 |
-
$response = $this->curl($request_url);
|
| 104 |
-
return $response;
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
function task_add($params, $post_data) {
|
| 108 |
-
$request_url = "{$this->url}&api_action=deal_task_add&api_output={$this->output}";
|
| 109 |
-
$response = $this->curl($request_url, $post_data);
|
| 110 |
-
return $response;
|
| 111 |
-
}
|
| 112 |
-
|
| 113 |
-
function task_edit($params, $post_data) {
|
| 114 |
-
$request_url = "{$this->url}&api_action=deal_task_edit&api_output={$this->output}";
|
| 115 |
-
$response = $this->curl($request_url, $post_data);
|
| 116 |
-
return $response;
|
| 117 |
-
}
|
| 118 |
-
|
| 119 |
-
function tasktype_add($params, $post_data) {
|
| 120 |
-
$request_url = "{$this->url}&api_action=deal_tasktype_add&api_output={$this->output}";
|
| 121 |
-
$response = $this->curl($request_url, $post_data);
|
| 122 |
-
return $response;
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
-
function tasktype_edit($params, $post_data) {
|
| 126 |
-
$request_url = "{$this->url}&api_action=deal_tasktype_edit&api_output={$this->output}";
|
| 127 |
-
$response = $this->curl($request_url, $post_data);
|
| 128 |
-
return $response;
|
| 129 |
-
}
|
| 130 |
-
|
| 131 |
-
function tasktype_delete($params, $post_data) {
|
| 132 |
-
$request_url = "{$this->url}&api_action=deal_tasktype_delete&api_output={$this->output}";
|
| 133 |
-
$response = $this->curl($request_url, $post_data);
|
| 134 |
-
return $response;
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
}
|
| 138 |
-
|
| 139 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Settings.class.php
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class AC_Settings extends ActiveCampaign {
|
| 4 |
-
|
| 5 |
-
public $version;
|
| 6 |
-
public $url_base;
|
| 7 |
-
public $url;
|
| 8 |
-
public $api_key;
|
| 9 |
-
|
| 10 |
-
function __construct($version, $url_base, $url, $api_key) {
|
| 11 |
-
$this->version = $version;
|
| 12 |
-
$this->url_base = $url_base;
|
| 13 |
-
$this->url = $url;
|
| 14 |
-
$this->api_key = $api_key;
|
| 15 |
-
}
|
| 16 |
-
|
| 17 |
-
function edit($params, $post_data) {
|
| 18 |
-
$request_url = "{$this->url}&api_action=settings_edit&api_output={$this->output}";
|
| 19 |
-
$response = $this->curl($request_url, $post_data);
|
| 20 |
-
return $response;
|
| 21 |
-
}
|
| 22 |
-
|
| 23 |
-
}
|
| 24 |
-
|
| 25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Subscriber.class.php
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class AC_Subscriber extends AC_Contact {
|
| 4 |
-
}
|
| 5 |
-
|
| 6 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/ActiveCampaign/Subscriptions/activecampaign-api-php/Tracking.class.php
DELETED
|
@@ -1,118 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class AC_Tracking extends ActiveCampaign {
|
| 4 |
-
|
| 5 |
-
public $version;
|
| 6 |
-
public $url_base;
|
| 7 |
-
public $url;
|
| 8 |
-
public $api_key;
|
| 9 |
-
|
| 10 |
-
function __construct($version, $url_base, $url, $api_key) {
|
| 11 |
-
$this->version = $version;
|
| 12 |
-
$this->url_base = $url_base;
|
| 13 |
-
$this->url = $url;
|
| 14 |
-
$this->api_key = $api_key;
|
| 15 |
-
}
|
| 16 |
-
|
| 17 |
-
/*
|
| 18 |
-
* Update the status (enabled or disabled) for site tracking.
|
| 19 |
-
*/
|
| 20 |
-
function site_status($params, $post_data) {
|
| 21 |
-
// version 2 only.
|
| 22 |
-
$request_url = "{$this->url_base}/track/site";
|
| 23 |
-
$response = $this->curl($request_url, $post_data, "POST", "tracking_site_status");
|
| 24 |
-
return $response;
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
/*
|
| 28 |
-
* Update the status (enabled or disabled) for event tracking.
|
| 29 |
-
*/
|
| 30 |
-
function event_status($params, $post_data) {
|
| 31 |
-
// version 2 only.
|
| 32 |
-
$request_url = "{$this->url_base}/track/event";
|
| 33 |
-
$response = $this->curl($request_url, $post_data, "POST", "tracking_event_status");
|
| 34 |
-
return $response;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
/*
|
| 38 |
-
* Returns existing whitelisted domains.
|
| 39 |
-
*/
|
| 40 |
-
function site_list($params) {
|
| 41 |
-
if ($this->version == 1) {
|
| 42 |
-
// not supported currently.
|
| 43 |
-
//$request_url = "{$this->url}&api_action=contact_delete_list&api_output={$this->output}&{$params}";
|
| 44 |
-
} elseif ($this->version == 2) {
|
| 45 |
-
$request_url = "{$this->url_base}/track/site";
|
| 46 |
-
}
|
| 47 |
-
$response = $this->curl($request_url, array(), "GET", "tracking_site_list");
|
| 48 |
-
return $response;
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
/*
|
| 52 |
-
* Returns existing tracked events.
|
| 53 |
-
*/
|
| 54 |
-
function event_list($params) {
|
| 55 |
-
if ($this->version == 1) {
|
| 56 |
-
// not supported currently.
|
| 57 |
-
//$request_url = "{$this->url}&api_action=contact_delete_list&api_output={$this->output}&{$params}";
|
| 58 |
-
} elseif ($this->version == 2) {
|
| 59 |
-
$request_url = "{$this->url_base}/track/event";
|
| 60 |
-
}
|
| 61 |
-
$response = $this->curl($request_url, array(), "GET", "tracking_event_list");
|
| 62 |
-
return $response;
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
/*
|
| 66 |
-
* Adds a domain to the site tracking whitelist.
|
| 67 |
-
*/
|
| 68 |
-
function whitelist($params, $post_data) {
|
| 69 |
-
// version 2 only.
|
| 70 |
-
$request_url = "{$this->url_base}/track/site";
|
| 71 |
-
$response = $this->curl($request_url, $post_data, "PUT", "tracking_whitelist");
|
| 72 |
-
return $response;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
/*
|
| 76 |
-
* Removes a domain from the site tracking whitelist.
|
| 77 |
-
*/
|
| 78 |
-
function whitelist_remove($params, $post_data) {
|
| 79 |
-
// version 2 only.
|
| 80 |
-
$request_url = "{$this->url_base}/track/site";
|
| 81 |
-
$response = $this->curl($request_url, $post_data, "DELETE", "tracking_whitelist");
|
| 82 |
-
return $response;
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
/*
|
| 86 |
-
* Removes an event.
|
| 87 |
-
*/
|
| 88 |
-
function event_remove($params, $post_data) {
|
| 89 |
-
// version 2 only.
|
| 90 |
-
$request_url = "{$this->url_base}/track/event";
|
| 91 |
-
$response = $this->curl($request_url, $post_data, "DELETE", "tracking_event_remove");
|
| 92 |
-
return $response;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/*
|
| 96 |
-
* Adds a new event.
|
| 97 |
-
*/
|
| 98 |
-
function log($params, $post_data) {
|
| 99 |
-
$request_url = "https://trackcmp.net/event";
|
| 100 |
-
$post_data["actid"] = $this->track_actid;
|
| 101 |
-
$post_data["key"] = $this->track_key;
|
| 102 |
-
$visit_data = array();
|
| 103 |
-
if ($this->track_email) {
|
| 104 |
-
$visit_data["email"] = $this->track_email;
|
| 105 |
-
}
|
| 106 |
-
if (isset($post_data["visit"])) {
|
| 107 |
-
$visit_data = array_merge($visit_data, $post_data["visit"]);
|
| 108 |
-
}
|
| 109 |
-
if ($visit_data) {
|
| 110 |
-
$post_data["visit"] = json_encode($visit_data);
|
| 111 |
-
}
|
| 112 |
-
$response = $this->curl($request_url, $post_data, "POST", "tracking_log");
|
| 113 |
-
return $response;
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>ActiveCampaign_Subscriptions</name>
|
| 4 |
-
<version>1.5.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="https://www.activecampaign.com/hosted/terms.php">Commercial/Free</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -14,13 +14,11 @@
|
|
| 14 |
3. Have existing customer account newsletter modifications updated in ActiveCampaign.
|
| 15 |

|
| 16 |
4. Bulk export/sync all current newsletter contacts to ActiveCampaign in just two clicks!</description>
|
| 17 |
-
<notes>
|
| 18 |
-

|
| 19 |
-
Also updated the ActiveCampaign PHP API wrapper files to the latest version.</notes>
|
| 20 |
<authors><author><name>ActiveCampaign, Inc.</name><user>activecampaign</user><email>help@activecampaign.com</email></author></authors>
|
| 21 |
-
<date>
|
| 22 |
-
<time>
|
| 23 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="825b33cd139c693c88047584959f49ed"/></dir><dir name="template"><dir name="subscriptions"><file name="grid.phtml" hash="5d13aea3c7e678f80aa7e72d5337ae9d"/><file name="list.phtml" hash="70c40a80ee43596da6ae899f14191e91"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="d0a96f68db976ce1919a664228184e9c"/></dir><dir name="template"><dir name="subscriptions"><file name="subscriptions.phtml" hash="2025758bce03d7b9cfe99029050c7be4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ActiveCampaign_Subscriptions.xml" hash="14eb3a0c9c06bc847b4e8c6ff691c07d"/></dir></target><target name="magecommunity"><dir name="ActiveCampaign"><dir name="Subscriptions"><dir name="activecampaign-api-php"><file name="Account.class.php" hash="b6426c518978bbfb4ae032cb6ddcc29c"/><file name="ActiveCampaign.class.php" hash="900f5ef0acd4af4105471feda2917aae"/><file name="Auth.class.php" hash="affc478ccf1622400409d8b623230183"/><file name="Campaign.class.php" hash="229ec1cb98add26450f38aa283f40e5f"/><file name="Connector.class.php" hash="6c6ae2daf963e4b8e1f941e73f94b8f0"/><file name="Design.class.php" hash="53104c2ee4f4d54577f385188ba8c9af"/><file name="Form.class.php" hash="2fe24b9e11057e55bb79221fa59a38a7"/><file name="Group.class.php" hash="4712367081b6099bc88440c7ac4c35d0"/><file name="List.class.php" hash="c451709386aaebabeef2d85422e3cf3f"/><file name="Message.class.php" hash="8c072e28994283d0ff7b950df55a6655"/><file name="Contact.class.php" hash="d19e57f06044b5dc98b929b449521a19"/><file name="User.class.php" hash="5a213c94cc6d2a9545856982a38ad26b"/><file name="Webhook.class.php" hash="2933f75823679abd5d178774c8d61682"
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>7.19.7</min><max>7.28.0</max></extension></required></dependencies>
|
| 26 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>ActiveCampaign_Subscriptions</name>
|
| 4 |
+
<version>1.5.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="https://www.activecampaign.com/hosted/terms.php">Commercial/Free</license>
|
| 7 |
<channel>community</channel>
|
| 14 |
3. Have existing customer account newsletter modifications updated in ActiveCampaign.
|
| 15 |

|
| 16 |
4. Bulk export/sync all current newsletter contacts to ActiveCampaign in just two clicks!</description>
|
| 17 |
+
<notes>Fix for ActiveCampaign contact being auto-unsubscribed shortly after subscribing.</notes>
|
|
|
|
|
|
|
| 18 |
<authors><author><name>ActiveCampaign, Inc.</name><user>activecampaign</user><email>help@activecampaign.com</email></author></authors>
|
| 19 |
+
<date>2016-07-25</date>
|
| 20 |
+
<time>20:43:25</time>
|
| 21 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="825b33cd139c693c88047584959f49ed"/></dir><dir name="template"><dir name="subscriptions"><file name="grid.phtml" hash="5d13aea3c7e678f80aa7e72d5337ae9d"/><file name="list.phtml" hash="70c40a80ee43596da6ae899f14191e91"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="d0a96f68db976ce1919a664228184e9c"/></dir><dir name="template"><dir name="subscriptions"><file name="subscriptions.phtml" hash="2025758bce03d7b9cfe99029050c7be4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ActiveCampaign_Subscriptions.xml" hash="14eb3a0c9c06bc847b4e8c6ff691c07d"/></dir></target><target name="magecommunity"><dir name="ActiveCampaign"><dir name="Subscriptions"><dir name="activecampaign-api-php"><file name="Account.class.php" hash="b6426c518978bbfb4ae032cb6ddcc29c"/><file name="ActiveCampaign.class.php" hash="900f5ef0acd4af4105471feda2917aae"/><file name="Auth.class.php" hash="affc478ccf1622400409d8b623230183"/><file name="Campaign.class.php" hash="229ec1cb98add26450f38aa283f40e5f"/><file name="Connector.class.php" hash="6c6ae2daf963e4b8e1f941e73f94b8f0"/><file name="Design.class.php" hash="53104c2ee4f4d54577f385188ba8c9af"/><file name="Form.class.php" hash="2fe24b9e11057e55bb79221fa59a38a7"/><file name="Group.class.php" hash="4712367081b6099bc88440c7ac4c35d0"/><file name="List.class.php" hash="c451709386aaebabeef2d85422e3cf3f"/><file name="Message.class.php" hash="8c072e28994283d0ff7b950df55a6655"/><file name="Contact.class.php" hash="d19e57f06044b5dc98b929b449521a19"/><file name="User.class.php" hash="5a213c94cc6d2a9545856982a38ad26b"/><file name="Webhook.class.php" hash="2933f75823679abd5d178774c8d61682"/></dir><dir name="Block"><file name="Subscriptions.php" hash="79b032b024a0593188258d4fef3fa733"/><dir name="Adminhtml"><file name="Subscriptions.php" hash="7f9fdec5858ef7a30c1fcd129f13fe67"/><dir name="Subscriptions"><file name="Edit.php" hash="3c464d71d1ad78ae035f810a1248f918"/><file name="Grid.php" hash="b51fc9698c21224488c41826489a8177"/><dir name="Edit"><file name="Form.php" hash="b1eda088b2adf03d69bc1aa3cfb2a00a"/><file name="Tabs.php" hash="4c94ebd27bb6bb0a572131d441afa945"/><dir name="Tab"><file name="Connection.php" hash="230d5a8f70b5de930864b25821290efb"/><file name="Export.php" hash="f65aa906629d6a1b4a17f16014488017"/><file name="List.php" hash="4f2cd4ca088cca5bb2ad1b598c9bc486"/><file name="Form.php" hash="8bf394482cf60f311b8610521888b0d8"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="f6e27a764745bdb55f17fdca49a7fa81"/><dir name="Adminhtml"><file name="SubscriptionsController.php" hash="edd787979ac83ea735f8c4cd61340c89"/></dir></dir><dir name="etc"><file name="config.xml" hash="40947886dd3611ebeb717de55ef8c240"/></dir><dir name="Helper"><file name="Data.php" hash="4b35d91431328ee595132df575a60a2a"/></dir><dir name="Model"><file name="Observer.php" hash="91aead63e3b6e7d4674b20eb5c2efe96"/><file name="Status.php" hash="c35feda8164009341d289074be5612c0"/><file name="Subscriptions.php" hash="76818326ecfd635e574f704003184300"/><dir name="Mysql4"><file name="Subscriptions.php" hash="d112b3f1194a8bb7f329dacb34161941"/><dir name="Subscriptions"><file name="Collection.php" hash="457890390bd29e72dda81d3088ef5a50"/></dir></dir></dir><dir name="sql"><dir name="subscriptions_setup"><file name="mysql4-install-0.1.0.php" hash="9f756eb38486cc878134f07f22f661c0"/></dir></dir></dir></dir></target></contents>
|
| 22 |
<compatible/>
|
| 23 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>7.19.7</min><max>7.28.0</max></extension></required></dependencies>
|
| 24 |
</package>
|
