| @@ -43,8 +43,14 @@ | ||
| 43 | 43 | global /* For Multisite support. */ $current_site, $current_blog; |
| 44 | 44 | |
| 45 | 45 | do_action("ws_plugin__s2member_before_paypal_return", get_defined_vars ()); |
| 46 | 46 | |
| 47 | + //260831.0135 Normalize optional s2Member proxy fields once; direct PayPal returns omit them, while proxied gateway integrations provide strings. | |
| 48 | + if(!isset($_GET["s2member_paypal_proxy"]) || !is_string($_GET["s2member_paypal_proxy"])) | |
| 49 | + $_GET["s2member_paypal_proxy"] = ""; | |
| 50 | + if(!isset($_GET["s2member_paypal_proxy_use"]) || !is_string($_GET["s2member_paypal_proxy_use"])) | |
| 51 | + $_GET["s2member_paypal_proxy_use"] = ""; | |
| 52 | + | |
| 47 | 53 | if (!empty($_GET["s2member_paypal_return"]) && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] || !empty($_GET["s2member_paypal_proxy"]))) |
| 48 | 54 | { |
| 49 | 55 | $paypal = array(); // Initialize PayPal array; we also reference this with a variable for a possible proxy handler. |
| 50 | 56 | if(!empty($_GET["s2member_paypal_proxy"]) && in_array($_GET["s2member_paypal_proxy"], array("alipay", "stripe", "authnet", "clickbank", "ccbill", "google"), TRUE)) |