PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 120213
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v120213
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 / paypal-ops.inc.php

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

635 lines 54.0 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 ( PayPal® Options 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_paypal_ops"))
21 {
22 /**
23 * Menu page for the s2Member plugin ( PayPal® Options page ).
24 *
25 * @package s2Member\Menu_Pages
26 * @since 110531
27 */
28 class c_ws_plugin__s2member_menu_page_paypal_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® PayPal® Options</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_paypal_ops_page_before_left_sections", get_defined_vars ());
47 /**/
48 if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_paypal_account_details", true, get_defined_vars ()))
49 {
50 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_paypal_account_details", get_defined_vars ());
51 /**/
52 echo '<div class="ws-menu-page-group" title="PayPal® Account Details">' . "\n";
53 /**/
54 echo '<div class="ws-menu-page-section ws-plugin--s2member-paypal-account-details-section">' . "\n";
55 echo '<a href="http://www.s2member.com/paypal" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/paypal-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
56 echo '<h3>PayPal® Account Details ( required, if using PayPal® )</h3>' . "\n";
57 echo '<p>This plugin works in conjunction with <a href="http://www.s2member.com/paypal" target="_blank" rel="external">PayPal® Website Payments Standard</a>, for businesses. You do NOT need a PayPal® Pro account. You just need to upgrade your Personal PayPal® account to a Business status, which is free. A PayPal® account can be <a href="http://pages.ebay.com/help/buy/questions/upgrade-paypal-account.html" target="_blank" rel="external">upgraded</a> from a Personal account to a Business account, simply by going to the `Profile` button under the `My Account` tab, selecting the `Personal Business Information` button, and then clicking the `Upgrade Your Account` button.</p>' . "\n";
58 echo '<p><em><strong>*PayPal® API Credentials*</strong> Once you have a PayPal® Business account, you\'ll need access to your <a href="http://www.s2member.com/paypal-profile-api-access" target="_blank" rel="external">PayPal® API Credentials</a>. Log into your PayPal® account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>.</em></p>' . "\n";
59 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_details", 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-paypal-business">' . "\n";
67 echo 'Your PayPal® EMail Address:' . "\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 '<input type="text" autocomplete="off" name="ws_plugin__s2member_paypal_business" id="ws-plugin--s2member-paypal-business" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"]) . '" /><br />' . "\n";
76 echo 'Enter the email address you\'ve associated with your PayPal® Business account.' . "\n";
77 echo '</td>' . "\n";
78 /**/
79 echo '</tr>' . "\n";
80 echo '<tr>' . "\n";
81 /**/
82 echo '<th>' . "\n";
83 echo '<label for="ws-plugin--s2member-paypal-api-username">' . "\n";
84 echo 'Your PayPal® API Username:' . "\n";
85 echo '</label>' . "\n";
86 echo '</th>' . "\n";
87 /**/
88 echo '</tr>' . "\n";
89 echo '<tr>' . "\n";
90 /**/
91 echo '<td>' . "\n";
92 echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_paypal_api_username" id="ws-plugin--s2member-paypal-api-username" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"]) . '" /><br />' . "\n";
93 echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
94 echo '</td>' . "\n";
95 /**/
96 echo '</tr>' . "\n";
97 echo '<tr>' . "\n";
98 /**/
99 echo '<th>' . "\n";
100 echo '<label for="ws-plugin--s2member-paypal-api-password">' . "\n";
101 echo 'Your PayPal® API Password:' . "\n";
102 echo '</label>' . "\n";
103 echo '</th>' . "\n";
104 /**/
105 echo '</tr>' . "\n";
106 echo '<tr>' . "\n";
107 /**/
108 echo '<td>' . "\n";
109 echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_paypal_api_password" id="ws-plugin--s2member-paypal-api-password" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
110 echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
111 echo '</td>' . "\n";
112 /**/
113 echo '</tr>' . "\n";
114 echo '<tr>' . "\n";
115 /**/
116 echo '<th>' . "\n";
117 echo '<label for="ws-plugin--s2member-paypal-api-signature">' . "\n";
118 echo 'Your PayPal® API Signature:' . "\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="password" autocomplete="off" name="ws_plugin__s2member_paypal_api_signature" id="ws-plugin--s2member-paypal-api-signature" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
127 echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
128 echo '</td>' . "\n";
129 /**/
130 echo '</tr>' . "\n";
131 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_detail_rows", get_defined_vars ());
132 echo '</tbody>' . "\n";
133 echo '</table>' . "\n";
134 /**/
135 echo '<div class="ws-menu-page-hr"></div>' . "\n";
136 /**/
137 echo '<table class="form-table" style="margin:0;">' . "\n";
138 echo '<tbody>' . "\n";
139 echo '<tr>' . "\n";
140 /**/
141 echo '<th style="padding-top:0;">' . "\n";
142 echo '<label for="ws-plugin--s2member-paypal-sandbox">' . "\n";
143 echo 'Developer/Sandbox Testing?' . "\n";
144 echo '</label>' . "\n";
145 echo '</th>' . "\n";
146 /**/
147 echo '</tr>' . "\n";
148 echo '<tr>' . "\n";
149 /**/
150 echo '<td>' . "\n";
151 echo '<input type="radio" name="ws_plugin__s2member_paypal_sandbox" id="ws-plugin--s2member-paypal-sandbox-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-sandbox-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_paypal_sandbox" id="ws-plugin--s2member-paypal-sandbox-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
152 echo '<em>Only enable this if you\'ve provided Sandbox credentials above.<br />This puts the API, IPN, PDT and Form/Button Generators all into Sandbox mode.<br />See: <a href="http://www.s2member.com/paypal-developers" target="_blank" rel="external">PayPal® Developers</a></em>' . "\n";
153 echo '</td>' . "\n";
154 /**/
155 echo '</tr>' . "\n";
156 echo '<tr>' . "\n";
157 /**/
158 echo '<th>' . "\n";
159 echo '<label for="ws-plugin--s2member-paypal-btn-encryption">' . "\n";
160 echo 'Enable Button Encryption?' . "\n";
161 echo '</label>' . "\n";
162 echo '</th>' . "\n";
163 /**/
164 echo '</tr>' . "\n";
165 echo '<tr>' . "\n";
166 /**/
167 echo '<td>' . "\n";
168 echo '<input type="radio" name="ws_plugin__s2member_paypal_btn_encryption" id="ws-plugin--s2member-paypal-btn-encryption-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-btn-encryption-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_paypal_btn_encryption" id="ws-plugin--s2member-paypal-btn-encryption-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-paypal-btn-encryption-1">Yes, enable PayPal® Button encryption.</label><br />' . "\n";
169 echo '<em>If enabled, all of your PayPal® Button Shortcodes will produce *encrypted* PayPal® Buttons. This improves security against fraudulent transactions. For extra security, you should update your PayPal® account too, under: <code>My Profile -> Website Payment Preferences</code>. You\'ll want to block all non-encrypted payments. <strong>*Note*</strong> this will NOT work until you\'ve supplied s2Member with your PayPal® Email Address, and also with your API Username/Password/Signature.</em>' . "\n";
170 echo '</td>' . "\n";
171 /**/
172 echo '</tr>' . "\n";
173 /**/
174 if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
175 {
176 echo '<tr>' . "\n";
177 /**/
178 echo '<th>' . "\n";
179 echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
180 echo 'Enable Logging Routines?' . "\n";
181 echo '</label>' . "\n";
182 echo '</th>' . "\n";
183 /**/
184 echo '</tr>' . "\n";
185 echo '<tr>' . "\n";
186 /**/
187 echo '<td>' . "\n";
188 echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN &amp; Return Page logging.</label><br />' . "\n";
189 echo '<em>This enables API, IPN and Return Page logging. The log files are stored here:<br /><code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em>' . "\n";
190 echo '</td>' . "\n";
191 /**/
192 echo '</tr>' . "\n";
193 }
194 /**/
195 echo '</tbody>' . "\n";
196 echo '</table>' . "\n";
197 /**/
198 echo '<div class="ws-menu-page-hr"></div>' . "\n";
199 /**/
200 echo '<p><em><strong>*Sandbox Tip*</strong> If you\'re testing your site through a PayPal® Sandbox account, please remember that Email Confirmations from s2Member will NOT be received after a test purchase. s2Member sends its Confirmation Emails to the PayPal® Email Address of the Customer. Since PayPal® Sandbox addresses are usually bogus ( for testing ), you will have to run live transactions before Email Confirmations from s2Member are received. That being said, all other s2Member functionality CAN be tested through a PayPal® Sandbox account. Email Confirmations are the only hang-up.</em></p>' . "\n";
201 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_details_after_sandbox_tip", get_defined_vars ());
202 echo '</div>' . "\n";
203 /**/
204 echo '</div>' . "\n";
205 /**/
206 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_paypal_account_details", get_defined_vars ());
207 }
208 /**/
209 if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_paypal_ipn", true, get_defined_vars ()))
210 {
211 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_paypal_ipn", get_defined_vars ());
212 /**/
213 echo '<div class="ws-menu-page-group" title="PayPal® IPN Integration">' . "\n";
214 /**/
215 echo '<div class="ws-menu-page-section ws-plugin--s2member-paypal-ipn-section">' . "\n";
216 echo '<h3>PayPal® IPN / Instant Payment Notifications ( required, please enable )</h3>' . "\n";
217 echo '<p>Log into your PayPal® account and navigate to this section:<br /><code>Account Profile -> Instant Payment Notification Preferences</code></p>' . "\n";
218 echo '<p>Edit your IPN settings &amp; turn IPN Notifications: <strong><code>On</code></strong></p>' . "\n";
219 echo '<p>You\'ll need your IPN URL, which is:<br /><code>' . esc_html (site_url ("/?s2member_paypal_notify=1")) . '</code></p>' . "\n";
220 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_ipn", get_defined_vars ());
221 /**/
222 echo '<h3>More Information ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-paypal-ipn-details\').toggle(); return false;" class="ws-dotted-link">click here</a> )</h3>' . "\n";
223 echo '<div id="ws-plugin--s2member-paypal-ipn-details" style="display:none;">' . "\n";
224 echo '<p><em><strong>*Quick Tip*</strong> In addition to the <a href="http://www.s2member.com/paypal-ipn-setup" target="_blank" rel="external">default IPN settings inside your PayPal® account</a>, the IPN URL is also set on a per-transaction basis by the special PayPal® Button Code that s2Member provides you with. In other words, if you have multiple sites operating on one PayPal® account, that\'s OK. s2Member dynamically sets the IPN URL for each transaction. The result is that the IPN URL configured from within your PayPal® account, becomes the default, which is then overwritten on a per-transaction basis. In fact, PayPal® recently updated their system to support IPN URL preservation. One PayPal® account can handle multiple sites, all using different IPN URLs.</em></p>' . "\n";
225 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_quick_tip", get_defined_vars ());
226 echo '<p><em><strong>*IPN Communications*</strong> You\'ll be happy to know that s2Member handles cancellations, expirations, failed payments, terminations ( e.g. refunds &amp; chargebacks ) for you automatically. If you log into your PayPal® account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal® account and cancels their own Subscription, s2Member will be notified of these important changes and react accordingly through the PayPal® IPN service that runs silently behind-the-scene. The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal®, s2Member will be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). The communication from PayPal® -> s2Member is seamless.</em></p>' . "\n";
227 echo '</div>' . "\n";
228 /**/
229 echo '<div class="ws-menu-page-hr"></div>' . "\n";
230 /**/
231 echo '<h3>IPN w/ Proxy Key ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-paypal-ipn-proxy-details\').toggle(); return false;" class="ws-dotted-link">optional, for 3rd-party integrations</a> )</h3>' . "\n";
232 echo '<div id="ws-plugin--s2member-paypal-ipn-proxy-details" style="display:none;">' . "\n";
233 echo '<p>If you\'re using a 3rd-party application that needs to POST simulated IPN transactions to your s2Member installation, you can use this alternate IPN URL, which includes a Proxy Key. This encrypted Proxy Key verifies incoming data being received by s2Member\'s IPN processor. You can change <em>[proxy-gateway]</em> to whatever you like. The <em>[proxy-gateway]</em> value is required. It will be stored by s2Member as the Customer\'s Paid Subscr. Gateway. Your [proxy-gateway] value will also be reflected in s2Member\'s IPN log.</p>' . "\n";
234 echo '<input type="text" autocomplete="off" value="' . format_to_edit (site_url ("/?s2member_paypal_notify=1&s2member_paypal_proxy=[proxy-gateway]&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ()))) . '" style="width:99%;" />' . "\n";
235 echo '<p><em>Any 3rd-party application that is sending IPN transactions to your s2Member installation, must ALWAYS include the <code>custom</code> POST variable, and that variable must always start with your installation domain ( i.e. custom=<code>' . esc_html ($_SERVER["HTTP_HOST"]) . '</code> ). In addition, the <code>item_number</code> variable, must always match a format that s2Member looks for. Generally speaking, the <code>item_number</code> should be <code>1, 2, 3, or 4</code>, indicating a specific s2Member Level #. However, s2Member also uses some advanced formats in this field. Just to be sure, we suggest creating a PayPal® Button with the s2Member Button Generator, and then taking a look at the Full Button Code to see how s2Member expects <code>item_number</code> to be formatted. Other than the aforementioned exceptions; all other POST variables should follow PayPal® standards. Please see: <a href="http://www.s2member.com/paypal-ipn-pdt-vars" target="_blank" rel="external">PayPal\'s IPN/PDT reference guide</a> for full documentation.</em></p>' . "\n";
236 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_proxy", get_defined_vars ());
237 echo '</div>' . "\n";
238 echo '</div>' . "\n";
239 /**/
240 echo '</div>' . "\n";
241 /**/
242 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_paypal_ipn", get_defined_vars ());
243 }
244 /**/
245 if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_paypal_pdt", true, get_defined_vars ()))
246 {
247 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_paypal_pdt", get_defined_vars ());
248 /**/
249 echo '<div class="ws-menu-page-group" title="PayPal® PDT/Auto-Return Integration">' . "\n";
250 /**/
251 echo '<div class="ws-menu-page-section ws-plugin--s2member-paypal-pdt-section">' . "\n";
252 echo '<h3>PayPal® PDT Identity Token ( required, please enable )</h3>' . "\n";
253 echo '<p>Log into your PayPal® account and navigate to this section:<br /><code>Account Profile -> Website Payment Preferences</code></p>' . "\n";
254 echo '<p>Turn the Auto-Return feature: <strong><code>On</code></strong></p>' . "\n";
255 echo '<p>You\'ll need your <a href="' . esc_attr (site_url ("/?s2member_paypal_return=1&s2member_paypal_proxy=paypal&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Auto-Return URL</a>, which is:<br /><code>' . esc_html (site_url ("/?s2member_paypal_return=1")) . '</code></p>' . "\n";
256 echo '<p>You MUST also enable PDT ( Payment Data Transfer ): <strong><code>On</code></strong><br /><em>You\'ll be issued an Identity Token that you MUST enter below.</em></p>' . "\n";
257 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_pdt", get_defined_vars ());
258 /**/
259 echo '<table class="form-table">' . "\n";
260 echo '<tbody>' . "\n";
261 echo '<tr>' . "\n";
262 /**/
263 echo '<th>' . "\n";
264 echo '<label for="ws-plugin--s2member-paypal-identity-token">' . "\n";
265 echo 'PayPal® PDT Identity Token:' . "\n";
266 echo '</label>' . "\n";
267 echo '</th>' . "\n";
268 /**/
269 echo '</tr>' . "\n";
270 echo '<tr>' . "\n";
271 /**/
272 echo '<td>' . "\n";
273 echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_paypal_identity_token" id="ws-plugin--s2member-paypal-identity-token" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_identity_token"]) . '" /><br />' . "\n";
274 echo 'Your PDT Identity Token will appear under <em>Profile -> Website Payment Preferences</em> in your PayPal® account.' . "\n";
275 echo '</td>' . "\n";
276 /**/
277 echo '</tr>' . "\n";
278 echo '</tbody>' . "\n";
279 echo '</table>' . "\n";
280 /**/
281 echo '<div class="ws-menu-page-hr"></div>' . "\n";
282 /**/
283 echo '<h3>More Information ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-paypal-pdt-details\').toggle(); return false;" class="ws-dotted-link">click here</a> )</h3>' . "\n";
284 echo '<div id="ws-plugin--s2member-paypal-pdt-details" style="display:none;">' . "\n";
285 echo '<p><em><strong>*Quick Tip*</strong> In addition to the <a href="http://www.s2member.com/paypal-pdt-setup" target="_blank" rel="external">default Auto-Return/PDT configuration inside your PayPal® account</a>, the Auto-Return URL is also set on a per-transaction basis from within the special PayPal® Button Code that s2Member provides you with. In other words, if you have multiple sites operating on one PayPal® account, that\'s OK. s2Member dynamically sets the Auto-Return URL for each transaction. The result is that the Auto-Return URL configured from within your PayPal® account, becomes the default, which is then overwritten on a per-transaction basis.</em></p>' . "\n";
286 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_pdt_after_quick_tip", get_defined_vars ());
287 echo '</div>' . "\n";
288 /**/
289 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_pdt_after_more_info", get_defined_vars ());
290 /**/
291 echo '</div>' . "\n";
292 /**/
293 echo '</div>' . "\n";
294 /**/
295 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_paypal_pdt", get_defined_vars ());
296 }
297 /**/
298 if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_signup_confirmation_email", true, get_defined_vars ()))
299 {
300 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_signup_confirmation_email", get_defined_vars ());
301 /**/
302 echo '<div class="ws-menu-page-group" title="Signup Confirmation Email ( Standard )">' . "\n";
303 /**/
304 echo '<div class="ws-menu-page-section ws-plugin--s2member-signup-confirmation-email-section">' . "\n";
305 echo '<h3>Signup Confirmation Email ( required, but the default works fine )</h3>' . "\n";
306 echo '<p>This email is sent to new Customers after they return from a successful signup at PayPal®. The <strong>primary</strong> purpose of this email, is to provide the Customer with instructions, along with a link to register a Username for their Membership. You may also customize this further, by providing details that are specifically geared to your site.</p>' . "\n";
307 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_signup_confirmation_email", get_defined_vars ());
308 /**/
309 echo '<table class="form-table">' . "\n";
310 echo '<tbody>' . "\n";
311 echo '<tr>' . "\n";
312 /**/
313 echo '<th>' . "\n";
314 echo '<label for="ws-plugin--s2member-signup-email-recipients">' . "\n";
315 echo 'Signup Confirmation Recipients:' . "\n";
316 echo '</label>' . "\n";
317 echo '</th>' . "\n";
318 /**/
319 echo '</tr>' . "\n";
320 echo '<tr>' . "\n";
321 /**/
322 echo '<td>' . "\n";
323 echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_email_recipients" id="ws-plugin--s2member-signup-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_recipients"]) . '" /><br />' . "\n";
324 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
325 echo '<code>"%%full_name%%" &lt;%%payer_email%%&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
326 echo '</td>' . "\n";
327 /**/
328 echo '</tr>' . "\n";
329 echo '<tr>' . "\n";
330 /**/
331 echo '<th>' . "\n";
332 echo '<label for="ws-plugin--s2member-signup-email-subject">' . "\n";
333 echo 'Signup Confirmation Email Subject:' . "\n";
334 echo '</label>' . "\n";
335 echo '</th>' . "\n";
336 /**/
337 echo '</tr>' . "\n";
338 echo '<tr>' . "\n";
339 /**/
340 echo '<td>' . "\n";
341 echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_email_subject" id="ws-plugin--s2member-signup-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_subject"]) . '" /><br />' . "\n";
342 echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through PayPal®.' . "\n";
343 echo '</td>' . "\n";
344 /**/
345 echo '</tr>' . "\n";
346 echo '<tr>' . "\n";
347 /**/
348 echo '<th>' . "\n";
349 echo '<label for="ws-plugin--s2member-signup-email-message">' . "\n";
350 echo 'Signup Confirmation Email Message:' . "\n";
351 echo '</label>' . "\n";
352 echo '</th>' . "\n";
353 /**/
354 echo '</tr>' . "\n";
355 echo '<tr>' . "\n";
356 /**/
357 echo '<td>' . "\n";
358 echo '<textarea name="ws_plugin__s2member_signup_email_message" id="ws-plugin--s2member-signup-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_message"]) . '</textarea><br />' . "\n";
359 echo 'Message Body used in the email sent to a Customer after a successful signup has occurred through PayPal®.<br /><br />' . "\n";
360 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
361 echo '<ul>' . "\n";
362 echo '<li><code>%%registration_url%%</code> = The full URL ( generated by s2Member ) where the Customer can get registered.</li>' . "\n";
363 echo '<li><code>%%subscr_id%%</code> = The PayPal® 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. PayPal® does 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";
364 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. If a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0.\'); return false;">?</a> ]</li>' . "\n";
365 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";
366 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";
367 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
368 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
369 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
370 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
371 echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
372 echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
373 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";
374 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";
375 echo '<li><code>%%initial_cycle%%</code> = This is the <code>%%initial_term%%</code> from above, converted to a cycle representation of: <code><em>X days/weeks/months/years</em></code>.</li>' . "\n";
376 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";
377 echo '<li><code>%%regular_cycle%%</code> = This is the <code>%%regular_term%%</code> from above, converted to a cycle representation of: <code><em>[every] X days/weeks/months/years — OR daily, weekly, bi-weekly, monthly, bi-monthly, quarterly, yearly, or lifetime</em></code>. This is a very useful Replacment Code. Its value is dynamic; depending on term length, recurring status, and period/term lengths configured.</li>' . "\n";
378 echo '<li><code>%%recurring/regular_cycle%%</code> = Example ( <code>14.95 / Monthly</code> ), or ... ( <code>0 / non-recurring</code> ); depending on the value of <code>%%recurring%%</code>.</li>' . "\n";
379 echo '</ul>' . "\n";
380 /**/
381 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
382 echo '<ul>' . "\n";
383 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
384 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";
385 echo '</ul>' . "\n";
386 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
387 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
388 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
389 /**/
390 echo '</td>' . "\n";
391 /**/
392 echo '</tr>' . "\n";
393 echo '</tbody>' . "\n";
394 echo '</table>' . "\n";
395 echo '</div>' . "\n";
396 /**/
397 echo '</div>' . "\n";
398 /**/
399 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_signup_confirmation_email", get_defined_vars ());
400 }
401 /**/
402 if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_sp_confirmation_email", true, get_defined_vars ()))
403 {
404 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_sp_confirmation_email", get_defined_vars ());
405 /**/
406 echo '<div class="ws-menu-page-group" title="Specific Post/Page Confirmation Email ( Standard )">' . "\n";
407 /**/
408 echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-confirmation-email-section">' . "\n";
409 echo '<h3>Specific Post/Page Confirmation Email ( required, but the default works fine )</h3>' . "\n";
410 echo '<p>This email is sent to new Customers after they return from a successful purchase at PayPal®, for Specific Post/Page Access. ( see: <code>s2Member -> Restriction Options -> Specific Post/Page Access</code> ). This is NOT used for Membership sales, only for Specific Post/Page Access. The <strong>primary</strong> purpose of this email, is to provide the Customer with instructions, along with a link to access the Specific Post/Page they\'ve purchased access to. If you\'ve created a Specific Post/Page Package ( with multiple Posts/Pages bundled together into one transaction ), this ONE link ( <code>%%sp_access_url%%</code> ) will automatically authenticate them for access to ALL of the Posts/Pages included in their transaction. You may customize this email further, by providing details that are specifically geared to your site.</p>' . "\n";
411 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_sp_confirmation_email", get_defined_vars ());
412 /**/
413 echo '<table class="form-table">' . "\n";
414 echo '<tbody>' . "\n";
415 echo '<tr>' . "\n";
416 /**/
417 echo '<th>' . "\n";
418 echo '<label for="ws-plugin--s2member-sp-email-recipients">' . "\n";
419 echo 'Specific Post/Page Confirmation Recipients:' . "\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" autocomplete="off" name="ws_plugin__s2member_sp_email_recipients" id="ws-plugin--s2member-sp-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_recipients"]) . '" /><br />' . "\n";
428 echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
429 echo '<code>"%%full_name%%" &lt;%%payer_email%%&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
430 echo '</td>' . "\n";
431 /**/
432 echo '</tr>' . "\n";
433 echo '<tr>' . "\n";
434 /**/
435 echo '<th>' . "\n";
436 echo '<label for="ws-plugin--s2member-sp-email-subject">' . "\n";
437 echo 'Specific Post/Page Confirmation Email Subject:' . "\n";
438 echo '</label>' . "\n";
439 echo '</th>' . "\n";
440 /**/
441 echo '</tr>' . "\n";
442 echo '<tr>' . "\n";
443 /**/
444 echo '<td>' . "\n";
445 echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_sp_email_subject" id="ws-plugin--s2member-sp-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_subject"]) . '" /><br />' . "\n";
446 echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through PayPal®, for Specific Post/Page Access.' . "\n";
447 echo '</td>' . "\n";
448 /**/
449 echo '</tr>' . "\n";
450 echo '<tr>' . "\n";
451 /**/
452 echo '<th>' . "\n";
453 echo '<label for="ws-plugin--s2member-sp-email-message">' . "\n";
454 echo 'Specific Post/Page Confirmation Email Message:' . "\n";
455 echo '</label>' . "\n";
456 echo '</th>' . "\n";
457 /**/
458 echo '</tr>' . "\n";
459 echo '<tr>' . "\n";
460 /**/
461 echo '<td>' . "\n";
462 echo '<textarea name="ws_plugin__s2member_sp_email_message" id="ws-plugin--s2member-sp-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_message"]) . '</textarea><br />' . "\n";
463 echo 'Message Body used in the email sent to a Customer after a successful purchase has occurred through PayPal®, for Specific Post/Page Access.<br /><br />' . "\n";
464 echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
465 echo '<ul>' . "\n";
466 echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by s2Member ) where the Customer can gain access.</li>' . "\n";
467 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";
468 echo '<li><code>%%txn_id%%</code> = The PayPal® Transaction ID. PayPal® assigns a unique identifier for every purchase.</li>' . "\n";
469 echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
470 echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
471 echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
472 echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
473 echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
474 echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
475 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";
476 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";
477 echo '</ul>' . "\n";
478 /**/
479 echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
480 echo '<ul>' . "\n";
481 echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
482 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";
483 echo '</ul>' . "\n";
484 echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
485 echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
486 echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
487 /**/
488 echo '</td>' . "\n";
489 /**/
490 echo '</tr>' . "\n";
491 echo '</tbody>' . "\n";
492 echo '</table>' . "\n";
493 echo '</div>' . "\n";
494 /**/
495 echo '</div>' . "\n";
496 /**/
497 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_sp_confirmation_email", get_defined_vars ());
498 }
499 /**/
500 if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_eot_behavior", true, get_defined_vars ()))
501 {
502 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_eot_behavior", get_defined_vars ());
503 /**/
504 echo '<div class="ws-menu-page-group" title="Automatic EOT Behavior">' . "\n";
505 /**/
506 echo '<div class="ws-menu-page-section ws-plugin--s2member-eot-behavior-section">' . "\n";
507 echo '<h3>PayPal® EOT Behavior ( required, please choose )</h3>' . "\n";
508 echo '<p>EOT = End Of Term. By default, s2Member will demote a paid Member to a Free Subscriber whenever their Subscription term has ended ( i.e. expired ), been cancelled, refunded, charged back to you, etc. s2Member demotes them to a Free Subscriber, so they will no longer have Member Level Access to your site. However, in some cases, you may prefer to have Customer accounts deleted completely, instead of just being demoted. This is where you choose which method works best for your site. If you don\'t want s2Member to take ANY action at all, you can disable s2Member\'s EOT System temporarily, or even completely.</p>' . "\n";
509 echo '<p>The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. For example, if you issue a refund to an unhappy Customer through PayPal®, s2Member will eventually be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). The communication from PayPal® -> s2Member is seamless.</p>' . "\n";
510 echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal®... 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";
511 echo '<p><em>s2Member will not process an EOT 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";
512 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_eot_behavior", get_defined_vars ());
513 /**/
514 echo '<p id="ws-plugin--s2member-auto-eot-system-enabled-via-cron"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] == 2 && (!function_exists ("wp_cron") || !wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule"))) ? '' : ' style="display:none;"') . '>If you\'d like to run s2Member\'s Auto-EOT System through a more traditional Cron Job; instead of through <code>WP-Cron</code>, you will need to configure a Cron Job through your server control panel; provided by your hosting company. Set the Cron Job to run <code>once about every 10 minutes to an hour</code>. You\'ll want to configure an HTTP Cron Job that loads this URL:<br /><code>' . esc_html (site_url ("/?s2member_auto_eot_system_via_cron=1")) . '</code></p>' . "\n";
515 /**/
516 echo '<table class="form-table">' . "\n";
517 echo '<tbody>' . "\n";
518 echo '<tr>' . "\n";
519 /**/
520 echo '<th>' . "\n";
521 echo '<label for="ws-plugin--s2member-auto-eot-system-enabled">' . "\n";
522 echo 'Enable s2Member\'s Auto-EOT System?' . "\n";
523 echo '</label>' . "\n";
524 echo '</th>' . "\n";
525 /**/
526 echo '</tr>' . "\n";
527 echo '<tr>' . "\n";
528 /**/
529 echo '<td>' . "\n";
530 echo '<select name="ws_plugin__s2member_auto_eot_system_enabled" id="ws-plugin--s2member-auto-eot-system-enabled">' . "\n";
531 /* Very advanced conditionals here. If the Auto-EOT System is NOT running, or NOT fully configured, this will indicate that no option is set - as sort of a built-in acknowledgment/warning in the UI panel. */
532 echo (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] == 1 && (!function_exists ("wp_cron") || !wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule"))) || ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] == 2 && (function_exists ("wp_cron") && wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule"))) || (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] && (function_exists ("wp_cron") && wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule")))) ? '<option value=""></option>' . "\n" : '';
533 echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] == 1 && function_exists ("wp_cron") && wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule")) ? ' selected="selected"' : '') . '>Yes ( enable the Auto-EOT System through WP-Cron )</option>' . "\n";
534 echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<option value="2"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] == 2 && (!function_exists ("wp_cron") || !wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule"))) ? ' selected="selected"' : '') . '>Yes ( but, I\'ll run it with my own Cron Job )</option>' . "\n" : '';
535 echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"] && (!function_exists ("wp_cron") || !wp_get_schedule ("ws_plugin__s2member_auto_eot_system__schedule"))) ? ' selected="selected"' : '') . '>No ( disable the Auto-EOT System )</option>' . "\n";
536 echo '</select><br />' . "\n";
537 echo 'Recommended setting: ( <code>Yes / enable via WP-Cron</code> )' . "\n";
538 echo '</td>' . "\n";
539 /**/
540 echo '</tr>' . "\n";
541 echo '<tr>' . "\n";
542 /**/
543 echo '<th>' . "\n";
544 echo '<label for="ws-plugin--s2member-membership-eot-behavior">' . "\n";
545 echo 'Membership EOT Behavior ( demote or delete )?' . "\n";
546 echo '</label>' . "\n";
547 echo '</th>' . "\n";
548 /**/
549 echo '</tr>' . "\n";
550 echo '<tr>' . "\n";
551 /**/
552 echo '<td>' . "\n";
553 echo '<select name="ws_plugin__s2member_membership_eot_behavior" id="ws-plugin--s2member-membership-eot-behavior">' . "\n";
554 echo '<option value="demote"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_eot_behavior"] === "demote") ? ' selected="selected"' : '') . '>Demote ( convert them to a Free Subscriber )</option>' . "\n";
555 echo '<option value="delete"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_eot_behavior"] === "delete") ? ' selected="selected"' : '') . '>Delete ( erase their account completely )</option>' . "\n";
556 echo '</select>' . "\n";
557 echo '</td>' . "\n";
558 /**/
559 echo '</tr>' . "\n";
560 echo '<tr>' . "\n";
561 /**/
562 echo '<th>' . "\n";
563 echo '<label for="ws-plugin--s2member-triggers-immediate-eot">' . "\n";
564 echo 'Refunds/Reversals ( trigger immediate EOT )?' . "\n";
565 echo '</label>' . "\n";
566 echo '</th>' . "\n";
567 /**/
568 echo '</tr>' . "\n";
569 echo '<tr>' . "\n";
570 /**/
571 echo '<td>' . "\n";
572 echo '<select name="ws_plugin__s2member_triggers_immediate_eot" id="ws-plugin--s2member-triggers-immediate-eot">' . "\n";
573 echo '<option value="none"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "none") ? ' selected="selected"' : '') . '>Neither ( I\'ll review these two events manually )</option>' . "\n";
574 echo '<option value="refunds"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "refunds") ? ' selected="selected"' : '') . '>Refunds ( refunds ALWAYS trigger an immediate EOT action )</option>' . "\n";
575 echo '<option value="reversals"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "reversals") ? ' selected="selected"' : '') . '>Reversals ( chargebacks ALWAYS trigger an immediate EOT action )</option>' . "\n";
576 echo '<option value="refunds,reversals"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "refunds,reversals") ? ' selected="selected"' : '') . '>Refunds/Reversals ( ALWAYS trigger an immediate EOT action )</option>' . "\n";
577 echo '</select><br />' . "\n";
578 echo 'This setting will <a href="#" onclick="alert(\'A Refund/Reversal Notification will ALWAYS be processed internally by s2Member, even if no action is taken by s2Member. This way you\\\'ll have the full ability to listen for these two events on your own; if you prefer ( optional ). For more information, check your Dashboard under: `s2Member -> API Notifications -> Refunds/Reversals`.\'); return false;">NOT affect</a> s2Member\'s internal API Notifications for Refund/Reversal events.' . "\n";
579 echo '</td>' . "\n";
580 /**/
581 echo '</tr>' . "\n";
582 echo '<tr>' . "\n";
583 /**/
584 echo '<th>' . "\n";
585 echo '<label for="ws-plugin--s2member-eot-time-ext-behavior">' . "\n";
586 echo 'Fixed-Term Extensions ( auto-extend )?' . "\n";
587 echo '</label>' . "\n";
588 echo '</th>' . "\n";
589 /**/
590 echo '</tr>' . "\n";
591 echo '<tr>' . "\n";
592 /**/
593 echo '<td>' . "\n";
594 echo '<select name="ws_plugin__s2member_eot_time_ext_behavior" id="ws-plugin--s2member-eot-time-ext-behavior">' . "\n";
595 echo '<option value="extend"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "extend") ? ' selected="selected"' : '') . '>Yes ( default, automatically extend any existing EOT Time )</option>' . "\n";
596 echo '<option value="reset"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "reset") ? ' selected="selected"' : '') . '>No ( do NOT extend; s2Member should reset EOT Time completely )</option>' . "\n";
597 echo '</select><br />' . "\n";
598 echo 'This setting will only affect Buy Now transactions for fixed-term lengths. By default, s2Member will automatically extend any existing EOT Time that a Customer may have.' . "\n";
599 echo '</td>' . "\n";
600 /**/
601 echo '</tr>' . "\n";
602 echo '</tbody>' . "\n";
603 echo '</table>' . "\n";
604 echo '</div>' . "\n";
605 /**/
606 echo '</div>' . "\n";
607 /**/
608 do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_eot_behavior", get_defined_vars ());
609 }
610 /**/
611 do_action ("ws_plugin__s2member_during_paypal_ops_page_after_left_sections", get_defined_vars ());
612 /**/
613 echo '<div class="ws-menu-page-hr"></div>' . "\n";
614 /**/
615 echo '<p class="submit"><input type="submit" class="button-primary" value="Save All Changes" /></p>' . "\n";
616 /**/
617 echo '</form>' . "\n";
618 /**/
619 echo '</td>' . "\n";
620 /**/
621 echo '<td class="ws-menu-page-table-r">' . "\n";
622 c_ws_plugin__s2member_menu_pages_rs::display ();
623 echo '</td>' . "\n";
624 /**/
625 echo '</tr>' . "\n";
626 echo '</tbody>' . "\n";
627 echo '</table>' . "\n";
628 /**/
629 echo '</div>' . "\n";
630 }
631 }
632 }
633 /**/
634 new c_ws_plugin__s2member_menu_page_paypal_ops ();
635 ?>