s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) - Version 120622

Version Description

= v120622 = Maintenance release. Upgrade immediately.

Download this release

Release Info

Developer PriMoThemes
Plugin Icon 128x128 s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Version 120622
Comparing to
See all releases

Code changes from version 120608 to 120622

includes/classes/paypal-utilities.inc.php CHANGED
@@ -64,6 +64,11 @@ if(!class_exists("c_ws_plugin__s2member_paypal_utilities"))
64
  if(strlen($key = trim($key)) && strlen($value = trim($value)))
65
  $postvars[$key] = trim(stripslashes(urldecode($value)));
66
  }
 
 
 
 
 
67
  /**/
68
  return apply_filters("ws_plugin__s2member_paypal_postvars", $postvars, get_defined_vars());
69
  }
@@ -81,6 +86,12 @@ if(!class_exists("c_ws_plugin__s2member_paypal_utilities"))
81
  /**/
82
  $postvars = c_ws_plugin__s2member_utils_strings::trim_deep($postvars);
83
  /**/
 
 
 
 
 
 
84
  $endpoint = ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com";
85
  /**/
86
  if(!empty($_GET["s2member_paypal_proxy"]) && !empty($_GET["s2member_paypal_proxy_verification"]) && $_GET["s2member_paypal_proxy_verification"] === c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen())
64
  if(strlen($key = trim($key)) && strlen($value = trim($value)))
65
  $postvars[$key] = trim(stripslashes(urldecode($value)));
66
  }
67
+ if(!empty($postvars["charset"]) && function_exists("mb_convert_encoding"))
68
+ {
69
+ foreach($postvars as &$value)
70
+ $value = @mb_convert_encoding($value, "UTF-8", $postvars["charset"]);
71
+ }
72
  /**/
73
  return apply_filters("ws_plugin__s2member_paypal_postvars", $postvars, get_defined_vars());
74
  }
86
  /**/
87
  $postvars = c_ws_plugin__s2member_utils_strings::trim_deep($postvars);
88
  /**/
89
+ if(!empty($postvars["charset"]) && function_exists("mb_convert_encoding"))
90
+ {
91
+ foreach($postvars as &$value)
92
+ $value = @mb_convert_encoding($value, "UTF-8", $postvars["charset"]);
93
+ }
94
+ /**/
95
  $endpoint = ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com";
96
  /**/
97
  if(!empty($_GET["s2member_paypal_proxy"]) && !empty($_GET["s2member_paypal_proxy_verification"]) && $_GET["s2member_paypal_proxy_verification"] === c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen())
includes/classes/utils-cur.inc.php CHANGED
@@ -14,10 +14,10 @@
14
  * @package s2Member\Utilities
15
  * @since 110531
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_utils_cur"))
21
  {
22
  /**
23
  * Currency utilities.
@@ -43,17 +43,17 @@ if (!class_exists ("c_ws_plugin__s2member_utils_cur"))
43
  *
44
  * @see http://www.techmug.com/ajax-currency-converter-with-google-api/
45
  */
46
- public static function convert ($a = FALSE, $from = FALSE, $to = FALSE)
47
  {
48
- if (is_numeric ($a) && strlen ($from = strtoupper ($from)) === 3 && strlen ($to = strtoupper ($to)) === 3)
49
  {
50
- $q = number_format ($a, 2, ".", "") . $from . "=?" . $to;
51
- $api = "http://www.google.com/ig/calculator?hl=en&q=" . urlencode ($q);
52
  /**/
53
- if (($json = c_ws_plugin__s2member_utils_urls::remote ($api)) && is_array ($json = json_decode ($json, true)) && !empty ($json["icc"]) && isset ($json["rhs"]) && strlen ($json["rhs"]))
54
  {
55
- if (is_numeric ($c_a = preg_replace ("/ .*$/", "", trim ($json["rhs"]))) && $c_a >= 0)
56
- return number_format ($c_a, 2, ".", "");
57
  }
58
  }
59
  /**/
@@ -70,7 +70,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_cur"))
70
  * @param str $currency Expects a 3 character Currency Code.
71
  * @return str A Currency Symbol. Defaults to the `$` sign.
72
  */
73
- public static function symbol ($currency = FALSE)
74
  {
75
  $symbols["AUD"] = "$"; /* Australian Dollar */
76
  $symbols["BRL"] = "R$"; /* Brazilian Real */
@@ -96,11 +96,11 @@ if (!class_exists ("c_ws_plugin__s2member_utils_cur"))
96
  $symbols["THB"] = "฿"; /* Thai Baht */
97
  $symbols["USD"] = "$"; /* U.S. Dollar */
98
  /**/
99
- if (($currency = strtoupper ($currency)) && !empty ($symbols[$currency]))
100
  return $symbols[$currency];
101
  /**/
102
  else /* Else `$` sign. */
103
- return "$";
104
  }
105
  }
106
  }
