PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 110731
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v110731
260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 All 189 releases
s2member / includes / menu-pages / api-ops.inc.php

api-ops.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 110731, at includes/menu-pages/api-ops.inc.php

935 lines 87.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Menu page for the s2Member plugin ( API Notifications page ).
4 *
5 * Copyright: © 2009-2011
6 * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7 * ( coded in the USA )
8 *
9 * Released under the terms of the GNU General Public License.
10 * You should have received a copy of the GNU General Public License,
11 * along with this software. In the main directory, see: /licensing/
12 * If not, see: {@link http://www.gnu.org/licenses/}.
13 *
14 * @package s2Member\Menu_Pages
15 * @since 3.0
16 */
17 if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18 exit ("Do not access this file directly.");
19 /**/
20 if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
21 {
22 /**
23 * Menu page for the s2Member plugin ( API Notifications page ).
24 *
25 * @package s2Member\Menu_Pages
26 * @since 110531
27 */
28 class c_ws_plugin__s2member_menu_page_api_ops
29 {
30 public function __construct ()
31 {
32 echo '<div class="wrap ws-menu-page">' . "\n";
33 /**/
34 echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
35 echo '<h2>s2Member® API / Notifications</h2>' . "\n";
36 /**/
37 echo '<table class="ws-menu-page-table">' . "\n";
38 echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
39 echo '<tr class="ws-menu-page-table-tr">' . "\n";
40 echo '<td class="ws-menu-page-table-l">' . "\n";
41 /**/
42 echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
43 echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-options-save")) . '" />' . "\n";
44 echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
45 /**/
46 do_action ("ws_plugin__s2member_during_api_ops_page_before_left_sections", get_defined_vars ());
47 /**/
48 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_signup_notifications", true, get_defined_vars ()))
49 {
50 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_signup_notifications", get_defined_vars ());
51 /**/
52 echo '<div class="ws-menu-page-group" title="Signup Notifications">' . "\n";
53 /**/
54 echo '<div class="ws-menu-page-section ws-plugin--s2member-signup-notifications-section">' . "\n";
55 echo '<h3>Signup Notification URLs ( optional )</h3>' . "\n";
56 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a new Subscription is created, you\'ll want to read this section. This is marked `Signup`, because the URLs that you list below, will be notified each time a "new" "paying" Member signs up. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription. This Notification will only be triggered once for each Member. Signup Notifications are sent right after a "new" Member signs up successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, this Notification is triggered anytime a "new" "paying" Member signs up, even if you provided them with a 100% Free Trial Period. However, this Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. In addition, this Notification will NOT be processed when an "existing" User/Member pays for a new Subscription <em>( see: Modification Notifications for that scenario )</em>. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Signup Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
57 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_signup_notifications", get_defined_vars ());
58 /**/
59 echo '<table class="form-table">' . "\n";
60 echo '<tbody>' . "\n";
61 echo '<tr>' . "\n";
62 /**/
63 echo '<th>' . "\n";
64 echo '<label for="ws-plugin--s2member-signup-notification-urls">' . "\n";
65 echo 'Signup Notification URLs:' . "\n";
66 echo '</label>' . "\n";
67 echo '</th>' . "\n";
68 /**/
69 echo '</tr>' . "\n";
70 echo '<tr>' . "\n";
71 /**/
72 echo '<td>' . "\n";
73 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
74 echo '<textarea name="ws_plugin__s2member_signup_notification_urls" id="ws-plugin--s2member-signup-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_urls"]) . '</textarea><br />' . "\n";
75 echo 'Signup Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
76 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
77 echo '<ul>' . "\n";
78 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
79 echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
80 echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
81 echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
82 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
83 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
84 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
85 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
86 echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
87 echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
88 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
89 echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
90 echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
91 echo '</ul>' . "\n";
92 /**/
93 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
94 echo '<ul>' . "\n";
95 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
96 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
97 echo '</ul>' . "\n";
98 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
99 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
100 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
101 /**/
102 echo '</td>' . "\n";
103 /**/
104 echo '</tr>' . "\n";
105 echo '</tbody>' . "\n";
106 echo '</table>' . "\n";
107 /**/
108 echo '<div class="ws-menu-page-hr"></div>' . "\n";
109 /**/
110 echo '<table class="form-table" style="margin-top:0;">' . "\n";
111 echo '<tbody>' . "\n";
112 echo '<tr>' . "\n";
113 /**/
114 echo '<th style="padding-top:0;">' . "\n";
115 echo '<label for="ws-plugin--s2member-signup-notification-recipients">' . "\n";
116 echo 'Send An Email Transaction Log Of This Event?' . "\n";
117 echo '</label>' . "\n";
118 echo '</th>' . "\n";
119 /**/
120 echo '</tr>' . "\n";
121 echo '<tr>' . "\n";
122 /**/
123 echo '<td>' . "\n";
124 echo '<input type="text" name="ws_plugin__s2member_signup_notification_recipients" id="ws-plugin--s2member-signup-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_recipients"]) . '" /><br />' . "\n";
125 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
126 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
127 echo '</td>' . "\n";
128 /**/
129 echo '</tr>' . "\n";
130 echo '</tbody>' . "\n";
131 echo '</table>' . "\n";
132 echo '</div>' . "\n";
133 /**/
134 echo '</div>' . "\n";
135 }
136 /**/
137 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_registration_notifications", true, get_defined_vars ()))
138 {
139 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_registration_notifications", get_defined_vars ());
140 /**/
141 echo '<div class="ws-menu-page-group" title="Registration Notifications">' . "\n";
142 /**/
143 echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-notifications-section">' . "\n";
144 echo '<h3>Registration Notification URLs ( optional )</h3>' . "\n";
145 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a "new" Member is created, you\'ll want to read this section. This is marked `Registration`, because the URLs that you list below, will be notified each time a "new" Member registers a Username. This is usually triggered right after a `Signup` Notification; at the point in which a "new" Member successfully completes the Registration form, and they are assigned a Username. However, this is ALSO triggered whenever you create a "new" User inside your WordPress® Dashboard. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Registration Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
146 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_registration_notifications", get_defined_vars ());
147 /**/
148 echo '<table class="form-table">' . "\n";
149 echo '<tbody>' . "\n";
150 echo '<tr>' . "\n";
151 /**/
152 echo '<th>' . "\n";
153 echo '<label for="ws-plugin--s2member-registration-notification-urls">' . "\n";
154 echo 'Registration Notification URLs:' . "\n";
155 echo '</label>' . "\n";
156 echo '</th>' . "\n";
157 /**/
158 echo '</tr>' . "\n";
159 echo '<tr>' . "\n";
160 /**/
161 echo '<td>' . "\n";
162 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
163 echo '<textarea name="ws_plugin__s2member_registration_notification_urls" id="ws-plugin--s2member-registration-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_urls"]) . '</textarea><br />' . "\n";
164 echo 'Registration Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
165 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
166 echo '<ul>' . "\n";
167 echo '<li><code>%%role%%</code> = The Role ID <code>( subscriber, s2member_level[0-9]+, administrator, editor, author, contributor )</code>.</li>' . "\n";
168 echo '<li><code>%%level%%</code> = The Level number <code>( 0, 1, 2, 3, 4 )</code>. ( <em>deprecated, no longer recommended; use <code>%%role%%</code></em> )</li>' . "\n";
169 echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> ( <em>in comma-delimited format</em> ).</li>' . "\n";
170 echo '<li><code>%%auto_eot_time%%</code> = Auto-EOT Time ( if applicable ). Ex: <code>1299925670</code> ( <em>unix timestamp</em> ).</li>' . "\n";
171 echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
172 echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
173 echo '<li><code>%%user_full_name%%</code> = The Full Name ( First &amp; Last ) of the Member who registered their Username.</li>' . "\n";
174 echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
175 echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
176 echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
177 echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
178 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID generated during registration.</li>' . "\n";
179 echo '</ul>' . "\n";
180 /**/
181 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
182 echo '<ul>' . "\n";
183 echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
184 echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
185 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
186 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
187 echo '</ul>' . "\n";
188 /**/
189 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
190 echo '<ul>' . "\n";
191 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
192 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
193 echo '</ul>' . "\n";
194 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
195 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
196 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
197 /**/
198 echo '</td>' . "\n";
199 /**/
200 echo '</tr>' . "\n";
201 echo '</tbody>' . "\n";
202 echo '</table>' . "\n";
203 /**/
204 echo '<div class="ws-menu-page-hr"></div>' . "\n";
205 /**/
206 echo '<table class="form-table" style="margin-top:0;">' . "\n";
207 echo '<tbody>' . "\n";
208 echo '<tr>' . "\n";
209 /**/
210 echo '<th style="padding-top:0;">' . "\n";
211 echo '<label for="ws-plugin--s2member-registration-notification-recipients">' . "\n";
212 echo 'Send An Email Transaction Log Of This Event?' . "\n";
213 echo '</label>' . "\n";
214 echo '</th>' . "\n";
215 /**/
216 echo '</tr>' . "\n";
217 echo '<tr>' . "\n";
218 /**/
219 echo '<td>' . "\n";
220 echo '<input type="text" name="ws_plugin__s2member_registration_notification_recipients" id="ws-plugin--s2member-registration-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) . '" /><br />' . "\n";
221 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
222 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
223 echo '</td>' . "\n";
224 /**/
225 echo '</tr>' . "\n";
226 echo '</tbody>' . "\n";
227 echo '</table>' . "\n";
228 echo '</div>' . "\n";
229 /**/
230 echo '</div>' . "\n";
231 /**/
232 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_registration_notifications", get_defined_vars ());
233 }
234 /**/
235 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_payment_notifications", true, get_defined_vars ()))
236 {
237 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_payment_notifications", get_defined_vars ());
238 /**/
239 echo '<div class="ws-menu-page-group" title="Payment Notifications">' . "\n";
240 /**/
241 echo '<div class="ws-menu-page-section ws-plugin--s2member-payment-notifications-section">' . "\n";
242 echo '<h3>Payment Notification URLs ( optional )</h3>' . "\n";
243 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever payment transactions <em>( including Recurring Payments )</em> take place, you\'ll want to read this section. This is marked `Payment`, because the URLs that you list below, will be notified each time an actual payment occurs. Depending on your fee structure, this may include a first Initial Payment that establishes a Subscription. But more importantly, this will be triggered on all future payments that are received for the lifetime of the Subscription. So unlike the `Signup` Notification, `Payment` Notifications take place whenever actual payments are received, instead of just once after signup is completed. If a payment is required during signup <em>( i.e. no Free Trial is being offered )</em>, a Signup Notification will be triggered, and a Payment Notification will ALSO be triggered. In other words, a Payment Notification occurs anytime funds are received, no matter what. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Payment Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
244 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_payment_notifications", get_defined_vars ());
245 /**/
246 echo '<table class="form-table">' . "\n";
247 echo '<tbody>' . "\n";
248 echo '<tr>' . "\n";
249 /**/
250 echo '<th>' . "\n";
251 echo '<label for="ws-plugin--s2member-payment-notification-urls">' . "\n";
252 echo 'Payment Notification URLs:' . "\n";
253 echo '</label>' . "\n";
254 echo '</th>' . "\n";
255 /**/
256 echo '</tr>' . "\n";
257 echo '<tr>' . "\n";
258 /**/
259 echo '<td>' . "\n";
260 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
261 echo '<textarea name="ws_plugin__s2member_payment_notification_urls" id="ws-plugin--s2member-payment-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_urls"]) . '</textarea><br />' . "\n";
262 echo 'Payment Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
263 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
264 echo '<ul>' . "\n";
265 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the payment.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
266 echo '<li><code>%%txn_id%%</code> = The Payment Transaction ID, which is always unique for each payment received.</li>' . "\n";
267 echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
268 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
269 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
270 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
271 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
272 echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the payment is for.</li>' . "\n";
273 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
274 echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
275 echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
276 echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
277 echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
278 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
279 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
280 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
281 echo '</ul>' . "\n";
282 /**/
283 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
284 echo '<ul>' . "\n";
285 echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
286 echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
287 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
288 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
289 echo '</ul>' . "\n";
290 /**/
291 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
292 echo '<ul>' . "\n";
293 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
294 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
295 echo '</ul>' . "\n";
296 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
297 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
298 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
299 /**/
300 echo '</td>' . "\n";
301 /**/
302 echo '</tr>' . "\n";
303 echo '</tbody>' . "\n";
304 echo '</table>' . "\n";
305 /**/
306 echo '<div class="ws-menu-page-hr"></div>' . "\n";
307 /**/
308 echo '<table class="form-table" style="margin-top:0;">' . "\n";
309 echo '<tbody>' . "\n";
310 echo '<tr>' . "\n";
311 /**/
312 echo '<th style="padding-top:0;">' . "\n";
313 echo '<label for="ws-plugin--s2member-payment-notification-recipients">' . "\n";
314 echo 'Send An Email Transaction Log Of This Event?' . "\n";
315 echo '</label>' . "\n";
316 echo '</th>' . "\n";
317 /**/
318 echo '</tr>' . "\n";
319 echo '<tr>' . "\n";
320 /**/
321 echo '<td>' . "\n";
322 echo '<input type="text" name="ws_plugin__s2member_payment_notification_recipients" id="ws-plugin--s2member-payment-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_recipients"]) . '" /><br />' . "\n";
323 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
324 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
325 echo '</td>' . "\n";
326 /**/
327 echo '</tr>' . "\n";
328 echo '</tbody>' . "\n";
329 echo '</table>' . "\n";
330 echo '</div>' . "\n";
331 /**/
332 echo '</div>' . "\n";
333 /**/
334 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_payment_notifications", get_defined_vars ());
335 }
336 /**/
337 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_modification_notifications", true, get_defined_vars ()))
338 {
339 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_modification_notifications", get_defined_vars ());
340 /**/
341 echo '<div class="ws-menu-page-group" title="Modification Notifications">' . "\n";
342 /**/
343 echo '<div class="ws-menu-page-section ws-plugin--s2member-modification-notifications-section">' . "\n";
344 echo '<h3>Modification Notification URLs ( optional )</h3>' . "\n";
345 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a new Subscription is created by an "existing" User/Member, or an "existing" Member modifies their paid Subscription terms, you\'ll want to read this section. This is marked `Modification`, because the URLs that you list below, will be notified each time an "existing" User/Member signs up for a paid Subscription <em>( i.e. a Modification takes place against an existing account )</em>, or an "existing" Member modifies their paid Subscription terms <em>( again, a Modification takes places against an existing account )</em>. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription. Modification Notifications are sent right after a Member signs up and/or modifies billing terms successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, this Notification is triggered, even if you provided them with a 100% Free Trial Period. However, this Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. In addition, this Notification will NOT be processed for "new" Users/Members <em>( see: Signup Notifications for that scenario )</em>. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Modification Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
346 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_modification_notifications", get_defined_vars ());
347 /**/
348 echo '<table class="form-table">' . "\n";
349 echo '<tbody>' . "\n";
350 echo '<tr>' . "\n";
351 /**/
352 echo '<th>' . "\n";
353 echo '<label for="ws-plugin--s2member-modification-notification-urls">' . "\n";
354 echo 'Modification Notification URLs:' . "\n";
355 echo '</label>' . "\n";
356 echo '</th>' . "\n";
357 /**/
358 echo '</tr>' . "\n";
359 echo '<tr>' . "\n";
360 /**/
361 echo '<td>' . "\n";
362 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
363 echo '<textarea name="ws_plugin__s2member_modification_notification_urls" id="ws-plugin--s2member-modification-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["modification_notification_urls"]) . '</textarea><br />' . "\n";
364 echo 'Modification Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
365 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
366 echo '<ul>' . "\n";
367 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
368 echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
369 echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
370 echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
371 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
372 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
373 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
374 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
375 echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
376 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
377 echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
378 echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
379 echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
380 echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
381 echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
382 echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
383 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
384 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
385 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
386 echo '</ul>' . "\n";
387 /**/
388 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
389 echo '<ul>' . "\n";
390 echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
391 echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
392 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
393 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
394 echo '</ul>' . "\n";
395 /**/
396 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
397 echo '<ul>' . "\n";
398 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
399 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
400 echo '</ul>' . "\n";
401 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
402 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
403 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
404 /**/
405 echo '</td>' . "\n";
406 /**/
407 echo '</tr>' . "\n";
408 echo '</tbody>' . "\n";
409 echo '</table>' . "\n";
410 /**/
411 echo '<div class="ws-menu-page-hr"></div>' . "\n";
412 /**/
413 echo '<table class="form-table" style="margin-top:0;">' . "\n";
414 echo '<tbody>' . "\n";
415 echo '<tr>' . "\n";
416 /**/
417 echo '<th style="padding-top:0;">' . "\n";
418 echo '<label for="ws-plugin--s2member-modification-notification-recipients">' . "\n";
419 echo 'Send An Email Transaction Log Of This Event?' . "\n";
420 echo '</label>' . "\n";
421 echo '</th>' . "\n";
422 /**/
423 echo '</tr>' . "\n";
424 echo '<tr>' . "\n";
425 /**/
426 echo '<td>' . "\n";
427 echo '<input type="text" name="ws_plugin__s2member_modification_notification_recipients" id="ws-plugin--s2member-modification-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["modification_notification_recipients"]) . '" /><br />' . "\n";
428 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
429 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
430 echo '</td>' . "\n";
431 /**/
432 echo '</tr>' . "\n";
433 echo '</tbody>' . "\n";
434 echo '</table>' . "\n";
435 echo '</div>' . "\n";
436 /**/
437 echo '</div>' . "\n";
438 }
439 /**/
440 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_cancellation_notifications", true, get_defined_vars ()))
441 {
442 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_cancellation_notifications", get_defined_vars ());
443 /**/
444 echo '<div class="ws-menu-page-group" title="Cancellation Notifications">' . "\n";
445 /**/
446 echo '<div class="ws-menu-page-section ws-plugin--s2member-cancellation-notifications-section">' . "\n";
447 echo '<h3>Cancellation Notification URLs ( optional )</h3>' . "\n";
448 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Subscriptions are cancelled through your Payment Gateway, you\'ll want to read this section. This is marked `Cancellation`, because the URLs that you list below, will be notified each time a Subscription is cancelled. A Cancellation is triggered when you cancel a Customer\'s Subscription through your Payment Gateway, or when a Customer cancels their own Subscription. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Cancellation Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
449 echo '<p><em><strong>*Understanding Cancellations*</strong> It\'s important to realize that a Cancellation is not an EOT ( End Of Term ). All that happens during a Cancellation event, is that billing is stopped, and it\'s understood that the Customer is going to lose access, at some point in the future. This does NOT mean, that access will be revoked immediately. A separate EOT event will automatically handle a (demotion or deletion) later, at the appropriate time; which could be several days, or even a year after the Cancellation took place.</em></p>' . "\n";
450 echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through your Payment Gateway... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member. s2Member will not process an EOT ( End Of Term ) until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
451 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_cancellation_notifications", get_defined_vars ());
452 /**/
453 echo '<table class="form-table">' . "\n";
454 echo '<tbody>' . "\n";
455 echo '<tr>' . "\n";
456 /**/
457 echo '<th>' . "\n";
458 echo '<label for="ws-plugin--s2member-cancellation-notification-urls">' . "\n";
459 echo 'Cancellation Notification URLs:' . "\n";
460 echo '</label>' . "\n";
461 echo '</th>' . "\n";
462 /**/
463 echo '</tr>' . "\n";
464 echo '<tr>' . "\n";
465 /**/
466 echo '<td>' . "\n";
467 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
468 echo '<textarea name="ws_plugin__s2member_cancellation_notification_urls" id="ws-plugin--s2member-cancellation-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_urls"]) . '</textarea><br />' . "\n";
469 echo 'Cancellation Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
470 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
471 echo '<ul>' . "\n";
472 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remained constant throughout the lifetime of the Membership. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the original Transaction ID for the purchase.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there was only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
473 echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <em>level:custom_capabilities:fixed term</em> ) that the Subscription was for.</li>' . "\n";
474 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
475 echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
476 echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
477 echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
478 echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
479 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
480 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
481 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
482 echo '</ul>' . "\n";
483 /**/
484 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
485 echo '<ul>' . "\n";
486 echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
487 echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
488 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
489 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
490 echo '</ul>' . "\n";
491 /**/
492 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
493 echo '<ul>' . "\n";
494 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
495 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
496 echo '</ul>' . "\n";
497 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
498 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
499 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
500 /**/
501 echo '</td>' . "\n";
502 /**/
503 echo '</tr>' . "\n";
504 echo '</tbody>' . "\n";
505 echo '</table>' . "\n";
506 /**/
507 echo '<div class="ws-menu-page-hr"></div>' . "\n";
508 /**/
509 echo '<table class="form-table" style="margin-top:0;">' . "\n";
510 echo '<tbody>' . "\n";
511 echo '<tr>' . "\n";
512 /**/
513 echo '<th style="padding-top:0;">' . "\n";
514 echo '<label for="ws-plugin--s2member-cancellation-notification-recipients">' . "\n";
515 echo 'Send An Email Transaction Log Of This Event?' . "\n";
516 echo '</label>' . "\n";
517 echo '</th>' . "\n";
518 /**/
519 echo '</tr>' . "\n";
520 echo '<tr>' . "\n";
521 /**/
522 echo '<td>' . "\n";
523 echo '<input type="text" name="ws_plugin__s2member_cancellation_notification_recipients" id="ws-plugin--s2member-cancellation-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_recipients"]) . '" /><br />' . "\n";
524 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
525 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
526 echo '</td>' . "\n";
527 /**/
528 echo '</tr>' . "\n";
529 echo '</tbody>' . "\n";
530 echo '</table>' . "\n";
531 echo '</div>' . "\n";
532 /**/
533 echo '</div>' . "\n";
534 /**/
535 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_cancellation_notifications", get_defined_vars ());
536 }
537 /**/
538 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_eot_deletion_notifications", true, get_defined_vars ()))
539 {
540 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_eot_deletion_notifications", get_defined_vars ());
541 /**/
542 echo '<div class="ws-menu-page-group" title="EOT/Deletion Notifications">' . "\n";
543 /**/
544 echo '<div class="ws-menu-page-section ws-plugin--s2member-eot-deletion-notifications-section">' . "\n";
545 echo '<h3>EOT/Deletion Notification URLs ( optional )</h3>' . "\n";
546 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Subscriptions have ended <em>( and a Member is demoted to a Free Subscriber )</em>, or when an account is deleted from the system, you\'ll want to read this section. This is marked `EOT/Deletion`, because the URLs that you list below, will be notified in both cases. EOT = End Of Term. An EOT is triggered <em>immediately</em> when you refund a Customer, when a Customer forces a chargeback to occur, or when a paid Subscription ends naturally <em>( i.e. expires )</em>, and your Payment Gateway sends s2Member an EOT ( End Of Term ) response. Delayed EOTs occur after a Cancellation, either as a result of you cancelling a Customer\'s Subscription, or a Customer cancelling their own Subscription. A Cancellation usually results in a delayed EOT, because a Cancellation does NOT always warrant an immediate action; there could still be time left on their Subscription.</p>' . "\n";
547 echo '<p>Manual Deletions will trigger an immediate Notification. If you delete an account manually from within your WordPress® Dashboard, your URLs can be notified automatically through this system. So the two events are an EOT and/or a Manual Deletion. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These EOT/Deletion Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
548 echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through your Payment Gateway... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member. s2Member will not process an EOT ( End Of Term ) until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
549 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_eot_deletion_notifications", get_defined_vars ());
550 /**/
551 echo '<table class="form-table">' . "\n";
552 echo '<tbody>' . "\n";
553 echo '<tr>' . "\n";
554 /**/
555 echo '<th>' . "\n";
556 echo '<label for="ws-plugin--s2member-eot-del-notification-urls">' . "\n";
557 echo 'EOT/Deletion Notification URLs:' . "\n";
558 echo '</label>' . "\n";
559 echo '</th>' . "\n";
560 /**/
561 echo '</tr>' . "\n";
562 echo '<tr>' . "\n";
563 /**/
564 echo '<td>' . "\n";
565 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
566 echo '<textarea name="ws_plugin__s2member_eot_del_notification_urls" id="ws-plugin--s2member-eot-del-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_urls"]) . '</textarea><br />' . "\n";
567 echo 'EOT/Deletion Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
568 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
569 echo '<ul>' . "\n";
570 echo '<li><code>%%eot_del_type%%</code> = The type of event that triggered this Notification. [ <a href="#" onclick="alert(\'List of possible values:\\n\\nuser-removal-deletion ( i.e. manual removal/deletion )\\nauto-eot-cancellation-expiration-demotion\\nauto-eot-cancellation-expiration-deletion\\nipn-cancellation-expiration-demotion\\nipn-cancellation-expiration-deletion\\nipn-refund-reversal-demotion\\nipn-refund-reversal-deletion\'); return false;">list of possible values</a> ]</li>' . "\n";
571 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remained constant throughout the lifetime of the Membership. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the original Transaction ID for the purchase.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there was only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
572 echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
573 echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
574 echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
575 echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
576 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
577 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
578 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
579 echo '</ul>' . "\n";
580 /**/
581 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
582 echo '<ul>' . "\n";
583 echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
584 echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
585 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
586 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
587 echo '</ul>' . "\n";
588 /**/
589 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
590 echo '<ul>' . "\n";
591 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
592 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
593 echo '</ul>' . "\n";
594 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
595 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
596 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
597 /**/
598 echo '</td>' . "\n";
599 /**/
600 echo '</tr>' . "\n";
601 echo '</tbody>' . "\n";
602 echo '</table>' . "\n";
603 /**/
604 echo '<div class="ws-menu-page-hr"></div>' . "\n";
605 /**/
606 echo '<table class="form-table" style="margin-top:0;">' . "\n";
607 echo '<tbody>' . "\n";
608 echo '<tr>' . "\n";
609 /**/
610 echo '<th style="padding-top:0;">' . "\n";
611 echo '<label for="ws-plugin--s2member-eot-del-notification-recipients">' . "\n";
612 echo 'Send An Email Transaction Log Of This Event?' . "\n";
613 echo '</label>' . "\n";
614 echo '</th>' . "\n";
615 /**/
616 echo '</tr>' . "\n";
617 echo '<tr>' . "\n";
618 /**/
619 echo '<td>' . "\n";
620 echo '<input type="text" name="ws_plugin__s2member_eot_del_notification_recipients" id="ws-plugin--s2member-eot-del-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_recipients"]) . '" /><br />' . "\n";
621 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
622 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
623 echo '</td>' . "\n";
624 /**/
625 echo '</tr>' . "\n";
626 echo '</tbody>' . "\n";
627 echo '</table>' . "\n";
628 echo '</div>' . "\n";
629 /**/
630 echo '</div>' . "\n";
631 /**/
632 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_eot_deletion_notifications", get_defined_vars ());
633 }
634 /**/
635 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_refund_reversal_notifications", true, get_defined_vars ()))
636 {
637 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_refund_reversal_notifications", get_defined_vars ());
638 /**/
639 echo '<div class="ws-menu-page-group" title="Refund/Reversal Notifications">' . "\n";
640 /**/
641 echo '<div class="ws-menu-page-section ws-plugin--s2member-refund-reversal-notifications-section">' . "\n";
642 echo '<h3>Refund/Reversal Notification URLs ( optional )</h3>' . "\n";
643 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Subscriptions have been refunded or reversed <em>( i.e. charged back to you )</em>, you\'ll want to read this section. This is marked `Refund/Reversal`, because the URLs that you list below, will ONLY be notified in those specific cases, as opposed to the EOT Notifications, which are all-inclusive. This is very similar to the EOT/Deletion described above. But, there is an important distinction. EOT includes cancellations, expirations, failed payments, refunds, chargebacks, etc, etc. In other words, ANY time a deletion or End Of Term action takes place.</p>' . "\n";
644 echo '<p>So the distinction is that Refund/Reversal Notifications are ONLY sent under two specific circumstances: 1. You log into your Payment Gateway and refund a payment that is associated with a Subscription. 2. The Customer complains to your Payment Gateway and a chargeback occurs, forcing a Reversal. In both of these cases, an EOT/Deletion Notification will be sent <em>( as described in the previous section )</em>, but since EOT/Deletion is a broader Notification, these Refund/Reversal Notifications are here so you can nail down specific back-office operations in these two specific scenarios. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Refund/Reversal Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
645 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_refund_reversal_notifications", get_defined_vars ());
646 /**/
647 echo '<table class="form-table">' . "\n";
648 echo '<tbody>' . "\n";
649 echo '<tr>' . "\n";
650 /**/
651 echo '<th>' . "\n";
652 echo '<label for="ws-plugin--s2member-ref-rev-notification-urls">' . "\n";
653 echo 'Refund/Reversal Notification URLs:' . "\n";
654 echo '</label>' . "\n";
655 echo '</th>' . "\n";
656 /**/
657 echo '</tr>' . "\n";
658 echo '<tr>' . "\n";
659 /**/
660 echo '<td>' . "\n";
661 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
662 echo '<textarea name="ws_plugin__s2member_ref_rev_notification_urls" id="ws-plugin--s2member-ref-rev-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["ref_rev_notification_urls"]) . '</textarea><br />' . "\n";
663 echo 'Refund/Reversal Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
664 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
665 echo '<ul>' . "\n";
666 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remained constant throughout the lifetime of the Membership. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the original Transaction ID for the purchase.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there was only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
667 echo '<li><code>%%parent_txn_id%%</code> = The Parent Transaction ID, associated with the original payment being refunded/reversed.</li>' . "\n";
668 echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
669 echo '<li><code>%%-fee%%</code> = The Negative Payment Gateway fee, that was refunded back to you as the Merchant/Seller.</li>' . "\n";
670 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
671 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
672 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
673 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
674 echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <em>level:custom_capabilities:fixed term</em> ) that the payment was for.</li>' . "\n";
675 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
676 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
677 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
678 echo '</ul>' . "\n";
679 /**/
680 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
681 echo '<ul>' . "\n";
682 echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
683 echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
684 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
685 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
686 echo '</ul>' . "\n";
687 /**/
688 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
689 echo '<ul>' . "\n";
690 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
691 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
692 echo '</ul>' . "\n";
693 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
694 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
695 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
696 /**/
697 echo '</td>' . "\n";
698 /**/
699 echo '</tr>' . "\n";
700 echo '</tbody>' . "\n";
701 echo '</table>' . "\n";
702 /**/
703 echo '<div class="ws-menu-page-hr"></div>' . "\n";
704 /**/
705 echo '<table class="form-table" style="margin-top:0;">' . "\n";
706 echo '<tbody>' . "\n";
707 echo '<tr>' . "\n";
708 /**/
709 echo '<th style="padding-top:0;">' . "\n";
710 echo '<label for="ws-plugin--s2member-ref-rev-notification-recipients">' . "\n";
711 echo 'Send An Email Transaction Log Of This Event?' . "\n";
712 echo '</label>' . "\n";
713 echo '</th>' . "\n";
714 /**/
715 echo '</tr>' . "\n";
716 echo '<tr>' . "\n";
717 /**/
718 echo '<td>' . "\n";
719 echo '<input type="text" name="ws_plugin__s2member_ref_rev_notification_recipients" id="ws-plugin--s2member-ref-rev-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["ref_rev_notification_recipients"]) . '" /><br />' . "\n";
720 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
721 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
722 echo '</td>' . "\n";
723 /**/
724 echo '</tr>' . "\n";
725 echo '</tbody>' . "\n";
726 echo '</table>' . "\n";
727 echo '</div>' . "\n";
728 /**/
729 echo '</div>' . "\n";
730 /**/
731 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_refund_reversal_notifications", get_defined_vars ());
732 }
733 /**/
734 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_sp_sale_notifications", true, get_defined_vars ()))
735 {
736 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_sp_sale_notifications", get_defined_vars ());
737 /**/
738 echo '<div class="ws-menu-page-group" title="Specific Post/Page ~ Sale Notifications">' . "\n";
739 /**/
740 echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-sale-notifications-section">' . "\n";
741 echo '<h3>Specific Post/Page ~ Sale Notification URLs ( optional )</h3>' . "\n";
742 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Specific Post/Page sales take place, you\'ll want to read this section. This is marked `Specific Post/Page`, because the URLs that you list below, will be notified each time a payment occurs, on a sale providing access to a Specific Post/Page. This is one of only TWO Notifications that are sent for Specific Post/Page Access <em>( i.e. this one, and another below - for Refunds/Reversals )</em>. All of the other API Notifications are designed for Membership Level Access. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Sale Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
743 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_sp_sale_notifications", get_defined_vars ());
744 /**/
745 echo '<table class="form-table">' . "\n";
746 echo '<tbody>' . "\n";
747 echo '<tr>' . "\n";
748 /**/
749 echo '<th>' . "\n";
750 echo '<label for="ws-plugin--s2member-sp-sale-notification-urls">' . "\n";
751 echo 'Specific Post/Page ~ Sale Notification URLs:' . "\n";
752 echo '</label>' . "\n";
753 echo '</th>' . "\n";
754 /**/
755 echo '</tr>' . "\n";
756 echo '<tr>' . "\n";
757 /**/
758 echo '<td>' . "\n";
759 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
760 echo '<textarea name="ws_plugin__s2member_sp_sale_notification_urls" id="ws-plugin--s2member-sp-sale-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_urls"]) . '</textarea><br />' . "\n";
761 echo 'Specific Post/Page ~ Sale Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
762 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
763 echo '<ul>' . "\n";
764 echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by s2Member ) where the Customer can gain access.</li>' . "\n";
765 echo '<li><code>%%sp_access_exp%%</code> = Human readable expiration for <code>%%sp_access_url%%</code>. Ex: <em>( link expires in <code>%%sp_access_exp%%</code> )</em>.</li>' . "\n";
766 echo '<li><code>%%txn_id%%</code> = The Paid Transaction ID. Payment Gateways assign a unique identifier for every purchase.</li>' . "\n";
767 echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
768 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
769 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
770 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
771 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
772 echo '<li><code>%%user_ip%%</code> = The Customers\'s IP Address, during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
773 echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
774 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
775 echo '</ul>' . "\n";
776 /**/
777 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
778 echo '<ul>' . "\n";
779 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
780 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
781 echo '</ul>' . "\n";
782 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
783 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
784 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
785 /**/
786 echo '</td>' . "\n";
787 /**/
788 echo '</tr>' . "\n";
789 echo '</tbody>' . "\n";
790 echo '</table>' . "\n";
791 /**/
792 echo '<div class="ws-menu-page-hr"></div>' . "\n";
793 /**/
794 echo '<table class="form-table" style="margin-top:0;">' . "\n";
795 echo '<tbody>' . "\n";
796 echo '<tr>' . "\n";
797 /**/
798 echo '<th style="padding-top:0;">' . "\n";
799 echo '<label for="ws-plugin--s2member-sp-sale-notification-recipients">' . "\n";
800 echo 'Send An Email Transaction Log Of This Event?' . "\n";
801 echo '</label>' . "\n";
802 echo '</th>' . "\n";
803 /**/
804 echo '</tr>' . "\n";
805 echo '<tr>' . "\n";
806 /**/
807 echo '<td>' . "\n";
808 echo '<input type="text" name="ws_plugin__s2member_sp_sale_notification_recipients" id="ws-plugin--s2member-sp-sale-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_recipients"]) . '" /><br />' . "\n";
809 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
810 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
811 echo '</td>' . "\n";
812 /**/
813 echo '</tr>' . "\n";
814 echo '</tbody>' . "\n";
815 echo '</table>' . "\n";
816 echo '</div>' . "\n";
817 /**/
818 echo '</div>' . "\n";
819 /**/
820 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_sp_sale_notifications", get_defined_vars ());
821 }
822 /**/
823 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_sp_refund_reversal_notifications", true, get_defined_vars ()))
824 {
825 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_sp_refund_reversal_notifications", get_defined_vars ());
826 /**/
827 echo '<div class="ws-menu-page-group" title="Specific Post/Page ~ Refund/Reversal Notifications">' . "\n";
828 /**/
829 echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-refund-reversal-notifications-section">' . "\n";
830 echo '<h3>Specific Post/Page ~ Refund/Reversal Notification URLs ( optional )</h3>' . "\n";
831 echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever sales have been refunded or reversed <em>( i.e. charged back to you )</em>, you\'ll want to read this section. This is marked `Specific Post/Page`, because the URLs that you list below, will be notified each time a Refund or Reversal occurs, on a sale that provided access to a Specific Post/Page. This is one of ONLY two Notifications that are sent for Specific Post/Page Access <em>( i.e. this one, and another above - for Sales )</em>. All of the other API Notifications are designed for Membership Level Access. Please note, this feature is not to be confused with the PayPal® IPN service. PayPal® IPN <em>( and other service integrations )</em> are already built into s2Member. They remain active at all times. These Refund/Reversal Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
832 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_sp_refund_reversal_notifications", get_defined_vars ());
833 /**/
834 echo '<table class="form-table">' . "\n";
835 echo '<tbody>' . "\n";
836 echo '<tr>' . "\n";
837 /**/
838 echo '<th>' . "\n";
839 echo '<label for="ws-plugin--s2member-sp-ref-rev-notification-urls">' . "\n";
840 echo 'Specific Post/Page ~ Refund/Reversal Notification URLs:' . "\n";
841 echo '</label>' . "\n";
842 echo '</th>' . "\n";
843 /**/
844 echo '</tr>' . "\n";
845 echo '<tr>' . "\n";
846 /**/
847 echo '<td>' . "\n";
848 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
849 echo '<textarea name="ws_plugin__s2member_sp_ref_rev_notification_urls" id="ws-plugin--s2member-sp-ref-rev-notification-urls" rows="3" wrap="off">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_ref_rev_notification_urls"]) . '</textarea><br />' . "\n";
850 echo 'Specific Post/Page ~ Refund/Reversal Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
851 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
852 echo '<ul>' . "\n";
853 echo '<li><code>%%parent_txn_id%%</code> = The Parent Transaction ID, associated with the original payment being refunded/reversed.</li>' . "\n";
854 echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
855 echo '<li><code>%%-fee%%</code> = The Negative Payment Gateway fee, that was refunded back to you as the Merchant/Seller.</li>' . "\n";
856 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
857 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
858 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
859 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
860 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
861 echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
862 echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
863 echo '</ul>' . "\n";
864 /**/
865 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
866 echo '<ul>' . "\n";
867 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
868 echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
869 echo '</ul>' . "\n";
870 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
871 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
872 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
873 /**/
874 echo '</td>' . "\n";
875 /**/
876 echo '</tr>' . "\n";
877 echo '</tbody>' . "\n";
878 echo '</table>' . "\n";
879 /**/
880 echo '<div class="ws-menu-page-hr"></div>' . "\n";
881 /**/
882 echo '<table class="form-table" style="margin-top:0;">' . "\n";
883 echo '<tbody>' . "\n";
884 echo '<tr>' . "\n";
885 /**/
886 echo '<th style="padding-top:0;">' . "\n";
887 echo '<label for="ws-plugin--s2member-sp-ref-rev-notification-recipients">' . "\n";
888 echo 'Send An Email Transaction Log Of This Event?' . "\n";
889 echo '</label>' . "\n";
890 echo '</th>' . "\n";
891 /**/
892 echo '</tr>' . "\n";
893 echo '<tr>' . "\n";
894 /**/
895 echo '<td>' . "\n";
896 echo '<input type="text" name="ws_plugin__s2member_sp_ref_rev_notification_recipients" id="ws-plugin--s2member-sp-ref-rev-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_ref_rev_notification_recipients"]) . '" /><br />' . "\n";
897 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
898 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
899 echo '</td>' . "\n";
900 /**/
901 echo '</tr>' . "\n";
902 echo '</tbody>' . "\n";
903 echo '</table>' . "\n";
904 echo '</div>' . "\n";
905 /**/
906 echo '</div>' . "\n";
907 /**/
908 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_sp_refund_reversal_notifications", get_defined_vars ());
909 }
910 /**/
911 do_action ("ws_plugin__s2member_during_api_ops_page_after_left_sections", get_defined_vars ());
912 /**/
913 echo '<div class="ws-menu-page-hr"></div>' . "\n";
914 /**/
915 echo '<p class="submit"><input type="submit" class="button-primary" value="Save All Changes" /></p>' . "\n";
916 /**/
917 echo '</form>' . "\n";
918 /**/
919 echo '</td>' . "\n";
920 /**/
921 echo '<td class="ws-menu-page-table-r">' . "\n";
922 c_ws_plugin__s2member_menu_pages_rs::display ();
923 echo '</td>' . "\n";
924 /**/
925 echo '</tr>' . "\n";
926 echo '</tbody>' . "\n";
927 echo '</table>' . "\n";
928 /**/
929 echo '</div>' . "\n";
930 }
931 }
932 }
933 /**/
934 new c_ws_plugin__s2member_menu_page_api_ops ();
935 ?>