本文整理汇总了PHP中c_ws_plugin__s2member_utils_users::get_user_custom_with方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_users::get_user_custom_with方法的具体用法?PHP c_ws_plugin__s2member_utils_users::get_user_custom_with怎么用?PHP c_ws_plugin__s2member_utils_users::get_user_custom_with使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c_ws_plugin__s2member_utils_users
的用法示例。
在下文中一共展示了c_ws_plugin__s2member_utils_users::get_user_custom_with方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paypal_notify
/**
* Handles PayPal IPN processing.
*
* These same routines also handle s2Member Pro/PayPal Pro operations;
* giving you the ability *(as needed)* to Hook into these routines using
* WordPress Hooks/Filters; as seen in the source code below.
*
* Please do NOT modify the source code directly.
* Instead, use WordPress Hooks/Filters.
*
* For example, if you'd like to add your own custom conditionals, use:
* ``add_filter ('ws_plugin__s2member_during_paypal_notify_conditionals', 'your_function');``
*
* @package s2Member\PayPal
* @since 3.5
*
* @attaches-to ``add_action('init');``
*/
public static function paypal_notify()
{
global $current_site, $current_blog;
do_action('ws_plugin__s2member_before_paypal_notify', get_defined_vars());
if (!empty($_GET['s2member_paypal_notify']) && ($GLOBALS['WS_PLUGIN__']['s2member']['o']['paypal_business'] || !empty($_REQUEST['s2member_paypal_proxy']))) {
@ignore_user_abort(TRUE);
// Important. Continue processing even if/when the connection is broken by the sending party.
include_once ABSPATH . 'wp-admin/includes/admin.php';
// Get administrative functions. Needed for `wp_delete_user()`.
$email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
// Filters on?
c_ws_plugin__s2member_email_configs::email_config_release();
// Release s2Member Filters.
$paypal = array();
// Initialize PayPal array; we also reference this with a variable for a possible proxy handler.
if (!empty($_REQUEST['s2member_paypal_proxy']) && in_array($_REQUEST['s2member_paypal_proxy'], array('alipay', 'stripe', 'authnet', 'clickbank', 'ccbill', 'google'), TRUE)) {
${esc_html(trim(stripslashes($_REQUEST['s2member_paypal_proxy'])))} =& $paypal;
}
// Internal alias by reference.
if (is_array($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_postvars()) && ($_paypal = $paypal) && ($_paypal_s = serialize($_paypal))) {
$paypal['s2member_log'][] = 'IPN received on: ' . date('D M j, Y g:i:s a T');
$paypal['s2member_log'][] = 's2Member POST vars verified ' . (!empty($paypal['proxy_verified']) ? 'with a Proxy Key' : 'through a POST back to PayPal.');
$payment_status_issues = '/^(failed|denied|expired|refunded|partially_refunded|reversed|reversal|canceled_reversal|voided)$/i';
$paypal['subscr_gateway'] = !empty($_REQUEST['s2member_paypal_proxy']) ? esc_html(trim(stripslashes($_REQUEST['s2member_paypal_proxy']))) : 'paypal';
$coupon = !empty($_REQUEST['s2member_paypal_proxy_coupon']) && is_array($_REQUEST['s2member_paypal_proxy_coupon']) ? stripslashes_deep($_REQUEST['s2member_paypal_proxy_coupon']) : array();
$coupon = isset($coupon['full_coupon_code'], $coupon['coupon_code'], $coupon['affiliate_id']) && is_string($coupon['full_coupon_code']) && is_string($coupon['coupon_code']) && is_string($coupon['affiliate_id']) ? $coupon : array('full_coupon_code' => '', 'coupon_code' => '', 'affiliate_id' => '');
if (!empty($paypal['txn_type']) && $paypal['txn_type'] === 'merch_pmt') {
// This is mostly irrelevant, but it helps to keep the logs cleaner.
sleep(15);
}
// Wait for Pro-Form procesing to complete.
if (empty($paypal['custom']) && !empty($paypal['recurring_payment_id'])) {
// Recurring Profile ID.
$paypal['custom'] = c_ws_plugin__s2member_utils_users::get_user_custom_with($paypal['recurring_payment_id']);
} else {
if (empty($paypal['custom']) && !empty($paypal['mp_id'])) {
// Billing Agreement ID.
$paypal['custom'] = c_ws_plugin__s2member_utils_users::get_user_custom_with($paypal['mp_id']);
}
}
if (!empty($paypal['custom']) && preg_match('/^' . preg_quote(preg_replace('/\\:([0-9]+)$/', '', $_SERVER['HTTP_HOST']), '/') . '/i', $paypal['custom'])) {
$paypal['s2member_log'][] = 's2Member originating domain (`$_SERVER["HTTP_HOST"]`) validated.';
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
if (!apply_filters('ws_plugin__s2member_during_paypal_notify_conditionals', FALSE, get_defined_vars())) {
unset($__refs, $__v);
// From the filter above.
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_virtual_terminal::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_express_checkout::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_cart::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_send_money::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_web_accept_sp::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_rec_profile_creation_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_failed_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancellation_w_level::cp(get_defined_vars())) {
//.........这里部分代码省略.........
示例2: authnet_parse_arb_desc
/**
* Parses an Authorize.Net® Silent Post.
*
* Parses `s2_reference`, `s2_domain`, `s2_invoice`, `s2_start_time`, `s2_p1`, `s2_p3`, `s2_custom`
* from an Authorize.Net® Silent Post *( aka: IPN )* response.
*
* @package s2Member\AuthNet
* @since 1.5
*
* @param array $array Expects an array of details returned by an Authorize.Net® Silent Post.
* @return array|bool The same ``$array``, but with additional details filled by this routine; else false.
*
* @todo Continue optimizing this routine with ``empty()`` and ``isset()``.
* @todo Candidate for the use of ``ifsetor()``?
*/
public static function authnet_parse_arb_desc($array = FALSE)
{
if (is_array($array) && !empty($array["x_description"]) && preg_match("/\\(\\((.+?)\\)\\)/i", $array["x_description"], $m)) {
list($array["s2_reference"], $array["s2_domain"], $array["s2_invoice"]) = preg_split("/~/", $m[1], 3);
list($array["s2_start_time"], $array["s2_p1"], $array["s2_p3"]) = preg_split("/\\:/", $array["s2_reference"], 3);
/**/
$array["x_description"] = preg_replace("/\\(\\((.+?)\\)\\)/i", "", $array["x_description"]);
/**/
$array["s2_custom"] = !empty($array["x_subscription_id"]) ? c_ws_plugin__s2member_utils_users::get_user_custom_with($array["x_subscription_id"]) : "";
$array["s2_custom"] = $array["s2_custom"] ? $array["s2_custom"] : $array["s2_domain"];
/**/
return c_ws_plugin__s2member_utils_strings::trim_deep($array);
} else {
/* False. */
return false;
}
}
示例3: paypal_notify
/**
* Handles PayPal® IPN processing.
*
* These same routines also handle s2Member Pro/PayPal® Pro operations;
* giving you the ability *( as needed )* to Hook into these routines using
* WordPress® Hooks/Filters; as seen in the source code below.
*
* Please do NOT modify the source code directly.
* Instead, use WordPress® Hooks/Filters.
*
* For example, if you'd like to add your own custom conditionals, use:
* ``add_filter ("ws_plugin__s2member_during_paypal_notify_conditionals", "your_function");``
*
* @package s2Member\PayPal
* @since 3.5
*
* @attaches-to ``add_action("init");``
*
* @return null Or exits script execution after handling IPN procesing.
*/
public static function paypal_notify()
{
global $current_site, $current_blog;
/* For Multisite support. */
/**/
do_action("ws_plugin__s2member_before_paypal_notify", get_defined_vars());
/**/
if (!empty($_GET["s2member_paypal_notify"]) && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] || !empty($_GET["s2member_paypal_proxy"]))) {
@ignore_user_abort(true);
/* Important. Continue processing even if/when the connection is broken by the sending party. */
/**/
include_once ABSPATH . "wp-admin/includes/admin.php";
/* Get administrative functions. Needed for `wp_delete_user()`. */
/**/
$email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
/* Filters on? */
c_ws_plugin__s2member_email_configs::email_config_release();
/* Release s2Member Filters. */
/**/
if (is_array($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_postvars()) && ($_paypal = $paypal) && ($_paypal_s = serialize($_paypal))) {
$paypal["s2member_log"][] = "IPN received on: " . date("D M j, Y g:i:s a T");
$paypal["s2member_log"][] = "s2Member POST vars verified " . (!empty($paypal["proxy_verified"]) ? "with a Proxy Key" : "through a POST back to PayPal®.");
/**/
$payment_status_issues = "/^(failed|denied|expired|refunded|partially_refunded|reversed|reversal|canceled_reversal|voided)\$/i";
/**/
$paypal["subscr_gateway"] = !empty($_GET["s2member_paypal_proxy"]) ? esc_html(trim(stripslashes($_GET["s2member_paypal_proxy"]))) : "paypal";
/**/
if (empty($paypal["custom"]) && !empty($paypal["recurring_payment_id"])) {
/* Lookup on Recurring Profiles? */
$paypal["custom"] = c_ws_plugin__s2member_utils_users::get_user_custom_with($paypal["recurring_payment_id"]);
}
/**/
if (!empty($paypal["custom"]) && preg_match("/^" . preg_quote(preg_replace("/\\:([0-9]+)\$/", "", $_SERVER["HTTP_HOST"]), "/") . "/i", $paypal["custom"])) {
$paypal["s2member_log"][] = "s2Member originating domain ( `\$_SERVER[\"HTTP_HOST\"]` ) validated.";
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
if (!apply_filters("ws_plugin__s2member_during_paypal_notify_conditionals", false, get_defined_vars())) {
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_virtual_terminal::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_express_checkout::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_cart::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_send_money::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_web_accept_sp::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_rec_profile_creation_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_failed_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancellation_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal::cp(get_defined_vars())) {
//.........这里部分代码省略.........
示例4: paypal_notify
/**
* Handles PayPal IPN processing.
*
* These same routines also handle s2Member Pro/PayPal Pro operations;
* giving you the ability *(as needed)* to Hook into these routines using
* WordPress Hooks/Filters; as seen in the source code below.
*
* Please do NOT modify the source code directly.
* Instead, use WordPress Hooks/Filters.
*
* For example, if you'd like to add your own custom conditionals, use:
* ``add_filter ("ws_plugin__s2member_during_paypal_notify_conditionals", "your_function");``
*
* @package s2Member\PayPal
* @since 3.5
*
* @attaches-to ``add_action("init");``
*
* @return null Or exits script execution after handling IPN procesing.
*/
public static function paypal_notify()
{
global $current_site, $current_blog;
do_action("ws_plugin__s2member_before_paypal_notify", get_defined_vars());
if (!empty($_GET["s2member_paypal_notify"]) && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] || !empty($_REQUEST["s2member_paypal_proxy"]))) {
@ignore_user_abort(true);
// Important. Continue processing even if/when the connection is broken by the sending party.
include_once ABSPATH . "wp-admin/includes/admin.php";
// Get administrative functions. Needed for `wp_delete_user()`.
$email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
// Filters on?
c_ws_plugin__s2member_email_configs::email_config_release();
// Release s2Member Filters.
$paypal = array();
// Initialize PayPal array; we also reference this with a variable for a possible proxy handler.
if (!empty($_REQUEST["s2member_paypal_proxy"]) && in_array($_REQUEST["s2member_paypal_proxy"], array("alipay", "authnet", "clickbank", "ccbill", "google"), TRUE)) {
${esc_html(trim(stripslashes($_REQUEST["s2member_paypal_proxy"])))} =& $paypal;
}
// Internal alias by reference.
if (is_array($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_postvars()) && ($_paypal = $paypal) && ($_paypal_s = serialize($_paypal))) {
$paypal["s2member_log"][] = "IPN received on: " . date("D M j, Y g:i:s a T");
$paypal["s2member_log"][] = "s2Member POST vars verified " . (!empty($paypal["proxy_verified"]) ? "with a Proxy Key" : "through a POST back to PayPal.");
$payment_status_issues = "/^(failed|denied|expired|refunded|partially_refunded|reversed|reversal|canceled_reversal|voided)\$/i";
$paypal["subscr_gateway"] = !empty($_REQUEST["s2member_paypal_proxy"]) ? esc_html(trim(stripslashes($_REQUEST["s2member_paypal_proxy"]))) : "paypal";
$coupon = !empty($_REQUEST["s2member_paypal_proxy_coupon"]) && is_array($_REQUEST["s2member_paypal_proxy_coupon"]) ? stripslashes_deep($_REQUEST["s2member_paypal_proxy_coupon"]) : array();
$coupon = isset($coupon["full_coupon_code"], $coupon["coupon_code"], $coupon["affiliate_id"]) && is_string($coupon["full_coupon_code"]) && is_string($coupon["coupon_code"]) && is_string($coupon["affiliate_id"]) ? $coupon : array("full_coupon_code" => "", "coupon_code" => "", "affiliate_id" => "");
if (!empty($paypal["txn_type"]) && $paypal["txn_type"] === "merch_pmt") {
// This is mostly irrelevant, but it helps to keep the logs cleaner.
sleep(5);
}
// Wait for Pro Form procesing to complete.
if (empty($paypal["custom"]) && !empty($paypal["recurring_payment_id"])) {
// Recurring Profile ID.
$paypal["custom"] = c_ws_plugin__s2member_utils_users::get_user_custom_with($paypal["recurring_payment_id"]);
} else {
if (empty($paypal["custom"]) && !empty($paypal["mp_id"])) {
// Lookup; based on a Billing Agreement ID.
$paypal["custom"] = c_ws_plugin__s2member_utils_users::get_user_custom_with($paypal["mp_id"]);
}
}
if (!empty($paypal["custom"]) && preg_match("/^" . preg_quote(preg_replace("/\\:([0-9]+)\$/", "", $_SERVER["HTTP_HOST"]), "/") . "/i", $paypal["custom"])) {
$paypal["s2member_log"][] = "s2Member originating domain ( `\$_SERVER[\"HTTP_HOST\"]` ) validated.";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
if (!apply_filters("ws_plugin__s2member_during_paypal_notify_conditionals", false, get_defined_vars())) {
unset($__refs, $__v);
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_virtual_terminal::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_express_checkout::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_cart::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_send_money::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_web_accept_sp::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_rec_profile_creation_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
if ($_paypal_cp = c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_failed_w_level::cp(get_defined_vars())) {
$paypal = $_paypal_cp;
} else {
//.........这里部分代码省略.........