14
  * @package s2Member\Utilities
15
  * @since 110531
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_utils_cur"))
21
  {
22
  /**
23
  * Currency utilities.
43
  *
44
  * @see http://www.techmug.com/ajax-currency-converter-with-google-api/
45
  */
46
+ public static function convert($a = FALSE, $from = FALSE, $to = FALSE)
47
  {
48
+ if(is_numeric($a) && strlen($from = strtoupper($from)) === 3 && strlen($to = strtoupper($to)) === 3)
49
  {
50
+ $q = number_format($a, 2, ".", "").$from."=?".$to;
51
+ $api = "http://www.google.com/ig/calculator?hl=en&q=".urlencode($q);
52
  /**/
53
+ if(($json = preg_replace('/([{,])\s*([^"]+?)\s*:/', '$1"$2":', c_ws_plugin__s2member_utils_urls::remote($api))) && is_array($json = json_decode($json, true)) && !empty($json["icc"]) && isset($json["rhs"]) && strlen($json["rhs"]))
54
  {
55
+ if(is_numeric($c_a = preg_replace("/ .*$/", "", trim($json["rhs"]))) && $c_a >= 0)
56
+ return number_format($c_a, 2, ".", "");
57
  }
58
  }
59
  /**/
70
  * @param str $currency Expects a 3 character Currency Code.
71
  * @return str A Currency Symbol. Defaults to the `$` sign.
72
  */
73
+ public static function symbol($currency = FALSE)
74
  {
75
  $symbols["AUD"] = "$"; /* Australian Dollar */
76
  $symbols["BRL"] = "R$"; /* Brazilian Real */
96
  $symbols["THB"] = "฿"; /* Thai Baht */
97
  $symbols["USD"] = "$"; /* U.S. Dollar */
98
  /**/
99
+ if(($currency = strtoupper($currency)) && !empty($symbols[$currency]))
100
  return $symbols[$currency];
101
  /**/
102
  else /* Else `$` sign. */
103
+ return "$";
104
  }
105
  }
106
  }
includes/translations/s2member.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the s2Member® Framework package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: s2Member® Framework 120601\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/___s2member\n"
7
- "POT-Creation-Date: 2012-06-08 20:17:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -660,30 +660,30 @@ msgstr ""
660
  #. again`, or something to that affect. Or, if you prefer, you could Filter
661
  #. ``$response["__error"]`` with `ws_plugin__s2member_paypal_api_response`.
662
 
663
- #: s2member/includes/classes/paypal-utilities.inc.php:175
664
  msgctxt "s2member-front"
665
  msgid "Error #%1$s. %2$s. %3$s."
666
  msgstr ""
667
 
668
- #: s2member/includes/classes/paypal-utilities.inc.php:178
669
- #: s2member/includes/classes/paypal-utilities.inc.php:278
670
- #: s2member/includes/classes/paypal-utilities.inc.php:286
671
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:96
672
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:318
673
  msgctxt "s2member-front"
674
  msgid "Error. Please contact Support for assistance."
675
  msgstr ""
676
 
677
- #: s2member/includes/classes/paypal-utilities.inc.php:219
678
- #: s2member/includes/classes/paypal-utilities.inc.php:225
679
- #: s2member/includes/classes/paypal-utilities.inc.php:327
680
- #: s2member/includes/classes/paypal-utilities.inc.php:333
681
  msgctxt "s2member-front"
682
  msgid "Error #%s. Transaction declined. Please use an alternate funding source."
683
  msgstr ""
684
 
685
- #: s2member/includes/classes/paypal-utilities.inc.php:222
686
- #: s2member/includes/classes/paypal-utilities.inc.php:330
687
  msgctxt "s2member-front"
688
  msgid "Error #%s. Transaction declined. Express Checkout was NOT confirmed."
689
  msgstr ""
@@ -703,8 +703,8 @@ msgstr ""
703
  #. ``$response["__error"]`` with
704
  #. `ws_plugin__s2member_pro_authnet_arb_response`.
705
 
706
- #: s2member/includes/classes/paypal-utilities.inc.php:276
707
- #: s2member/includes/classes/paypal-utilities.inc.php:284
708
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:93
709
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:315
710
  msgctxt "s2member-front"
