PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 110815
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v110815
260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 120219 All 188 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 110815, at includes/menu-pages/api-ops.inc.php

956 lines 91.7 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, or it may not. This Notification will only be triggered once for each Member. Signup Notifications are sent right after a "new", "paying" 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 through your Payment Gateway, even if you provided them with a 100% Free Trial Period <em>( e.g. no money is being transacted intially )</em>.</p>' . "\n";
57 echo '<p>This Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. This Notification will NOT be processed when an "existing" User/Member pays for a new Subscription <em>( see: Modification Notifications for that scenario )</em>.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' And, this Notification will NOT be processed on Buy Now transactions for Independent Custom Capabilities <em>( see: Payment Notifications for that scenario )</em>.') . '</p>' . "\n";
58 echo '<p>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";
59 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_signup_notifications", get_defined_vars ());
60 /**/
61 echo '<table class="form-table">' . "\n";
62 echo '<tbody>' . "\n";
63 echo '<tr>' . "\n";
64 /**/
65 echo '<th>' . "\n";
66 echo '<label for="ws-plugin--s2member-signup-notification-urls">' . "\n";
67 echo 'Signup Notification URLs:' . "\n";
68 echo '</label>' . "\n";
69 echo '</th>' . "\n";
70 /**/
71 echo '</tr>' . "\n";
72 echo '<tr>' . "\n";
73 /**/
74 echo '<td>' . "\n";
75 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
76 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";
77 echo 'Signup Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
78 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
79 echo '<ul>' . "\n";
80 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. Payment 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";
81 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";
82 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";
83 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";
84 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
85 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
86 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
87 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
88 echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
89 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";
90 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";
91 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";
92 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";
93 echo '</ul>' . "\n";
94 /**/
95 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
96 echo '<ul>' . "\n";
97 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
98 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";
99 echo '</ul>' . "\n";
100 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
101 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
102 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
103 /**/
104 echo '</td>' . "\n";
105 /**/
106 echo '</tr>' . "\n";
107 echo '</tbody>' . "\n";
108 echo '</table>' . "\n";
109 /**/
110 echo '<div class="ws-menu-page-hr"></div>' . "\n";
111 /**/
112 echo '<table class="form-table" style="margin-top:0;">' . "\n";
113 echo '<tbody>' . "\n";
114 echo '<tr>' . "\n";
115 /**/
116 echo '<th style="padding-top:0;">' . "\n";
117 echo '<label for="ws-plugin--s2member-signup-notification-recipients">' . "\n";
118 echo 'Send An Email Transaction Log Of This Event?' . "\n";
119 echo '</label>' . "\n";
120 echo '</th>' . "\n";
121 /**/
122 echo '</tr>' . "\n";
123 echo '<tr>' . "\n";
124 /**/
125 echo '<td>' . "\n";
126 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";
127 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
128 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
129 echo '</td>' . "\n";
130 /**/
131 echo '</tr>' . "\n";
132 echo '</tbody>' . "\n";
133 echo '</table>' . "\n";
134 echo '</div>' . "\n";
135 /**/
136 echo '</div>' . "\n";
137 }
138 /**/
139 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_registration_notifications", true, get_defined_vars ()))
140 {
141 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_registration_notifications", get_defined_vars ());
142 /**/
143 echo '<div class="ws-menu-page-group" title="Registration Notifications">' . "\n";
144 /**/
145 echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-notifications-section">' . "\n";
146 echo '<h3>Registration Notification URLs ( optional )</h3>' . "\n";
147 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.</p>' . "\n";
148 echo '<p>This Notification is ALSO triggered whenever you create a "new" User inside your WordPress® Dashboard.</p>' . "\n";
149 echo '<p>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";
150 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_registration_notifications", get_defined_vars ());
151 /**/
152 echo '<table class="form-table">' . "\n";
153 echo '<tbody>' . "\n";
154 echo '<tr>' . "\n";
155 /**/
156 echo '<th>' . "\n";
157 echo '<label for="ws-plugin--s2member-registration-notification-urls">' . "\n";
158 echo 'Registration Notification URLs:' . "\n";
159 echo '</label>' . "\n";
160 echo '</th>' . "\n";
161 /**/
162 echo '</tr>' . "\n";
163 echo '<tr>' . "\n";
164 /**/
165 echo '<td>' . "\n";
166 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
167 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";
168 echo 'Registration Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
169 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
170 echo '<ul>' . "\n";
171 echo '<li><code>%%role%%</code> = The Role ID <code>( subscriber, s2member_level[0-9]+, administrator, editor, author, contributor )</code>.</li>' . "\n";
172 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";
173 echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> ( <em>in comma-delimited format</em> ).</li>' . "\n";
174 echo '<li><code>%%auto_eot_time%%</code> = Auto-EOT Time ( if applicable ). Ex: <code>1299925670</code> ( <em>unix timestamp</em> ).</li>' . "\n";
175 echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
176 echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
177 echo '<li><code>%%user_full_name%%</code> = The Full Name ( First &amp; Last ) of the Member who registered their Username.</li>' . "\n";
178 echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
179 echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
180 echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
181 echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
182 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID generated during registration.</li>' . "\n";
183 echo '</ul>' . "\n";
184 /**/
185 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
186 echo '<ul>' . "\n";
187 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";
188 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";
189 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
190 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
191 echo '</ul>' . "\n";
192 /**/
193 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
194 echo '<ul>' . "\n";
195 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
196 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";
197 echo '</ul>' . "\n";
198 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
199 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
200 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
201 /**/
202 echo '</td>' . "\n";
203 /**/
204 echo '</tr>' . "\n";
205 echo '</tbody>' . "\n";
206 echo '</table>' . "\n";
207 /**/
208 echo '<div class="ws-menu-page-hr"></div>' . "\n";
209 /**/
210 echo '<table class="form-table" style="margin-top:0;">' . "\n";
211 echo '<tbody>' . "\n";
212 echo '<tr>' . "\n";
213 /**/
214 echo '<th style="padding-top:0;">' . "\n";
215 echo '<label for="ws-plugin--s2member-registration-notification-recipients">' . "\n";
216 echo 'Send An Email Transaction Log Of This Event?' . "\n";
217 echo '</label>' . "\n";
218 echo '</th>' . "\n";
219 /**/
220 echo '</tr>' . "\n";
221 echo '<tr>' . "\n";
222 /**/
223 echo '<td>' . "\n";
224 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";
225 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
226 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
227 echo '</td>' . "\n";
228 /**/
229 echo '</tr>' . "\n";
230 echo '</tbody>' . "\n";
231 echo '</table>' . "\n";
232 echo '</div>' . "\n";
233 /**/
234 echo '</div>' . "\n";
235 /**/
236 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_registration_notifications", get_defined_vars ());
237 }
238 /**/
239 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_payment_notifications", true, get_defined_vars ()))
240 {
241 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_payment_notifications", get_defined_vars ());
242 /**/
243 echo '<div class="ws-menu-page-group" title="Payment Notifications">' . "\n";
244 /**/
245 echo '<div class="ws-menu-page-section ws-plugin--s2member-payment-notifications-section">' . "\n";
246 echo '<h3>Payment Notification URLs ( optional )</h3>' . "\n";
247 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.</p>' . "\n";
248 echo '<p>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.</p>' . "\n";
249 echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p>Payment Notifications are also triggered whenever a Buy Now purchase for Independent Custom Capabilities takes place.</p>' . "\n" : '';
250 echo '<p>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";
251 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_payment_notifications", get_defined_vars ());
252 /**/
253 echo '<table class="form-table">' . "\n";
254 echo '<tbody>' . "\n";
255 echo '<tr>' . "\n";
256 /**/
257 echo '<th>' . "\n";
258 echo '<label for="ws-plugin--s2member-payment-notification-urls">' . "\n";
259 echo 'Payment Notification URLs:' . "\n";
260 echo '</label>' . "\n";
261 echo '</th>' . "\n";
262 /**/
263 echo '</tr>' . "\n";
264 echo '<tr>' . "\n";
265 /**/
266 echo '<td>' . "\n";
267 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
268 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";
269 echo 'Payment Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
270 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
271 echo '<ul>' . "\n";
272 echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There are some exceptions. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, and/or Independent Custom Capabilities, 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 ), which goes for Independent Custom Capability purchases too; using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
273 echo '<li><code>%%txn_id%%</code> = The Payment Transaction ID, which is always unique for each payment received.</li>' . "\n";
274 echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
275 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' or Capabilities.') . '</li>' . "\n";
276 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' or Capabilities.') . '</li>' . "\n";
277 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' or Capabilities.') . '</li>' . "\n";
278 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' or Capabilities.') . '</li>' . "\n";
279 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.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' [ <a href="#" onclick="alert(\'If the Payment Notification is for Independent Custom Capabilities, the `level` portion of this string will be an asterisk ( `*` ), since the Membership Level is irrelevant, and remains `as it was` in that scenario. In all other cases, the `level` portion will be a numeric value.\'); return false;">?</a> ]') . '</li>' . "\n";
280 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";
281 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";
282 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";
283 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";
284 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";
285 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
286 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
287 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
288 echo '</ul>' . "\n";
289 /**/
290 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
291 echo '<ul>' . "\n";
292 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";
293 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";
294 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
295 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
296 echo '</ul>' . "\n";
297 /**/
298 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
299 echo '<ul>' . "\n";
300 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
301 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";
302 echo '</ul>' . "\n";
303 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
304 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
305 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
306 /**/
307 echo '</td>' . "\n";
308 /**/
309 echo '</tr>' . "\n";
310 echo '</tbody>' . "\n";
311 echo '</table>' . "\n";
312 /**/
313 echo '<div class="ws-menu-page-hr"></div>' . "\n";
314 /**/
315 echo '<table class="form-table" style="margin-top:0;">' . "\n";
316 echo '<tbody>' . "\n";
317 echo '<tr>' . "\n";
318 /**/
319 echo '<th style="padding-top:0;">' . "\n";
320 echo '<label for="ws-plugin--s2member-payment-notification-recipients">' . "\n";
321 echo 'Send An Email Transaction Log Of This Event?' . "\n";
322 echo '</label>' . "\n";
323 echo '</th>' . "\n";
324 /**/
325 echo '</tr>' . "\n";
326 echo '<tr>' . "\n";
327 /**/
328 echo '<td>' . "\n";
329 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";
330 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
331 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
332 echo '</td>' . "\n";
333 /**/
334 echo '</tr>' . "\n";
335 echo '</tbody>' . "\n";
336 echo '</table>' . "\n";
337 echo '</div>' . "\n";
338 /**/
339 echo '</div>' . "\n";
340 /**/
341 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_payment_notifications", get_defined_vars ());
342 }
343 /**/
344 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_modification_notifications", true, get_defined_vars ()))
345 {
346 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_modification_notifications", get_defined_vars ());
347 /**/
348 echo '<div class="ws-menu-page-group" title="Modification Notifications">' . "\n";
349 /**/
350 echo '<div class="ws-menu-page-section ws-plugin--s2member-modification-notifications-section">' . "\n";
351 echo '<h3>Modification Notification URLs ( optional )</h3>' . "\n";
352 echo '<p>If you use affiliate software, or have back-office routines that need to be notified each time 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 <em>( even if they are/were a Free Subscriber )</em> signs up for a paid Subscription <em>( i.e. a Modification takes place against an existing account within WordPress® )</em>, or an "existing" Member modifies their paid Subscription terms <em>( again, a Modification takes places against an existing account within WordPress® )</em>. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription, or it may not.</p>' . "\n";
353 echo '<p>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 <em>( e.g. no money is being transacted intially )</em>.</p>' . "\n";
354 echo '<p>This Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. This Notification will NOT be processed for "new" Users/Members <em>( see: Signup Notifications for that scenario )</em>.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' And, this Notification will NOT be processed for Independent Custom Capability purchases <em>( see: Payment Notifications for that scenario )</em>.') . '</p>' . "\n";
355 echo '<p>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";
356 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_modification_notifications", get_defined_vars ());
357 /**/
358 echo '<table class="form-table">' . "\n";
359 echo '<tbody>' . "\n";
360 echo '<tr>' . "\n";
361 /**/
362 echo '<th>' . "\n";
363 echo '<label for="ws-plugin--s2member-modification-notification-urls">' . "\n";
364 echo 'Modification Notification URLs:' . "\n";
365 echo '</label>' . "\n";
366 echo '</th>' . "\n";
367 /**/
368 echo '</tr>' . "\n";
369 echo '<tr>' . "\n";
370 /**/
371 echo '<td>' . "\n";
372 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
373 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";
374 echo 'Modification Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
375 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
376 echo '<ul>' . "\n";
377 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. Payment 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";
378 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";
379 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";
380 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";
381 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
382 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
383 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
384 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
385 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";
386 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";
387 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";
388 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";
389 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";
390 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";
391 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";
392 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";
393 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
394 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
395 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
396 echo '</ul>' . "\n";
397 /**/
398 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
399 echo '<ul>' . "\n";
400 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";
401 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";
402 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
403 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
404 echo '</ul>' . "\n";
405 /**/
406 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
407 echo '<ul>' . "\n";
408 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
409 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";
410 echo '</ul>' . "\n";
411 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
412 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
413 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
414 /**/
415 echo '</td>' . "\n";
416 /**/
417 echo '</tr>' . "\n";
418 echo '</tbody>' . "\n";
419 echo '</table>' . "\n";
420 /**/
421 echo '<div class="ws-menu-page-hr"></div>' . "\n";
422 /**/
423 echo '<table class="form-table" style="margin-top:0;">' . "\n";
424 echo '<tbody>' . "\n";
425 echo '<tr>' . "\n";
426 /**/
427 echo '<th style="padding-top:0;">' . "\n";
428 echo '<label for="ws-plugin--s2member-modification-notification-recipients">' . "\n";
429 echo 'Send An Email Transaction Log Of This Event?' . "\n";
430 echo '</label>' . "\n";
431 echo '</th>' . "\n";
432 /**/
433 echo '</tr>' . "\n";
434 echo '<tr>' . "\n";
435 /**/
436 echo '<td>' . "\n";
437 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";
438 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
439 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
440 echo '</td>' . "\n";
441 /**/
442 echo '</tr>' . "\n";
443 echo '</tbody>' . "\n";
444 echo '</table>' . "\n";
445 echo '</div>' . "\n";
446 /**/
447 echo '</div>' . "\n";
448 }
449 /**/
450 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_cancellation_notifications", true, get_defined_vars ()))
451 {
452 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_cancellation_notifications", get_defined_vars ());
453 /**/
454 echo '<div class="ws-menu-page-group" title="Cancellation Notifications">' . "\n";
455 /**/
456 echo '<div class="ws-menu-page-section ws-plugin--s2member-cancellation-notifications-section">' . "\n";
457 echo '<h3>Cancellation Notification URLs ( optional )</h3>' . "\n";
458 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.</p>' . "\n";
459 echo '<p>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";
460 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";
461 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.</em></p>' . "\n";
462 echo '<p><em>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";
463 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_cancellation_notifications", get_defined_vars ());
464 /**/
465 echo '<table class="form-table">' . "\n";
466 echo '<tbody>' . "\n";
467 echo '<tr>' . "\n";
468 /**/
469 echo '<th>' . "\n";
470 echo '<label for="ws-plugin--s2member-cancellation-notification-urls">' . "\n";
471 echo 'Cancellation Notification URLs:' . "\n";
472 echo '</label>' . "\n";
473 echo '</th>' . "\n";
474 /**/
475 echo '</tr>' . "\n";
476 echo '<tr>' . "\n";
477 /**/
478 echo '<td>' . "\n";
479 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
480 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";
481 echo 'Cancellation Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
482 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
483 echo '<ul>' . "\n";
484 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. Payment 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";
485 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";
486 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";
487 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";
488 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";
489 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";
490 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";
491 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
492 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
493 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
494 echo '</ul>' . "\n";
495 /**/
496 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
497 echo '<ul>' . "\n";
498 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";
499 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";
500 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
501 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
502 echo '</ul>' . "\n";
503 /**/
504 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
505 echo '<ul>' . "\n";
506 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
507 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";
508 echo '</ul>' . "\n";
509 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
510 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
511 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
512 /**/
513 echo '</td>' . "\n";
514 /**/
515 echo '</tr>' . "\n";
516 echo '</tbody>' . "\n";
517 echo '</table>' . "\n";
518 /**/
519 echo '<div class="ws-menu-page-hr"></div>' . "\n";
520 /**/
521 echo '<table class="form-table" style="margin-top:0;">' . "\n";
522 echo '<tbody>' . "\n";
523 echo '<tr>' . "\n";
524 /**/
525 echo '<th style="padding-top:0;">' . "\n";
526 echo '<label for="ws-plugin--s2member-cancellation-notification-recipients">' . "\n";
527 echo 'Send An Email Transaction Log Of This Event?' . "\n";
528 echo '</label>' . "\n";
529 echo '</th>' . "\n";
530 /**/
531 echo '</tr>' . "\n";
532 echo '<tr>' . "\n";
533 /**/
534 echo '<td>' . "\n";
535 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";
536 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
537 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
538 echo '</td>' . "\n";
539 /**/
540 echo '</tr>' . "\n";
541 echo '</tbody>' . "\n";
542 echo '</table>' . "\n";
543 echo '</div>' . "\n";
544 /**/
545 echo '</div>' . "\n";
546 /**/
547 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_cancellation_notifications", get_defined_vars ());
548 }
549 /**/
550 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_eot_deletion_notifications", true, get_defined_vars ()))
551 {
552 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_eot_deletion_notifications", get_defined_vars ());
553 /**/
554 echo '<div class="ws-menu-page-group" title="EOT/Deletion Notifications">' . "\n";
555 /**/
556 echo '<div class="ws-menu-page-section ws-plugin--s2member-eot-deletion-notifications-section">' . "\n";
557 echo '<h3>EOT/Deletion Notification URLs ( optional )</h3>' . "\n";
558 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.</p>' . "\n";
559 echo '<p><strong>EOT = End Of Term.</strong> 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";
560 echo '<p>Manual Deletions will trigger this Notification too. If you delete an account manually from within your WordPress® Dashboard, your URLs can be notified automatically through this API Notification, and this scenario can be detected through the Replacement Code <code>%%eot_del_type%%</code>, which is documented below. So the two events are an EOT <em>( of any kind )</em> and/or a Manual Deletion.</p>' . "\n";
561 echo '<p>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";
562 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.</em></p>' . "\n";
563 echo '<p><em>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";
564 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_eot_deletion_notifications", get_defined_vars ());
565 /**/
566 echo '<table class="form-table">' . "\n";
567 echo '<tbody>' . "\n";
568 echo '<tr>' . "\n";
569 /**/
570 echo '<th>' . "\n";
571 echo '<label for="ws-plugin--s2member-eot-del-notification-urls">' . "\n";
572 echo 'EOT/Deletion Notification URLs:' . "\n";
573 echo '</label>' . "\n";
574 echo '</th>' . "\n";
575 /**/
576 echo '</tr>' . "\n";
577 echo '<tr>' . "\n";
578 /**/
579 echo '<td>' . "\n";
580 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
581 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";
582 echo 'EOT/Deletion Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
583 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
584 echo '<ul>' . "\n";
585 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";
586 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. Payment 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";
587 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";
588 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";
589 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";
590 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";
591 echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
592 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
593 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
594 echo '</ul>' . "\n";
595 /**/
596 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
597 echo '<ul>' . "\n";
598 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";
599 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";
600 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
601 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
602 echo '</ul>' . "\n";
603 /**/
604 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
605 echo '<ul>' . "\n";
606 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
607 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";
608 echo '</ul>' . "\n";
609 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
610 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
611 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
612 /**/
613 echo '</td>' . "\n";
614 /**/
615 echo '</tr>' . "\n";
616 echo '</tbody>' . "\n";
617 echo '</table>' . "\n";
618 /**/
619 echo '<div class="ws-menu-page-hr"></div>' . "\n";
620 /**/
621 echo '<table class="form-table" style="margin-top:0;">' . "\n";
622 echo '<tbody>' . "\n";
623 echo '<tr>' . "\n";
624 /**/
625 echo '<th style="padding-top:0;">' . "\n";
626 echo '<label for="ws-plugin--s2member-eot-del-notification-recipients">' . "\n";
627 echo 'Send An Email Transaction Log Of This Event?' . "\n";
628 echo '</label>' . "\n";
629 echo '</th>' . "\n";
630 /**/
631 echo '</tr>' . "\n";
632 echo '<tr>' . "\n";
633 /**/
634 echo '<td>' . "\n";
635 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";
636 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
637 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
638 echo '</td>' . "\n";
639 /**/
640 echo '</tr>' . "\n";
641 echo '</tbody>' . "\n";
642 echo '</table>' . "\n";
643 echo '</div>' . "\n";
644 /**/
645 echo '</div>' . "\n";
646 /**/
647 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_eot_deletion_notifications", get_defined_vars ());
648 }
649 /**/
650 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_refund_reversal_notifications", true, get_defined_vars ()))
651 {
652 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_refund_reversal_notifications", get_defined_vars ());
653 /**/
654 echo '<div class="ws-menu-page-group" title="Refund/Reversal Notifications">' . "\n";
655 /**/
656 echo '<div class="ws-menu-page-section ws-plugin--s2member-refund-reversal-notifications-section">' . "\n";
657 echo '<h3>Refund/Reversal Notification URLs ( optional )</h3>' . "\n";
658 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 EOT/Deletion Notifications, which are all-inclusive.</p>' . "\n";
659 echo '<p>This is very similar to the EOT/Deletion Notification described above. However, there is an important distinction. The all-inclusive EOT/Deletion Notification includes cancellations, expirations, failed payments, refunds, chargebacks, and even manual deletions by the Administrator from within the Dashboard. In other words, EOT/Deletion Notifications are processed ANY time a deletion or End Of Term action takes place. This API Notification, that is, Refund/Reversal Notifications, do NOT include all of those scenarios.</p>' . "\n";
660 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.</p>' . "\n";
661 echo '<p>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";
662 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_refund_reversal_notifications", get_defined_vars ());
663 /**/
664 echo '<table class="form-table">' . "\n";
665 echo '<tbody>' . "\n";
666 echo '<tr>' . "\n";
667 /**/
668 echo '<th>' . "\n";
669 echo '<label for="ws-plugin--s2member-ref-rev-notification-urls">' . "\n";
670 echo 'Refund/Reversal Notification URLs:' . "\n";
671 echo '</label>' . "\n";
672 echo '</th>' . "\n";
673 /**/
674 echo '</tr>' . "\n";
675 echo '<tr>' . "\n";
676 /**/
677 echo '<td>' . "\n";
678 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
679 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";
680 echo 'Refund/Reversal Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
681 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
682 echo '<ul>' . "\n";
683 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. Payment 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";
684 echo '<li><code>%%parent_txn_id%%</code> = The Parent Transaction ID, associated with the original payment being refunded/reversed.</li>' . "\n";
685 echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
686 echo '<li><code>%%-fee%%</code> = The Negative Payment Gateway fee, that was refunded back to you as the Merchant/Seller.</li>' . "\n";
687 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
688 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
689 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
690 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
691 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";
692 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";
693 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
694 echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
695 echo '</ul>' . "\n";
696 /**/
697 echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
698 echo '<ul>' . "\n";
699 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";
700 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";
701 echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
702 echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
703 echo '</ul>' . "\n";
704 /**/
705 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
706 echo '<ul>' . "\n";
707 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
708 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";
709 echo '</ul>' . "\n";
710 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
711 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
712 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
713 /**/
714 echo '</td>' . "\n";
715 /**/
716 echo '</tr>' . "\n";
717 echo '</tbody>' . "\n";
718 echo '</table>' . "\n";
719 /**/
720 echo '<div class="ws-menu-page-hr"></div>' . "\n";
721 /**/
722 echo '<table class="form-table" style="margin-top:0;">' . "\n";
723 echo '<tbody>' . "\n";
724 echo '<tr>' . "\n";
725 /**/
726 echo '<th style="padding-top:0;">' . "\n";
727 echo '<label for="ws-plugin--s2member-ref-rev-notification-recipients">' . "\n";
728 echo 'Send An Email Transaction Log Of This Event?' . "\n";
729 echo '</label>' . "\n";
730 echo '</th>' . "\n";
731 /**/
732 echo '</tr>' . "\n";
733 echo '<tr>' . "\n";
734 /**/
735 echo '<td>' . "\n";
736 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";
737 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
738 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
739 echo '</td>' . "\n";
740 /**/
741 echo '</tr>' . "\n";
742 echo '</tbody>' . "\n";
743 echo '</table>' . "\n";
744 echo '</div>' . "\n";
745 /**/
746 echo '</div>' . "\n";
747 /**/
748 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_refund_reversal_notifications", get_defined_vars ());
749 }
750 /**/
751 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_sp_sale_notifications", true, get_defined_vars ()))
752 {
753 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_sp_sale_notifications", get_defined_vars ());
754 /**/
755 echo '<div class="ws-menu-page-group" title="Specific Post/Page ~ Sale Notifications">' . "\n";
756 /**/
757 echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-sale-notifications-section">' . "\n";
758 echo '<h3>Specific Post/Page ~ Sale Notification URLs ( optional )</h3>' . "\n";
759 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.</p>' . "\n";
760 echo '<p>This is one of only two API 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' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' and Independent Custom Capabilities') . '. None of the other API Notifications will ever be processed for Specific Post/Page Access. If you intend to respond to events related to Specific Post/Page Access, you MUST use one of the two API Notifications specifically geared to Post/Page Access.</p>' . "\n";
761 echo '<p>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";
762 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_sp_sale_notifications", get_defined_vars ());
763 /**/
764 echo '<table class="form-table">' . "\n";
765 echo '<tbody>' . "\n";
766 echo '<tr>' . "\n";
767 /**/
768 echo '<th>' . "\n";
769 echo '<label for="ws-plugin--s2member-sp-sale-notification-urls">' . "\n";
770 echo 'Specific Post/Page ~ Sale Notification URLs:' . "\n";
771 echo '</label>' . "\n";
772 echo '</th>' . "\n";
773 /**/
774 echo '</tr>' . "\n";
775 echo '<tr>' . "\n";
776 /**/
777 echo '<td>' . "\n";
778 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
779 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";
780 echo 'Specific Post/Page ~ Sale Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
781 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
782 echo '<ul>' . "\n";
783 echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by s2Member ) where the Customer can gain access.</li>' . "\n";
784 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";
785 echo '<li><code>%%txn_id%%</code> = The Paid Transaction ID. Payment Gateways assign a unique identifier for every purchase.</li>' . "\n";
786 echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
787 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
788 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
789 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
790 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
791 echo '<li><code>%%user_ip%%</code> = The Customers\'s IP Address, during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
792 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";
793 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";
794 echo '</ul>' . "\n";
795 /**/
796 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
797 echo '<ul>' . "\n";
798 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
799 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";
800 echo '</ul>' . "\n";
801 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
802 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
803 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
804 /**/
805 echo '</td>' . "\n";
806 /**/
807 echo '</tr>' . "\n";
808 echo '</tbody>' . "\n";
809 echo '</table>' . "\n";
810 /**/
811 echo '<div class="ws-menu-page-hr"></div>' . "\n";
812 /**/
813 echo '<table class="form-table" style="margin-top:0;">' . "\n";
814 echo '<tbody>' . "\n";
815 echo '<tr>' . "\n";
816 /**/
817 echo '<th style="padding-top:0;">' . "\n";
818 echo '<label for="ws-plugin--s2member-sp-sale-notification-recipients">' . "\n";
819 echo 'Send An Email Transaction Log Of This Event?' . "\n";
820 echo '</label>' . "\n";
821 echo '</th>' . "\n";
822 /**/
823 echo '</tr>' . "\n";
824 echo '<tr>' . "\n";
825 /**/
826 echo '<td>' . "\n";
827 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";
828 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
829 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
830 echo '</td>' . "\n";
831 /**/
832 echo '</tr>' . "\n";
833 echo '</tbody>' . "\n";
834 echo '</table>' . "\n";
835 echo '</div>' . "\n";
836 /**/
837 echo '</div>' . "\n";
838 /**/
839 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_sp_sale_notifications", get_defined_vars ());
840 }
841 /**/
842 if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_sp_refund_reversal_notifications", true, get_defined_vars ()))
843 {
844 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_sp_refund_reversal_notifications", get_defined_vars ());
845 /**/
846 echo '<div class="ws-menu-page-group" title="Specific Post/Page ~ Refund/Reversal Notifications">' . "\n";
847 /**/
848 echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-refund-reversal-notifications-section">' . "\n";
849 echo '<h3>Specific Post/Page ~ Refund/Reversal Notification URLs ( optional )</h3>' . "\n";
850 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.</p>' . "\n";
851 echo '<p>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' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' and Independent Custom Capabilities') . '. None of the other API Notifications will ever be processed for Specific Post/Page Access. If you intend to respond to events related to Specific Post/Page Access, you MUST use one of the two API Notifications specifically geared to Post/Page Access.</p>' . "\n";
852 echo '<p>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";
853 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_sp_refund_reversal_notifications", get_defined_vars ());
854 /**/
855 echo '<table class="form-table">' . "\n";
856 echo '<tbody>' . "\n";
857 echo '<tr>' . "\n";
858 /**/
859 echo '<th>' . "\n";
860 echo '<label for="ws-plugin--s2member-sp-ref-rev-notification-urls">' . "\n";
861 echo 'Specific Post/Page ~ Refund/Reversal Notification URLs:' . "\n";
862 echo '</label>' . "\n";
863 echo '</th>' . "\n";
864 /**/
865 echo '</tr>' . "\n";
866 echo '<tr>' . "\n";
867 /**/
868 echo '<td>' . "\n";
869 echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
870 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";
871 echo 'Specific Post/Page ~ Refund/Reversal Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
872 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
873 echo '<ul>' . "\n";
874 echo '<li><code>%%parent_txn_id%%</code> = The Parent Transaction ID, associated with the original payment being refunded/reversed.</li>' . "\n";
875 echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
876 echo '<li><code>%%-fee%%</code> = The Negative Payment Gateway fee, that was refunded back to you as the Merchant/Seller.</li>' . "\n";
877 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
878 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
879 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";
880 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
881 echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
882 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";
883 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";
884 echo '</ul>' . "\n";
885 /**/
886 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
887 echo '<ul>' . "\n";
888 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
889 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";
890 echo '</ul>' . "\n";
891 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
892 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
893 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
894 /**/
895 echo '</td>' . "\n";
896 /**/
897 echo '</tr>' . "\n";
898 echo '</tbody>' . "\n";
899 echo '</table>' . "\n";
900 /**/
901 echo '<div class="ws-menu-page-hr"></div>' . "\n";
902 /**/
903 echo '<table class="form-table" style="margin-top:0;">' . "\n";
904 echo '<tbody>' . "\n";
905 echo '<tr>' . "\n";
906 /**/
907 echo '<th style="padding-top:0;">' . "\n";
908 echo '<label for="ws-plugin--s2member-sp-ref-rev-notification-recipients">' . "\n";
909 echo 'Send An Email Transaction Log Of This Event?' . "\n";
910 echo '</label>' . "\n";
911 echo '</th>' . "\n";
912 /**/
913 echo '</tr>' . "\n";
914 echo '<tr>' . "\n";
915 /**/
916 echo '<td>' . "\n";
917 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";
918 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
919 echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
920 echo '</td>' . "\n";
921 /**/
922 echo '</tr>' . "\n";
923 echo '</tbody>' . "\n";
924 echo '</table>' . "\n";
925 echo '</div>' . "\n";
926 /**/
927 echo '</div>' . "\n";
928 /**/
929 do_action ("ws_plugin__s2member_during_api_ops_page_during_left_sections_after_sp_refund_reversal_notifications", get_defined_vars ());
930 }
931 /**/
932 do_action ("ws_plugin__s2member_during_api_ops_page_after_left_sections", get_defined_vars ());
933 /**/
934 echo '<div class="ws-menu-page-hr"></div>' . "\n";
935 /**/
936 echo '<p class="submit"><input type="submit" class="button-primary" value="Save All Changes" /></p>' . "\n";
937 /**/
938 echo '</form>' . "\n";
939 /**/
940 echo '</td>' . "\n";
941 /**/
942 echo '<td class="ws-menu-page-table-r">' . "\n";
943 c_ws_plugin__s2member_menu_pages_rs::display ();
944 echo '</td>' . "\n";
945 /**/
946 echo '</tr>' . "\n";
947 echo '</tbody>' . "\n";
948 echo '</table>' . "\n";
949 /**/
950 echo '</div>' . "\n";
951 }
952 }
953 }
954 /**/
955 new c_ws_plugin__s2member_menu_page_api_ops ();
956 ?>