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

76 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // @codingStandardsIgnoreFile
3 /**
4 * s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
5 *
6 * Copyright: © 2009-2011
7 * {@link http://websharks-inc.com/ WebSharks, Inc.}
8 * (coded in the USA)
9 *
10 * Released under the terms of the GNU General Public License.
11 * You should have received a copy of the GNU General Public License,
12 * along with this software. In the main directory, see: /licensing/
13 * If not, see: {@link http://www.gnu.org/licenses/}.
14 *
15 * @package s2Member\PayPal
16 * @since 110720
17 */
18 if(!defined('WPINC')) // MUST have WordPress.
19 exit("Do not access this file directly.");
20
21 if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_proxy_x_preview"))
22 {
23 /**
24 * s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
25 *
26 * @package s2Member\PayPal
27 * @since 110720
28 */
29 class c_ws_plugin__s2member_paypal_return_in_proxy_x_preview
30 {
31 /**
32 * s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
33 *
34 * @package s2Member\PayPal
35 * @since 110720
36 *
37 * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
38 * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply.
39 */
40 public static function /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */ cp ($vars = array())
41 {
42 extract /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */($vars, EXTR_OVERWRITE | EXTR_REFS);
43
44 foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
45 do_action("ws_plugin__s2member_during_paypal_return_before_explicit_x_preview", get_defined_vars ());
46 unset($__refs, $__v);
47
48 $paypal["s2member_log"][] = "Test preview of Return Page `proxy_use`: ( `x_preview` ).";
49
50 foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
51 do_action("ws_plugin__s2member_during_paypal_return_during_explicit_x_preview", get_defined_vars ());
52 unset($__refs, $__v);
53
54 if /* Using a custom success redirection URL? */ ($custom_success_redirection)
55 {
56 $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ".";
57
58 wp_redirect($custom_success_redirection);
59 }
60 else // Else we use the default redirection URL for this scenario, which is the Home Page.
61 {
62 $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after displaying preview information).";
63
64 echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],
65 _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="http://s2member.com/prices/" target="_blank">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>', "s2member-front", "s2member"),
66 _x ("Continue (Click Here)", "s2member-front", "s2member"), home_url ("/"));
67 }
68 foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
69 do_action("ws_plugin__s2member_during_paypal_return_after_explicit_x_preview", get_defined_vars ());
70 unset($__refs, $__v);
71
72 return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_x_preview", $paypal, get_defined_vars ());
73 }
74 }
75 }
76