Source Code Documentation


s2member-pro\includes\menu-pages\authnet-ops.inc.php


  1. <?php
  2. /**
  3. * Menu page for s2Member Pro ( Authorize.Net® Options page ).
  4. *
  5. * Copyright: © 2009-2011
  6. * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
  7. * ( coded in the USA )
  8. *
  9. * This WordPress® plugin ( s2Member Pro ) is comprised of two parts:
  10. *
  11. * o (1) Its PHP code is licensed under the GPL license, as is WordPress®.
  12. * You should have received a copy of the GNU General Public License,
  13. * along with this software. In the main directory, see: /licensing/
  14. * If not, see: {@link http://www.gnu.org/licenses/}.
  15. *
  16. * o (2) All other parts of ( s2Member Pro ); including, but not limited to:
  17. * the CSS code, some JavaScript code, images, and design;
  18. * are licensed according to the license purchased.
  19. * See: {@link http://www.s2member.com/prices/}
  20. *
  21. * Unless you have our prior written consent, you must NOT directly or indirectly license,
  22. * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module;
  23. * or make an offer to do any of these things. All of these things are strictly
  24. * prohibited with part (2) of the s2Member Pro Module.
  25. *
  26. * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com
  27. * ( i.e. new features, bug fixes, updates, improvements ); along with full access
  28. * to our video tutorial library: {@link http://www.s2member.com/videos/}
  29. *
  30. * @package s2Member\Menu_Pages
  31. * @since 1.5
  32. */
  33. if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
  34. exit ("Do not access this file directly.");
  35. /**/
  36. if (!class_exists ("c_ws_plugin__s2member_pro_menu_page_authnet_ops"))
  37. {
  38. /**
  39. * Menu page for s2Member Pro ( Authorize.Net® Options page ).
  40. *
  41. * @package s2Member\Menu_Pages
  42. * @since 110531
  43. */
  44. class c_ws_plugin__s2member_pro_menu_page_authnet_ops
  45. {
  46. public function __construct ()
  47. {
  48. echo '<div class="wrap ws-menu-page">' . "\n";
  49. /**/
  50. echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
  51. echo '<h2>s2Member® Pro / Authorize.Net® Options</h2>' . "\n";
  52. /**/
  53. echo '<table class="ws-menu-page-table">' . "\n";
  54. echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
  55. echo '<tr class="ws-menu-page-table-tr">' . "\n";
  56. echo '<td class="ws-menu-page-table-l">' . "\n";
  57. /**/
  58. echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form">' . "\n";
  59. 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";
  60. /**/
  61. echo '<div class="ws-menu-page-group" title="Authorize.Net® Account Details">' . "\n";
  62. /**/
  63. echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-authnet-account-details-section">' . "\n";
  64. echo '<h3>Authorize.Net® Account Details ( required )</h3>' . "\n";
  65. echo '<p><a href="http://www.s2member.com/authorize.net" target="_blank" rel="external">Authorize.Net®</a> is a leading provider of payment gateway services, managing the submission of billions of transactions to processing networks on behalf of merchant customers. Authorize.Net is a solution offered by the CyberSource Corporation, a wholly owned subsidiary of Visa (NYSE: V).</p>' . "\n";
  66. echo '<p>s2Member has been integrated with Authorize.Net® for Direct Payments and also for ARB (Automated Recurring Billing). In order to take advantage of this integration, you will need to have an Authorize.Net® Merchant Account. Once you have an account, all of the details below can be obtained from inside of your Authorize.Net® account. If you need assistance, please check their <a href="http://www.s2member.com/authorize.net-developers" target="_blank" rel="external">help section</a>.</p>' . "\n";
  67. echo '<p><em><strong>*Authorize.Net® Version ( 3.1 )*</strong> s2Member integrates with Transaction Version 3.1 for Authorize.Net®. Please log into your Authorize.Net® Merchant account and make sure your Transaction Version setting is configured as: <code>3.1</code>. You will find this inside your Authorize.Net® Merchant account, under: <code>Account -> Settings -> Transaction Version</code>.</em></p>' . "\n";
  68. echo '<p><em><strong>*Recurring Billing*</strong> If you plan to use any of the ( `Subscription` ) options in the s2Member Form Generator for Authorize.Net®, you will ALSO need <a href="http://www.s2member.com/authorize.net-arb" target="_blank" rel="external">ARB ( Automated Recurring Billing )</a> enabled for your Authorize.Net® account. Authorize.Net\'s Recurring Billing service is <strong>required</strong> for all types of ( `Subscriptions` ), whether you intend for them to be recurring or not. However, it is NOT required for ( `Buy Now` ) functionality. The drop-down menus in the s2Member Form Generator, have been marked ( `Subscription` ) and ( `Buy Now` ) just for this reason. See: <code>s2Member -> Authorize.Net® Pro Forms</code>. This way you can see which options will require the use of Authorize.Net\'s Recurring Billing service. Authorize.Net® will charge you a small monthly fee for their Automated Recurring Billing service.</em></p>' . "\n";
  69. echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p><em><strong>*Secure Server*</strong> In order to comply with Authorize.Net® and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Authorize.Net® Pro Forms on an SSL enabled site. Please check with your hosting provider to ask about obtaining an SSL certificate for your domain. Please note... when you create Authorize.Net® Pro Forms with s2Member; you\'ll be supplied with WordPress® Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). &mdash; You can skip the SSL certificate during Development/Sandbox testing. SSL is not required until you officially go live. Once you\'re live, you can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page.</em></p>' . "\n" : '<p><em><strong>*Secure Server*</strong> In order to comply with Authorize.Net® and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Authorize.Net® Pro Forms on an SSL enabled page. When you create Authorize.Net® Pro Forms with s2Member; you\'ll be supplied with WordPress® Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). You can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page that contains a Pro Form Shortcode. This tells s2Member to force those special Posts/Pages to be viewed over SSL at all times; no matter what.</em></p>' . "\n";
  70. echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p><em><strong>*SSL Compatibility*</strong> All themes available at <a href="http://www.primothemes.com/" target="_blank" rel="external">PriMoThemes.com</a> include full support for SSL, as does WordPress® itself. However, there are many themes/plugins that do NOT support SSL enabled Posts/Pages like they should. For this reason, you should be very careful when choosing a WordPress® theme to use with s2Member Pro. Otherwise, your visitors could see the famous "Secure/Insecure" warnings in Internet Explorer® browsers. With s2Member installed, you can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page. s2Member will buffer output on those special Posts/Pages, converting everything over to <code>https://</code> for you automatically, and forcing those specific Posts/Pages to be viewed over a secure SSL connection; so long as your server supports the https protocol.</em></p>' . "\n" : '';
  71. /**/
  72. echo '<table class="form-table">' . "\n";
  73. echo '<tbody>' . "\n";
  74. echo '<tr>' . "\n";
  75. /**/
  76. echo '<th>' . "\n";
  77. echo '<label for="ws-plugin--s2member-pro-authnet-api-login-id">' . "\n";
  78. echo 'Authorize.Net® API Login ID:' . "\n";
  79. echo '</label>' . "\n";
  80. echo '</th>' . "\n";
  81. /**/
  82. echo '</tr>' . "\n";
  83. echo '<tr>' . "\n";
  84. /**/
  85. echo '<td>' . "\n";
  86. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_authnet_api_login_id" id="ws-plugin--s2member-pro-authnet-api-login-id" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_api_login_id"]) . '" /><br />' . "\n";
  87. echo 'You\'ll find this in your Authorize.Net® Merchant account, under: <code>Account -> Settings</code>.' . "\n";
  88. echo '</td>' . "\n";
  89. /**/
  90. echo '</tr>' . "\n";
  91. echo '<tr>' . "\n";
  92. /**/
  93. echo '<th>' . "\n";
  94. echo '<label for="ws-plugin--s2member-pro-authnet-api-trans-key">' . "\n";
  95. echo 'Authorize.Net® API Transaction Key:' . "\n";
  96. echo '</label>' . "\n";
  97. echo '</th>' . "\n";
  98. /**/
  99. echo '</tr>' . "\n";
  100. echo '<tr>' . "\n";
  101. /**/
  102. echo '<td>' . "\n";
  103. echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_authnet_api_trans_key" id="ws-plugin--s2member-pro-authnet-api-trans-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_api_trans_key"]) . '" /><br />' . "\n";
  104. echo 'You\'ll find this in your Authorize.Net® Merchant account, under: <code>Account -> Settings</code>.' . "\n";
  105. echo '</td>' . "\n";
  106. /**/
  107. echo '</tr>' . "\n";
  108. echo '<tr>' . "\n";
  109. /**/
  110. echo '<th>' . "\n";
  111. echo '<label for="ws-plugin--s2member-pro-authnet-api-salt-key">' . "\n";
  112. echo 'Authorize.Net® Secret MD5 Hash:' . "\n";
  113. echo '</label>' . "\n";
  114. echo '</th>' . "\n";
  115. /**/
  116. echo '</tr>' . "\n";
  117. echo '<tr>' . "\n";
  118. /**/
  119. echo '<td>' . "\n";
  120. echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_authnet_api_salt_key" id="ws-plugin--s2member-pro-authnet-api-salt-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_api_salt_key"]) . '" /><br />' . "\n";
  121. echo 'You\'ll set this in your Authorize.Net® Merchant account, under: <code>Account -> Settings</code>.' . "\n";
  122. echo '</td>' . "\n";
  123. /**/
  124. echo '</tr>' . "\n";
  125. echo '</tbody>' . "\n";
  126. echo '</table>' . "\n";
  127. /**/
  128. echo '<div class="ws-menu-page-hr"></div>' . "\n";
  129. /**/
  130. echo '<table class="form-table">' . "\n";
  131. echo '<tbody>' . "\n";
  132. echo '<tr>' . "\n";
  133. /**/
  134. echo '<th style="padding-top:0;">' . "\n";
  135. echo '<label for="ws-plugin--s2member-pro-authnet-sandbox">' . "\n";
  136. echo 'Developer/Sandbox Testing?' . "\n";
  137. echo '</label>' . "\n";
  138. echo '</th>' . "\n";
  139. /**/
  140. echo '</tr>' . "\n";
  141. echo '<tr>' . "\n";
  142. /**/
  143. echo '<td>' . "\n";
  144. echo '<input type="radio" name="ws_plugin__s2member_pro_authnet_sandbox" id="ws-plugin--s2member-pro-authnet-sandbox-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_sandbox"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-pro-authnet-sandbox-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_pro_authnet_sandbox" id="ws-plugin--s2member-pro-authnet-sandbox-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_sandbox"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-pro-authnet-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
  145. echo '<em>Only enable this if you\'ve provided Developer credentials above.<br />This puts s2Member\'s Authorize.Net® integration into Sandbox/Test mode.<br />See: <a href="http://www.s2member.com/authorize.net-test-accounts" target="_blank" rel="external">Authorize.Net® Test Accounts</a></em>' . "\n";
  146. echo '</td>' . "\n";
  147. /**/
  148. echo '</tr>' . "\n";
  149. /**/
  150. if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
  151. {
  152. echo '<tr>' . "\n";
  153. /**/
  154. echo '<th>' . "\n";
  155. echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
  156. echo 'Enable Logging Routines?<br />' . "\n";
  157. echo '<small><em class="ws-menu-page-hilite">* This setting applies universally. [ <a href="#" onclick="alert(\'This configuration option may ALSO appear under ( s2Member -> PayPal® Options ). Feel free to configure it here; but please remember that this setting is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with s2Member.\'); return false;">?</a> ]</em></small>' . "\n";
  158. echo '</label>' . "\n";
  159. echo '</th>' . "\n";
  160. /**/
  161. echo '</tr>' . "\n";
  162. echo '<tr>' . "\n";
  163. /**/
  164. echo '<td>' . "\n";
  165. 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";
  166. 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";
  167. echo '</td>' . "\n";
  168. /**/
  169. echo '</tr>' . "\n";
  170. }
  171. /**/
  172. echo '</tbody>' . "\n";
  173. echo '</table>' . "\n";
  174. echo '</div>' . "\n";
  175. /**/
  176. echo '</div>' . "\n";
  177. /**/
  178. echo '<div class="ws-menu-page-group" title="Authorize.Net® SP / IPN Integration">' . "\n";
  179. /**/
  180. echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-authnet-ipn-section">' . "\n";
  181. echo '<h3>Authorize.Net® Silent Post Integration ( required )<br />aka: Authorize.Net® IPN ( Instant Payment Notifications )</h3>' . "\n";
  182. echo '<p>Log into your Authorize.Net® Merchant account and navigate to this section:<br /><code>Account -> Settings -> Silent Post URL</code></p>' . "\n";
  183. echo '<p>Your Authorize.Net® Silent Post URL is:<br /><code>' . esc_html (site_url ("/?s2member_pro_authnet_notify=1")) . '</code></p>' . "\n";
  184. echo '</div>' . "\n";
  185. /**/
  186. echo '</div>' . "\n";
  187. /**/
  188. echo '<div class="ws-menu-page-group" title="Signup Confirmation Email ( Pro Form )">' . "\n";
  189. /**/
  190. echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-signup-confirmation-email-section">' . "\n";
  191. echo '<h3>Signup Confirmation Email ( required, but the default works fine )<br />— specifically for s2Member Pro Form integrations</h3>' . "\n";
  192. echo '<p>This email is sent to new Customers after they successfully complete an Authorize.Net® "Pro Form" submission on your site. The <strong>primary</strong> purpose of this email, is to provide the Customer with a receipt, and NOT to send them a <code>%%registration_url%%</code>, because s2Member\'s Authorize.Net® Pro Form integration handles that automatically; based on scenario. You may want to customize this email further, by providing details that are specifically geared to your site.</p>' . "\n";
  193. /**/
  194. echo '<p><em class="ws-menu-page-hilite">* This email configuration is universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'This configuration panel may ALSO appear under ( s2Member -> PayPal® Options ). Feel free to configure this email here; but please remember that this configuration is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with s2Member Pro Forms.\'); return false;">?</a> ]</em></p>' . "\n";
  195. /**/
  196. echo '<table class="form-table">' . "\n";
  197. echo '<tbody>' . "\n";
  198. echo '<tr>' . "\n";
  199. /**/
  200. echo '<th>' . "\n";
  201. echo '<label for="ws-plugin--s2member-pro-signup-email-recipients">' . "\n";
  202. echo 'Signup Confirmation Recipients:' . "\n";
  203. echo '</label>' . "\n";
  204. echo '</th>' . "\n";
  205. /**/
  206. echo '</tr>' . "\n";
  207. echo '<tr>' . "\n";
  208. /**/
  209. echo '<td>' . "\n";
  210. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_signup_email_recipients" id="ws-plugin--s2member-pro-signup-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_signup_email_recipients"]) . '" /><br />' . "\n";
  211. echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
  212. echo '<code>"%%full_name%%" &lt;%%payer_email%%&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
  213. echo '</td>' . "\n";
  214. /**/
  215. echo '</tr>' . "\n";
  216. echo '<tr>' . "\n";
  217. /**/
  218. echo '<th>' . "\n";
  219. echo '<label for="ws-plugin--s2member-pro-signup-email-subject">' . "\n";
  220. echo 'Signup Confirmation Email Subject:' . "\n";
  221. echo '</label>' . "\n";
  222. echo '</th>' . "\n";
  223. /**/
  224. echo '</tr>' . "\n";
  225. echo '<tr>' . "\n";
  226. /**/
  227. echo '<td>' . "\n";
  228. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_signup_email_subject" id="ws-plugin--s2member-pro-signup-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_signup_email_subject"]) . '" /><br />' . "\n";
  229. echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through an Authorize.Net® Pro Form.' . "\n";
  230. echo '</td>' . "\n";
  231. /**/
  232. echo '</tr>' . "\n";
  233. echo '<tr>' . "\n";
  234. /**/
  235. echo '<th>' . "\n";
  236. echo '<label for="ws-plugin--s2member-pro-signup-email-message">' . "\n";
  237. echo 'Signup Confirmation Email Message:' . "\n";
  238. echo '</label>' . "\n";
  239. echo '</th>' . "\n";
  240. /**/
  241. echo '</tr>' . "\n";
  242. echo '<tr>' . "\n";
  243. /**/
  244. echo '<td>' . "\n";
  245. echo '<textarea name="ws_plugin__s2member_pro_signup_email_message" id="ws-plugin--s2member-pro-signup-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_signup_email_message"]) . '</textarea><br />' . "\n";
  246. echo 'Message Body used in the email sent to a Customer after a successful signup has occurred through an Authorize.Net® Pro Form.<br /><br />' . "\n";
  247. echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
  248. echo '<ul>' . "\n";
  249. echo '<li><code>%%registration_url%%</code> = Not needed with Authorize.Net® Pro Form integration. Pro Forms handle this automatically.</li>' . "\n";
  250. echo '<li><code>%%subscr_id%%</code> = The Authorize.Net® 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. Authorize.Net® 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";
  251. 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";
  252. 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";
  253. 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";
  254. echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
  255. echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
  256. echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
  257. echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
  258. echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
  259. 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";
  260. 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";
  261. 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";
  262. 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";
  263. 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";
  264. 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";
  265. 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";
  266. echo '</ul>' . "\n";
  267. /**/
  268. echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
  269. echo '<ul>' . "\n";
  270. echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
  271. 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";
  272. echo '</ul>' . "\n";
  273. echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
  274. echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
  275. echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
  276. /**/
  277. echo '</td>' . "\n";
  278. /**/
  279. echo '</tr>' . "\n";
  280. echo '</tbody>' . "\n";
  281. echo '</table>' . "\n";
  282. echo '</div>' . "\n";
  283. /**/
  284. echo '</div>' . "\n";
  285. /**/
  286. echo '<div class="ws-menu-page-group" title="Specific Post/Page Confirmation Email ( Pro Form )">' . "\n";
  287. /**/
  288. echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-sp-confirmation-email-section">' . "\n";
  289. echo '<h3>Specific Post/Page Confirmation Email ( required, but the default works fine )<br />— specifically for s2Member Pro Form integrations</h3>' . "\n";
  290. echo '<p>This email is sent to new Customers after they successfully complete an Authorize.Net® "Pro Form" submission on your site, 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 a receipt, 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";
  291. /**/
  292. echo '<p><em class="ws-menu-page-hilite">* This email configuration is universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'This configuration panel may ALSO appear under ( s2Member -> PayPal® Options ). Feel free to configure this email here; but please remember that this configuration is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with s2Member Pro Forms.\'); return false;">?</a> ]</em></p>' . "\n";
  293. /**/
  294. echo '<table class="form-table">' . "\n";
  295. echo '<tbody>' . "\n";
  296. echo '<tr>' . "\n";
  297. /**/
  298. echo '<th>' . "\n";
  299. echo '<label for="ws-plugin--s2member-pro-sp-email-recipients">' . "\n";
  300. echo 'Specific Post/Page Confirmation Recipients:' . "\n";
  301. echo '</label>' . "\n";
  302. echo '</th>' . "\n";
  303. /**/
  304. echo '</tr>' . "\n";
  305. echo '<tr>' . "\n";
  306. /**/
  307. echo '<td>' . "\n";
  308. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_sp_email_recipients" id="ws-plugin--s2member-pro-sp-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_sp_email_recipients"]) . '" /><br />' . "\n";
  309. echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
  310. echo '<code>"%%full_name%%" &lt;%%payer_email%%&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
  311. echo '</td>' . "\n";
  312. /**/
  313. echo '</tr>' . "\n";
  314. echo '<tr>' . "\n";
  315. /**/
  316. echo '<th>' . "\n";
  317. echo '<label for="ws-plugin--s2member-pro-sp-email-subject">' . "\n";
  318. echo 'Specific Post/Page Confirmation Email Subject:' . "\n";
  319. echo '</label>' . "\n";
  320. echo '</th>' . "\n";
  321. /**/
  322. echo '</tr>' . "\n";
  323. echo '<tr>' . "\n";
  324. /**/
  325. echo '<td>' . "\n";
  326. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_sp_email_subject" id="ws-plugin--s2member-pro-sp-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_sp_email_subject"]) . '" /><br />' . "\n";
  327. echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through an Authorize.Net® Pro Form, for Specific Post/Page Access.' . "\n";
  328. echo '</td>' . "\n";
  329. /**/
  330. echo '</tr>' . "\n";
  331. echo '<tr>' . "\n";
  332. /**/
  333. echo '<th>' . "\n";
  334. echo '<label for="ws-plugin--s2member-pro-sp-email-message">' . "\n";
  335. echo 'Specific Post/Page Confirmation Email Message:' . "\n";
  336. echo '</label>' . "\n";
  337. echo '</th>' . "\n";
  338. /**/
  339. echo '</tr>' . "\n";
  340. echo '<tr>' . "\n";
  341. /**/
  342. echo '<td>' . "\n";
  343. echo '<textarea name="ws_plugin__s2member_pro_sp_email_message" id="ws-plugin--s2member-pro-sp-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_sp_email_message"]) . '</textarea><br />' . "\n";
  344. echo 'Message Body used in the email sent to a Customer after a successful purchase has occurred through an Authorize.Net® Pro Form, for Specific Post/Page Access.<br /><br />' . "\n";
  345. echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
  346. echo '<ul>' . "\n";
  347. echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by s2Member ) where the Customer can gain access.</li>' . "\n";
  348. 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";
  349. echo '<li><code>%%txn_id%%</code> = The Authorize.Net® Transaction ID. Authorize.Net® assigns a unique identifier for every purchase.</li>' . "\n";
  350. 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";
  351. echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  352. echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  353. echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  354. echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  355. echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
  356. 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";
  357. 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";
  358. echo '</ul>' . "\n";
  359. /**/
  360. echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
  361. echo '<ul>' . "\n";
  362. echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
  363. 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";
  364. echo '</ul>' . "\n";
  365. echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
  366. echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
  367. echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
  368. /**/
  369. echo '</td>' . "\n";
  370. /**/
  371. echo '</tr>' . "\n";
  372. echo '</tbody>' . "\n";
  373. echo '</table>' . "\n";
  374. echo '</div>' . "\n";
  375. /**/
  376. echo '</div>' . "\n";
  377. echo '<div class="ws-menu-page-group" title="Tax Rate Calculations ( Pro Form )">' . "\n";
  378. /**/
  379. echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-tax-rates-section">' . "\n";
  380. echo '<h3>Tax Rate Calculations for Authorize.Net® Pro Forms ( optional )<br />— specifically for s2Member Pro Form integrations</h3>' . "\n";
  381. echo '<p>With Authorize.Net®, your software ( s2Member Pro ) is solely responsible for calculating Tax Rates. In the fields below, you can set a Global Default Tax Rate, and/or a "Custom Tax Configuration File"; which can be applied to specific countries, specific states, provinces, and even to specific zip code ranges. * Tax Rate calculations are fully compatible with international currencies and locations.</p>' . "\n";
  382. echo '<p>When you create an Authorize.Net® Pro Form with s2Member, you\'ll be asked to supply a <em>Charge Amount</em>. Then, during checkout... s2Member calculates Tax. The calculated Tax Rate is added to the <em>Charge Amount</em> in your Authorize.Net® Pro Form Shortcode. The Tax Rate will be displayed to a Customer during checkout, <strong>after</strong> they\'ve supplied a Billing Address. For example, if you create an Authorize.Net® Pro Form that charges a Customer <strong>$24.95</strong>, and the Tax Rate is configured as 7.0%; s2Member will automatically calculate the Tax as $1.75. A Customer will pay the Total Amount ( <em>Charge</em> + Tax = <strong>$26.70</strong> ).</p>' . "\n";
  383. echo '<p><em><strong>*Quick Tip*</strong> If you configure Tax, it\'s good to include a note somewhere in the <code>desc=""</code> attribute of your Shortcode. Something like <code>desc="$x.xx (plus tax)"</code>.</em></p>' . "\n";
  384. /**/
  385. echo '<p><em class="ws-menu-page-hilite">* This tax configuration is universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'This configuration panel may ALSO appear under ( s2Member -> PayPal® Options ). Feel free to configure taxes here; but please remember that this configuration is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with s2Member Pro Forms.\'); return false;">?</a> ]</em></p>' . "\n";
  386. /**/
  387. echo '<table class="form-table">' . "\n";
  388. echo '<tbody>' . "\n";
  389. echo '<tr>' . "\n";
  390. /**/
  391. echo '<th>' . "\n";
  392. echo '<label for="ws-plugin--s2member-pro-default-tax">' . "\n";
  393. echo 'Global Default Tax Rate:' . "\n";
  394. echo '</label>' . "\n";
  395. echo '</th>' . "\n";
  396. /**/
  397. echo '</tr>' . "\n";
  398. echo '<tr>' . "\n";
  399. /**/
  400. echo '<td>' . "\n";
  401. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_default_tax" id="ws-plugin--s2member-pro-default-tax" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_default_tax"]) . '" /><br />' . "\n";
  402. echo 'This can be a flat tax <code>( 1.75 )</code>, or a percentage <code>( 7.0% )</code>.' . "\n";
  403. echo '</td>' . "\n";
  404. /**/
  405. echo '</tr>' . "\n";
  406. echo '<tr>' . "\n";
  407. /**/
  408. echo '<th>' . "\n";
  409. echo '<label for="ws-plugin--s2member-pro-tax-rates">' . "\n";
  410. echo 'Custom Tax Configuration File ( one rate per line )<br />' . "\n";
  411. echo 'Apply different Tax Rates by country, state/province, or zip code range:' . "\n";
  412. echo '</label>' . "\n";
  413. echo '</th>' . "\n";
  414. /**/
  415. echo '</tr>' . "\n";
  416. echo '<tr>' . "\n";
  417. /**/
  418. echo '<td>' . "\n";
  419. echo '<textarea name="ws_plugin__s2member_pro_tax_rates" id="ws-plugin--s2member-pro-tax-rates" rows="10" wrap="off" spellcheck="false">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_tax_rates"]) . '</textarea><br />' . "\n";
  420. echo 'Please use one of the following formats ( <a href="#" onclick="alert(\'US=7.0%\nCA=12.0%\nHK=0.0%\nFLORIDA/US=7.5%\nIDAHO/US=6.0%\nALBERTA/CA=5.0%\nBRITISH COLUMBIA/CA=12.0%\n32000-34999/US=7.5%\n83200-83999/US=6.0%\n32601/US=6.5%\'); return false;">click for examples</a> )<br /><br />' . "\n";
  421. echo '<code>2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — low precedence<br />' . "\n";
  422. echo '<code>STATE OR PROVINCE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — higher precedence<br />' . "\n";
  423. echo '<code>ZIP CODE-ZIP CODE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — higher precedence ( zip code range )<br />' . "\n";
  424. echo '<code>ZIP CODE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — highest precedence ( specific zip code )' . "\n";
  425. echo '</td>' . "\n";
  426. /**/
  427. echo '</tr>' . "\n";
  428. echo '</tbody>' . "\n";
  429. echo '</table>' . "\n";
  430. echo '</div>' . "\n";
  431. /**/
  432. echo '</div>' . "\n";
  433. /**/
  434. echo '<div class="ws-menu-page-group" title="Automatic EOT Behavior">' . "\n";
  435. /**/
  436. echo '<div class="ws-menu-page-section ws-plugin--s2member-eot-behavior-section">' . "\n";
  437. echo '<h3>Authorize.Net® EOT Behavior ( required, please choose )</h3>' . "\n";
  438. 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 ) or is cancelled. 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";
  439. echo '<p>The Authorize.Net® ARB ( Automated Recurring Billing ) service will assist in notifying s2Member whenever a Subscription expires. For example, if a Customer cancels their own Subscription; or if you cancel a Customer\'s Subscription through Authorize.Net®, s2Member will eventually be notified ( with a 24-48 hour delay ), and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). ~ Otherwise, under normal circumstances, s2Member will not process an EOT until the User has completely used up the time they paid for.</em></p>' . "\n";
  440. /**/
  441. 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";
  442. /**/
  443. echo '<p><em class="ws-menu-page-hilite">* These options are universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'These settings may ALSO appear under ( s2Member -> PayPal® Options ). Feel free to configure them here; but please remember that these configuration options are applied universally ( i.e. they\\\'re SHARED ) among all Payment Gateways integrated with s2Member.\'); return false;">?</a> ]</em></p>' . "\n";
  444. /**/
  445. echo '<table class="form-table">' . "\n";
  446. echo '<tbody>' . "\n";
  447. echo '<tr>' . "\n";
  448. /**/
  449. echo '<th>' . "\n";
  450. echo '<label for="ws-plugin--s2member-auto-eot-system-enabled">' . "\n";
  451. echo 'Enable s2Member\'s Auto-EOT System?' . "\n";
  452. echo '</label>' . "\n";
  453. echo '</th>' . "\n";
  454. /**/
  455. echo '</tr>' . "\n";
  456. echo '<tr>' . "\n";
  457. /**/
  458. echo '<td>' . "\n";
  459. echo '<select name="ws_plugin__s2member_auto_eot_system_enabled" id="ws-plugin--s2member-auto-eot-system-enabled">' . "\n";
  460. /* 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. */
  461. 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" : '';
  462. 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";
  463. 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" : '';
  464. 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";
  465. echo '</select><br />' . "\n";
  466. echo 'Recommended setting: ( <code>Yes / enable via WP-Cron</code> )' . "\n";
  467. echo '</td>' . "\n";
  468. /**/
  469. echo '</tr>' . "\n";
  470. echo '<tr>' . "\n";
  471. /**/
  472. echo '<th>' . "\n";
  473. echo '<label for="ws-plugin--s2member-membership-eot-behavior">' . "\n";
  474. echo 'Membership EOT Behavior ( demote or delete )?' . "\n";
  475. echo '</label>' . "\n";
  476. echo '</th>' . "\n";
  477. /**/
  478. echo '</tr>' . "\n";
  479. echo '<tr>' . "\n";
  480. /**/
  481. echo '<td>' . "\n";
  482. echo '<select name="ws_plugin__s2member_membership_eot_behavior" id="ws-plugin--s2member-membership-eot-behavior">' . "\n";
  483. echo '<option value="demote"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_eot_behavior"] === "demote") ? ' selected="selected"' : '') . '>Demote ( convert them to a Free Subscriber )</option>' . "\n";
  484. echo '<option value="delete"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_eot_behavior"] === "delete") ? ' selected="selected"' : '') . '>Delete ( erase their account completely )</option>' . "\n";
  485. echo '</select>' . "\n";
  486. echo '</td>' . "\n";
  487. /**/
  488. echo '</tr>' . "\n";
  489. echo '<tr>' . "\n";
  490. /**/
  491. echo '<th>' . "\n";
  492. echo '<label for="ws-plugin--s2member-triggers-immediate-eot">' . "\n";
  493. echo 'Refunds/Reversals ( trigger immediate EOT )?' . "\n";
  494. echo '</label>' . "\n";
  495. echo '</th>' . "\n";
  496. /**/
  497. echo '</tr>' . "\n";
  498. echo '<tr>' . "\n";
  499. /**/
  500. echo '<td>' . "\n";
  501. echo '<select name="ws_plugin__s2member_triggers_immediate_eot" id="ws-plugin--s2member-triggers-immediate-eot" disabled="disabled">' . "\n";
  502. echo '<option value="none" selected="selected">Neither ( I\'ll review these two events manually )</option>' . "\n";
  503. echo '</select><br />' . "\n";
  504. echo 'N/A with Authorize.Net®. Authorize.Net® does NOT notify s2Member on refunds/chargebacks.' . "\n";
  505. echo '</td>' . "\n";
  506. /**/
  507. echo '</tr>' . "\n";
  508. echo '<tr>' . "\n";
  509. /**/
  510. echo '<th>' . "\n";
  511. echo '<label for="ws-plugin--s2member-eot-time-ext-behavior">' . "\n";
  512. echo 'Fixed-Term Extensions ( auto-extend )?' . "\n";
  513. echo '</label>' . "\n";
  514. echo '</th>' . "\n";
  515. /**/
  516. echo '</tr>' . "\n";
  517. echo '<tr>' . "\n";
  518. /**/
  519. echo '<td>' . "\n";
  520. echo '<select name="ws_plugin__s2member_eot_time_ext_behavior" id="ws-plugin--s2member-eot-time-ext-behavior">' . "\n";
  521. 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";
  522. 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";
  523. echo '</select><br />' . "\n";
  524. 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";
  525. echo '</td>' . "\n";
  526. /**/
  527. echo '</tr>' . "\n";
  528. echo '</tbody>' . "\n";
  529. echo '</table>' . "\n";
  530. echo '</div>' . "\n";
  531. /**/
  532. echo '</div>' . "\n";
  533. /**/
  534. echo '<div class="ws-menu-page-hr"></div>' . "\n";
  535. /**/
  536. echo '<p class="submit"><input type="submit" class="button-primary" value="Save All Changes" /></p>' . "\n";
  537. /**/
  538. echo '</form>' . "\n";
  539. /**/
  540. echo '</td>' . "\n";
  541. /**/
  542. echo '<td class="ws-menu-page-table-r">' . "\n";
  543. c_ws_plugin__s2member_menu_pages_rs::display ();
  544. echo '</td>' . "\n";
  545. /**/
  546. echo '</tr>' . "\n";
  547. echo '</tbody>' . "\n";
  548. echo '</table>' . "\n";
  549. /**/
  550. echo '</div>' . "\n";
  551. }
  552. }
  553. }
  554. /**/
  555. new c_ws_plugin__s2member_pro_menu_page_authnet_ops ();
  556. ?>

s2member-pro\includes\menu-pages\authnet-ops.inc.php

Source Code Documentation