@@ -3623,6 +3623,12 @@ msgctxt "s2member-front"
3623
  msgid "PayPal®"
3624
  msgstr ""
3625
 
 
 
 
 
 
 
3626
  #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:210
3627
  msgctxt "s2member-admin"
3628
  msgid "PayPal® configuration error. Please configure your PayPal® Email Address."
2
  # This file is distributed under the same license as the s2Member® Framework package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: s2Member® Framework 120608\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/___s2member\n"
7
+ "POT-Creation-Date: 2012-06-22 18:32:29+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
660
  #. again`, or something to that affect. Or, if you prefer, you could Filter
661
  #. ``$response["__error"]`` with `ws_plugin__s2member_paypal_api_response`.
662
 
663
+ #: s2member/includes/classes/paypal-utilities.inc.php:186
664
  msgctxt "s2member-front"
665
  msgid "Error #%1$s. %2$s. %3$s."
666
  msgstr ""
667
 
668
+ #: s2member/includes/classes/paypal-utilities.inc.php:189
669
+ #: s2member/includes/classes/paypal-utilities.inc.php:289
670
+ #: s2member/includes/classes/paypal-utilities.inc.php:297
671
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:96
672
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:318
673
  msgctxt "s2member-front"
674
  msgid "Error. Please contact Support for assistance."
675
  msgstr ""
676
 
677
+ #: s2member/includes/classes/paypal-utilities.inc.php:230
678
+ #: s2member/includes/classes/paypal-utilities.inc.php:236
679
+ #: s2member/includes/classes/paypal-utilities.inc.php:338
680
+ #: s2member/includes/classes/paypal-utilities.inc.php:344
681
  msgctxt "s2member-front"
682
  msgid "Error #%s. Transaction declined. Please use an alternate funding source."
683
  msgstr ""
684
 
685
+ #: s2member/includes/classes/paypal-utilities.inc.php:233
686
+ #: s2member/includes/classes/paypal-utilities.inc.php:341
687
  msgctxt "s2member-front"
688
  msgid "Error #%s. Transaction declined. Express Checkout was NOT confirmed."
689
  msgstr ""
703
  #. ``$response["__error"]`` with
704
  #. `ws_plugin__s2member_pro_authnet_arb_response`.
705
 
706
+ #: s2member/includes/classes/paypal-utilities.inc.php:287
707
+ #: s2member/includes/classes/paypal-utilities.inc.php:295
708
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:93
709
  #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:315
710
  msgctxt "s2member-front"
3623
  msgid "PayPal®"
3624
  msgstr ""
3625
 
3626
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:517
3627
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:706
3628
+ msgctxt "s2member-front"
3629
+ msgid "We Accept PayPal®"
3630
+ msgstr ""
3631
+
3632
  #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:210
3633
  msgctxt "s2member-admin"
