PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 110913
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v110913
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 / classes / paypal-return-in-proxy-x-preview.inc.php

paypal-return-in-proxy-x-preview.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 110913, at includes/classes/paypal-return-in-proxy-x-preview.inc.php

70 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ).
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\PayPal
15 * @since 110720
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_paypal_return_in_proxy_x_preview"))
21 {
22 /**
23 * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ).
24 *
25 * @package s2Member\PayPal
26 * @since 110720
27 */
28 class c_ws_plugin__s2member_paypal_return_in_proxy_x_preview
29 {
30 /**
31 * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ).
32 *
33 * @package s2Member\PayPal
34 * @since 110720
35 *
36 * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
37 * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply.
38 */
39 public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
40 {
41 extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42 /**/
43 eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44 do_action ("ws_plugin__s2member_during_paypal_return_before_explicit_x_preview", get_defined_vars ());
45 unset ($__refs, $__v); /* Unset defined __refs, __v. */
46 /**/
47 $paypal["s2member_log"][] = "Test preview of Return Page `proxy_use`: ( `x_preview` ).";
48 /**/
49 eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50 do_action ("ws_plugin__s2member_during_paypal_return_during_explicit_x_preview", get_defined_vars ());
51 unset ($__refs, $__v); /* Unset defined __refs, __v. */
52 /**/
53 if ($custom_success_redirection) /* Using a custom success redirection URL? */
54 $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". Test preview of Return Page `proxy_use`: ( `x_preview` ).";
55 else /* Else we use the default redirection URL for this scenario, which is the Home Page. */
56 $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Test preview of Return Page `proxy_use`: ( `x_preview` ).";
57 /**/
58 echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
59 sprintf (_x ('<strong>Thank you! ( this is a preview, no action necessary ).</strong><br /><br />* Note: each of your Customers are returned back to your site immediately after they complete checkout. This Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>.<br /><br /><em>* With <a href="%s" target="_blank">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>', "s2member-front", "s2member"), esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices"))),/**/
60 _x ("Continue ( Click Here )", "s2member-front", "s2member"), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
61 /**/
62 eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
63 do_action ("ws_plugin__s2member_during_paypal_return_after_explicit_x_preview", get_defined_vars ());
64 unset ($__refs, $__v); /* Unset defined __refs, __v. */
65 /**/
66 return apply_filters ("c_ws_plugin__s2member_paypal_return_in_proxy_x_preview", $paypal, get_defined_vars ());
67 }
68 }
69 }
70 ?>