Source Code Documentation


s2member-pro\includes\classes\gateways\paypal\paypal-menu-pages.inc.php


  1. <?php
  2. /**
  3. * PayPal® Menu Pages.
  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_paypal_menu_pages"))
  37. {
  38. /**
  39. * PayPal® Menu Pages.
  40. *
  41. * @package s2Member\Menu_Pages
  42. * @since 1.5
  43. */
  44. class c_ws_plugin__s2member_pro_paypal_menu_pages
  45. {
  46. /**
  47. * Add the pages for this Payment Gateway.
  48. *
  49. * @package s2Member\Menu_Pages
  50. * @since 1.5
  51. *
  52. * @attaches-to ``add_filter("ws_plugin__s2member_during_add_admin_options_add_paypal_buttons_page");``
  53. *
  54. * @param bool $add_paypal_buttons_page Expects a boolean value, passed through by the Filter.
  55. * @param array $vars Expects an array of defined variables passed through by the Filter.
  56. * @return bool Passes back the original value of ``$add_paypal_buttons_page``.
  57. */
  58. public static function paypal_admin_options ($add_paypal_buttons_page = TRUE, $vars = FALSE)
  59. {
  60. add_submenu_page ($vars["menu"], "s2Member Pro / PayPal® Pro Forms", "PayPal® Pro-Forms", "create_users", "ws-plugin--s2member-pro-paypal-forms", "c_ws_plugin__s2member_pro_paypal_menu_pages::paypal_forms_page");
  61. /**/
  62. return $add_paypal_buttons_page; /* Now add the PayPal® Buttons. */
  63. }
  64. /**
  65. * Builds PayPal® Pro option details into s2Member.
  66. *
  67. * @package s2Member\Menu_Pages
  68. * @since 1.5
  69. *
  70. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_details");``
  71. *
  72. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  73. * @return null
  74. */
  75. public static function paypal_ops_page_details ($vars = FALSE)
  76. {
  77. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-details.inc.php";
  78. /**/
  79. return; /* Return for uniformity. */
  80. }
  81. /**
  82. * Builds PayPal® Pro option detail rows into s2Member.
  83. *
  84. * @package s2Member\Menu_Pages
  85. * @since 1.5
  86. *
  87. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_detail_rows");``
  88. *
  89. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  90. * @return null
  91. */
  92. public static function paypal_ops_page_detail_rows ($vars = FALSE)
  93. {
  94. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-detail-rows.inc.php";
  95. /**/
  96. return; /* Return for uniformity. */
  97. }
  98. /**
  99. * Builds PayPal® Pro Sandbox tip into s2Member.
  100. *
  101. * @package s2Member\Menu_Pages
  102. * @since 1.5
  103. *
  104. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_details_after_sandbox_tip");``
  105. *
  106. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  107. * @return null
  108. */
  109. public static function paypal_ops_page_sandbox_tip ($vars = FALSE)
  110. {
  111. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-sandbox-tip.inc.php";
  112. /**/
  113. return; /* Return for uniformity. */
  114. }
  115. /**
  116. * Builds PayPal® Pro IPN tip into s2Member.
  117. *
  118. * @package s2Member\Menu_Pages
  119. * @since 1.5
  120. *
  121. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_quick_tip");``
  122. *
  123. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  124. * @return null
  125. */
  126. public static function paypal_ops_page_ipn_tip ($vars = FALSE)
  127. {
  128. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-ipn-tip.inc.php";
  129. /**/
  130. return; /* Return for uniformity. */
  131. }
  132. /**
  133. * Builds PayPal® Pro PDT tip into s2Member.
  134. *
  135. * @package s2Member\Menu_Pages
  136. * @since 1.5
  137. *
  138. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_pdt_after_quick_tip");``
  139. *
  140. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  141. * @return null
  142. */
  143. public static function paypal_ops_page_pdt_tip ($vars = FALSE)
  144. {
  145. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-pdt-tip.inc.php";
  146. /**/
  147. return; /* Return for uniformity. */
  148. }
  149. /**
  150. * Builds the PayPal® Pro Signup Confirmation Email into s2Member.
  151. *
  152. * @package s2Member\Menu_Pages
  153. * @since 1.5
  154. *
  155. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_signup_confirmation_email");``
  156. *
  157. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  158. * @return null
  159. */
  160. public static function paypal_ops_page_signup_email ($vars = FALSE)
  161. {
  162. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-signup-email.inc.php";
  163. /**/
  164. return; /* Return for uniformity. */
  165. }
  166. /**
  167. * Builds the PayPal® Pro Specific Post/Page Confirmation Email into s2Member.
  168. *
  169. * @package s2Member\Menu_Pages
  170. * @since 1.5
  171. *
  172. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_sp_confirmation_email");``
  173. *
  174. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  175. * @return null
  176. */
  177. public static function paypal_ops_page_sp_email ($vars = FALSE)
  178. {
  179. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-sp-email.inc.php";
  180. /**/
  181. return; /* Return for uniformity. */
  182. }
  183. /**
  184. * Builds the PayPal® Pro Tax Configuration into s2Member.
  185. *
  186. * @package s2Member\Menu_Pages
  187. * @since 1.5
  188. *
  189. * @attaches-to ``add_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_after_sp_confirmation_email");``
  190. *
  191. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  192. * @return null
  193. */
  194. public static function paypal_ops_page_tax_rates ($vars = FALSE)
  195. {
  196. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-ops-tax-rates.inc.php";
  197. /**/
  198. return; /* Return for uniformity. */
  199. }
  200. /**
  201. * Builds the documentation for Scripting / API Constants related to this Payment Gateway.
  202. *
  203. * @package s2Member\Menu_Pages
  204. * @since 1.5
  205. *
  206. * @attaches-to ``add_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_list_of_api_constants");``
  207. *
  208. * @param array $vars Expects an array of defined variables passed through by the Action Hook.
  209. * @return null
  210. */
  211. public static function paypal_scripting_page_api_constants ($vars = FALSE)
  212. {
  213. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-s-api-c.inc.php";
  214. /**/
  215. return; /* Return for uniformity. */
  216. }
  217. /**
  218. * Builds the Pro Forms page for this Payment Gateway.
  219. *
  220. * @package s2Member\Menu_Pages
  221. * @since 1.5
  222. *
  223. * @return null
  224. */
  225. public static function paypal_forms_page ()
  226. {
  227. if (c_ws_plugin__s2member_pro_paypal_responses::paypal_form_api_validation_errors ()) /* Report error if PayPal® Options are not yet configured. */
  228. c_ws_plugin__s2member_admin_notices::display_admin_notice ('Please configure <code>s2Member -> PayPal® Options</code> first. Once all of your PayPal® Options are configured; including your Email Address, API Username, Password, and Signature; return to this page &amp; generate your PayPal® Pro Form(s).<br /><br />*NOTE: If you\'re ONLY planning to use Free Registration Forms (e.g. you\'re NOT going to accept payments), you can safely ignore this warning and continue to use the Free Registration Form shortcode provided below.', true);
  229. /**/
  230. include_once dirname (dirname (dirname (dirname (__FILE__)))) . "/menu-pages/paypal-forms.inc.php";
  231. /**/
  232. return; /* Return for uniformity. */
  233. }
  234. }
  235. }
  236. ?>

s2member-pro\includes\classes\gateways\paypal\paypal-menu-pages.inc.php

Source Code Documentation