| 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_no_tx_data")) |
| 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_no_tx_data |
| 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_no_return_data", get_defined_vars ()); |
| 45 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */ |
| 46 |
/**/ |
| 47 |
$paypal["s2member_log"][] = "No Return-Data. Customer must wait for Email Confirmation."; |
| 48 |
/**/ |
| 49 |
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); |
| 50 |
do_action ("ws_plugin__s2member_during_paypal_return_during_no_return_data", 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 . ". However, the Customer MUST wait for Email Confirmation."; |
| 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. Customer must wait for Email Confirmation."; |
| 57 |
/**/ |
| 58 |
$paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering a free 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."; |
| 59 |
/**/ |
| 60 |
echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/ |
| 61 |
'<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.' . (($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 /><strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).' : ''),/**/ |
| 62 |
(($custom_success_redirection) ? "Check Your Email ( Then Click Here )" : "Back To Home Page"), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/"))); |
| 63 |
/**/ |
| 64 |
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); |
| 65 |
do_action ("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars ()); |
| 66 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */ |
| 67 |
/**/ |
| 68 |
return apply_filters ("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars ()); |
| 69 |
} |
| 70 |
} |
| 71 |
} |
| 72 |
?> |