PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260917
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260917
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-no-tx-data.inc.php

paypal-return-in-no-tx-data.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 260917, at src/includes/classes/paypal-return-in-no-tx-data.inc.php

78 lines 4.3 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_no_tx_data"))
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_no_tx_data
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_no_return_data", get_defined_vars ());
46 unset($__refs, $__v);
47
48 $paypal["s2member_log"][] = "No Return-Data. Customer MUST wait for Email Confirmation.";
49 $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering an Initial/Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only (i.e., behind-the-scene), and the Customer must wait for Email Confirmation in these cases.";
50 $paypal["s2member_log"][] = /* Recording _POST + _GET vars for analysis and debugging. */ var_export ($_REQUEST, true);
51
52 foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
53 do_action("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars ());
54 unset($__refs, $__v);
55
56 if /* Using a custom success redirection URL? */ ($custom_success_redirection)
57 {
58 $paypal["s2member_log"][] = "Redirecting Customer to a custom URL: " . $custom_success_redirection . ".";
59
60 wp_redirect($custom_success_redirection);
61 }
62 else // Else we use the default redirection URL for this scenario, which is the Home Page.
63 {
64 $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after asking Customer to check their email).";
65
66 echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],
67 _x ('<strong>Thank you! (you MUST check your email before proceeding).</strong><br /><br />* Note: It can take <em>(up to 15 minutes)</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]))) ? '<br /><br />' . _x ('<strong>* Sandbox Mode *:</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''),
68 _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
69 }
70 foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
71 do_action("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars ());
72 unset($__refs, $__v);
73
74 return apply_filters("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars ());
75 }
76 }
77 }
78