3634
  msgid "PayPal® configuration error. Please configure your PayPal® Email Address."
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
- Version: 120608
4
- Stable tag: 120608
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
@@ -91,14 +91,21 @@ Please see [this FAQ entry](http://www.s2member.com/faqs/#s2-faqs-translations)
91
 
92
  == Upgrade Notice ==
93
 
94
- = v120608 =
95
  Maintenance release. Upgrade immediately.
96
 
97
  == Changelog ==
98
 
 
 
 
 
 
 
 
99
  = v120608 =
100
  * **(Maintenance Release) Upgrade immediately.**
101
- * (s2Member/s2Member Pro) **WordPress® v3.4**. Updated for compatibility with the coming release of [WordPress® v3.4](http://wordpress.org/news/2012/06/wordpress-3-4-release-candidate-2/).
102
  * (s2Member/s2Member Pro) **Payflow® Bug Fix**. This release addresses two bugs that existed in s2Member's Payflow® integration. Resolved in this release. Please see [this thread](http://www.s2member.com/forums/topic/transactions-not-going-through/#post-15896) for further details.
103
  * (s2Member Pro) **PayPal® Express Checkout**. This release enables "PayPal Account Optional" for PayPal® Express Checkout, via s2Member Pro Forms. In other words, this release makes the PayPal® Express Checkout option through Pro Forms, behave more like a standard PayPal® Button; where a customer is not always required to have a PayPal® account during checkout. This functionality is enabled automatically, there's nothing you need to change in your s2Member® integration. However, we do suggest that you turn "PayPal Account Optional" (on) inside your PayPal® account. Please see [this thread](http://www.s2member.com/forums/topic/paypal-express-for-paypal-pro-user/#post-15892) for further details.
104
  * (s2Member) **Documentation**. Code samples for Content Dripping have been updated in the Dashboard, in order to correct a date comparison snippet, which was WRONG. Please check your Dashboard under: `s2Member® -> API Scripting -> Content Dripping -> Example #2`, for the updated code sample.
1
  === s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
+ Version: 120622
4
+ Stable tag: 120622
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
91
 
92
  == Upgrade Notice ==
93
 
94
+ = v120622 =
95
  Maintenance release. Upgrade immediately.
96
 
97
  == Changelog ==
98
 
99
+ = v120622 =
100
+ * **(Maintenance Release) Upgrade immediately.**
101
+ * (s2Member/s2Member Pro) **WordPress® v3.4**. Confirmed compatibility with WordPress® v3.4.
102
+ * (s2Member/s2Member Pro) **Currency Conversion**. This release updates s2Member's currency conversion API, which is powered by Google®. Please see [this thread](http://www.s2member.com/forums/topic/paypal-agreecontinue-sends-to-memb-options/#post-16972) for further details.
103
+ * (s2Member/s2Member Pro) **Payflow® Bug Fix**. This release addresses a bug that existed in s2Member's Payflow® integration with Express Checkout. Resolved in this release. Please see [this thread](http://www.s2member.com/forums/topic/cant-do-recurring-billing-via-paypal-payflow/#post-16966) for further details.
104
+ * (s2Member/s2Member Pro) **Character Encoding**. This release fixes a big in s2Member's character encoding conversion, for IPN responses received from PayPal®. This releases also fixes an issue specifically with the pound sterling symbol `£`, which was causing some transient IPN data to become corrupted, under the right scenario.
105
+
106
  = v120608 =
107
  * **(Maintenance Release) Upgrade immediately.**
108
+ * (s2Member/s2Member Pro) **WordPress® v3.4**. Updated for compatibility with the coming release of [WordPress® v3.4](http://wordpress.org/news/2012/06/wordpress-3-4-release-candidate-2/). Additional details available [here](http://wordpress.org/news/2012/06/wordpress-3-4-release-candidate-2/).
109
  * (s2Member/s2Member Pro) **Payflow® Bug Fix**. This release addresses two bugs that existed in s2Member's Payflow® integration. Resolved in this release. Please see [this thread](http://www.s2member.com/forums/topic/transactions-not-going-through/#post-15896) for further details.
110
  * (s2Member Pro) **PayPal® Express Checkout**. This release enables "PayPal Account Optional" for PayPal® Express Checkout, via s2Member Pro Forms. In other words, this release makes the PayPal® Express Checkout option through Pro Forms, behave more like a standard PayPal® Button; where a customer is not always required to have a PayPal® account during checkout. This functionality is enabled automatically, there's nothing you need to change in your s2Member® integration. However, we do suggest that you turn "PayPal Account Optional" (on) inside your PayPal® account. Please see [this thread](http://www.s2member.com/forums/topic/paypal-express-for-paypal-pro-user/#post-15892) for further details.
111
  * (s2Member) **Documentation**. Code samples for Content Dripping have been updated in the Dashboard, in order to correct a date comparison snippet, which was WRONG. Please check your Dashboard under: `s2Member® -> API Scripting -> Content Dripping -> Example #2`, for the updated code sample.
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 120608
23
- Stable tag: 120608
24
 
25
  SSL Compatible: yes
26
  bbPress® Compatible: yes
@@ -75,7 +75,7 @@ if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
75
  * @var str
76
  */
77
  if(!defined("WS_PLUGIN__S2MEMBER_VERSION"))
78
- define("WS_PLUGIN__S2MEMBER_VERSION", "120608" /* !#distro-version#! */);
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
@@ -105,7 +105,7 @@ if(!defined("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
105
  * @var str
106
  */
107
  if(!defined("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
- define("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "120608" /* !#distro-version#! */);
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 120622
23
+ Stable tag: 120622
24
 
25
  SSL Compatible: yes
26
  bbPress® Compatible: yes
75
  * @var str
76
  */
77
  if(!defined("WS_PLUGIN__S2MEMBER_VERSION"))
78
+ define("WS_PLUGIN__S2MEMBER_VERSION", "120622" /* !#distro-version#! */);
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
105
  * @var str
106
  */
107
  if(!defined("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
+ define("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "120622" /* !#distro-version#! */);
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.