Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:19-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13066 2011-12-20T09:50:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=57802#p57802 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=55484#p55484 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=51858#p51858 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=49953#p49953 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=47747#p47747 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=46148#p46148 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:47:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=44278#p44278 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: October 3, 2011, 1:47 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:47 pm


]]>
2011-10-03T03:41:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=42985#p42985 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=41231#p41231 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=39987#p39987 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:20:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=38129#p38129 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: September 17, 2011, 2:20 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:20 pm


]]>
2011-09-14T01:27:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=36710#p36710 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: September 13, 2011, 11:27 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:27 am


]]>
2011-09-13T12:02:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=35438#p35438 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:02 pm


]]>
2011-08-15T14:13:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=31543#p31543 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: August 15, 2011, 3:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\sc-paypal-button-e.inc.php ?php /** * Shortcode `[s2Member-PayPal-Button]` ( encryption sub-routines ). * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\PayPal * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_sc_paypal_button_e" ) ) { /** * Shortcode `[s2Member-PayPal-Button]` ( encryption sub-routines ). * * @package s2Member\PayPal * @since 3.5 */ class c_ws_plugin__s2member_sc_paypal_button_e { /** * Handles PayPal® Button encryption. * * This uses the PayPal® API. s2Member will NOT attempt to encrypt Buttons until there is at least a Business Email Address and API Username configured. * s2Member also maintains a log of communication with the PayPal® API. If logging is enabled, check: `/wp-content/plugins/s2member-logs/paypal-api.log`. * * @package s2Member\PayPal * @since 3.5 * * @param str $code The PayPal® Button Code before encryption. * @param array $vars An array of defined variables in the scope of the calling Filter. * @return str The Resulting PayPal® Button Code *( possibly encrypted, depending on configuration )*. */ public static function sc_paypal_button_encryption ( $code = FALSE , $vars = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_sc_paypal_button_encryption" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_btn_encryption" ] && $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] && $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_api_username" ] ) { $cache = apply_filters ( "ws_plugin__s2member_sc_paypal_button_encryption_cache" , true , get_defined_vars ( ) ) ; /* Are we caching? */ /**/ eval ( '$_code = $vars["_code"]; $attr = $vars["attr"];' ) ; /* Let's unpack ( i.e. use shorter references ) to these two important data vars. */ /**/ if ( $cache && ( $transient = "s2m_btn_" . md5 ( $code . c_ws_plugin__s2member_utilities:: ver_checksum ( ) ) ) && ( $cache = get_transient ( $transient ) ) ) $code = $cache ; /* Great, so we can use the cached version here to save processing time. Notice the MD5 hash uses $code and NOT $_code. */ /**/ else if ( is_array ( $inputs = c_ws_plugin__s2member_utils_forms:: form_whips_2_array ( $_code ) ) && ! empty ( $inputs ) ) /* Were we able to parse hidden input variables? */ { $paypal = array ( "METHOD" = "BMCreateButton" , "BUTTONCODE" = "ENCRYPTED" , "BUTTONTYPE" = ( ( $attr [ "sp" ] || $attr [ "rr" ] === "BN" ) ? "BUYNOW" : "SUBSCRIBE" ) ) ; /**/ $i = 0 ; /* Initialize incremental variable counter. PayPal® wants these numbered using L_BUTTONVAR{n}; where {n} starts at zero. */ foreach ( $inputs as $input = $value ) /* Now run through each of the input variables that we parsed from the Full Button Code */ if ( ! preg_match ( "/^cmd$/i" , $input ) ) /* Don't include the `cmd` var; it will produce major errors in the API response. */ { /* The PayPal® API method `BMCreateButton` expects (amount|a1|a3) to include 2 decimal places. */ if ( preg_match ( "/^(amount|a1|a3)$/i" , $input ) ) $value = number_format ( $value , 2 , "." , "" ) ; /**/ $paypal [ "L_BUTTONVAR" . $i ] = $input . "=" . $value ; $i ++; /* Increment variable counter. */ } /**/ if ( ( $paypal = c_ws_plugin__s2member_paypal_utilities:: paypal_api_response ( $paypal ) ) && empty ( $paypal [ "__error" ] ) && ! empty ( $paypal [ "WEBSITECODE" ] ) && ( $code = $paypal [ "WEBSITECODE" ] ) ) /* Only proceed if we DID get a valid response from the PayPal® API. This works as a nice fallback; just in case the API connection fails. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default PayPal® image. */ /**/ $code = preg_replace ( "/\img[^\]+\/i" , "" , $code ) ; /* Remove the 1x1 pixel tracking image that PayPal® sticks in there. */ $code = preg_replace ( "/(\input)([^\]+)(\)/ie" , "'\\1'.rtrim(stripslashes('\\2'),'/').' /\\3'" , $code ) ; /* Use XHTML! */ /**/ $code = ( $attr [ "image" ] && $attr [ "image" ] !== "default" ) ? preg_replace ( '/ src\="(.*?)"/' , ' src="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "image" ] ) ) . '"' , $code ) : preg_replace ( '/ src\="(.*?)"/' , ' src="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $default_image ) ) . '"' , $code ) ; /**/ $code = ( $attr [ "output" ] === "anchor" ) ? 'a href="' . esc_attr (c_ws_plugin__s2member_utils_forms:: form_whips_2_url ( $code ) ) . '"img src="' . esc_attr ( ( $attr [ "image" ] && $attr [ "image" ] !== "default" ) ? $attr [ "image" ] : $default_image ) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" //a' : $code ; $code = ( $attr [ "output" ] === "url" ) ? c_ws_plugin__s2member_utils_forms:: form_whips_2_url ( $code ) : $code ; /**/ ( $cache && $transient ) ? set_transient ( $transient , $code , apply_filters ( "ws_plugin__s2member_sc_paypal_button_encryption_cache_exp_time" , 3600 , get_defined_vars ( ) ) ) : null ; /* Caching? */ } } } /* No WordPress® Filters apply here. */ /* Instead, use: `ws_plugin__s2member_sc_paypal_button`. */ return $code ; /* Button Code. Possibly w/ API encryption applied now. */ } } } ? [ full view ]s2member\includes\classes\sc-paypal-button-e.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 2:13 pm


]]>
2011-07-11T17:29:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=27729#p27729 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: July 11, 2011, 6:29 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\sc-paypal-button-e.inc.php ?php /** * Shortcode `[s2Member-PayPal-Button]` ( encryption sub-routines ). * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\PayPal * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_sc_paypal_button_e" ) ) { /** * Shortcode `[s2Member-PayPal-Button]` ( encryption sub-routines ). * * @package s2Member\PayPal * @since 3.5 */ class c_ws_plugin__s2member_sc_paypal_button_e { /** * Handles PayPal® Button encryption. * * This uses the PayPal® API. s2Member will NOT attempt to encrypt Buttons until there is at least a Business Email Address and API Username configured. * s2Member also maintains a log of communication with the PayPal® API. If logging is enabled, check: `/wp-content/plugins/s2member-logs/paypal-api.log`. * * @package s2Member\PayPal * @since 3.5 * * @param str $code The PayPal® Button Code before encryption. * @param array $vars An array of defined variables in the scope of the calling Filter. * @return str The Resulting PayPal® Button Code *( possibly encrypted, depending on configuration )*. */ public static function sc_paypal_button_encryption ( $code = FALSE , $vars = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_sc_paypal_button_encryption" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_btn_encryption" ] && $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] && $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_api_username" ] ) { $cache = apply_filters ( "ws_plugin__s2member_sc_paypal_button_encryption_cache" , true , get_defined_vars ( ) ) ; /* Are we caching? */ /**/ eval ( '$_code = $vars["_code"]; $attr = $vars["attr"];' ) ; /* Let's unpack ( i.e. use shorter references ) to these two important data vars. */ /**/ if ( $cache && ( $transient = "s2m_btn_" . md5 ( $code . c_ws_plugin__s2member_utilities:: ver_checksum ( ) ) ) && ( $cache = get_transient ( $transient ) ) ) $code = $cache ; /* Great, so we can use the cached version here to save processing time. Notice the MD5 hash uses $code and NOT $_code. */ /**/ else if ( is_array ( $inputs = c_ws_plugin__s2member_utils_forms:: form_whips_2_array ( $_code ) ) && ! empty ( $inputs ) ) /* Were we able to parse hidden input variables? */ { $paypal = array ( "METHOD" = "BMCreateButton" , "BUTTONCODE" = "ENCRYPTED" , "BUTTONTYPE" = ( ( $attr [ "sp" ] || $attr [ "rr" ] === "BN" ) ? "BUYNOW" : "SUBSCRIBE" ) ) ; /**/ $i = 0 ; /* Initialize incremental variable counter. PayPal® wants these numbered using L_BUTTONVAR{n}; where {n} starts at zero. */ foreach ( $inputs as $input = $value ) /* Now run through each of the input variables that we parsed from the Full Button Code */ if ( ! preg_match ( "/^cmd$/i" , $input ) ) /* Don't include the `cmd` var; it will produce major errors in the API response. */ { /* The PayPal® API method `BMCreateButton` expects (amount|a1|a3) to include 2 decimal places. */ if ( preg_match ( "/^(amount|a1|a3)$/i" , $input ) ) $value = number_format ( $value , 2 , "." , "" ) ; /**/ $paypal [ "L_BUTTONVAR" . $i ] = $input . "=" . $value ; $i ++; /* Increment variable counter. */ } /**/ if ( ( $paypal = c_ws_plugin__s2member_paypal_utilities:: paypal_api_response ( $paypal ) ) && empty ( $paypal [ "__error" ] ) && ! empty ( $paypal [ "WEBSITECODE" ] ) && ( $code = $paypal [ "WEBSITECODE" ] ) ) /* Only proceed if we DID get a valid response from the PayPal® API. This works as a nice fallback; just in case the API connection fails. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default PayPal® image. */ /**/ $code = preg_replace ( "/\img[^\]+\/i" , "" , $code ) ; /* Remove the 1x1 pixel tracking image that PayPal® sticks in there. */ $code = preg_replace ( "/(\input)([^\]+)(\)/ie" , "'\\1'.rtrim(stripslashes('\\2'),'/').' /\\3'" , $code ) ; /* Use XHTML! */ /**/ $code = ( $attr [ "image" ] && $attr [ "image" ] !== "default" ) ? preg_replace ( '/ src\="(.*?)"/' , ' src="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "image" ] ) ) . '"' , $code ) : preg_replace ( '/ src\="(.*?)"/' , ' src="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $default_image ) ) . '"' , $code ) ; /**/ $code = ( $attr [ "output" ] === "anchor" ) ? 'a href="' . esc_attr (c_ws_plugin__s2member_utils_forms:: form_whips_2_url ( $code ) ) . '"img src="' . esc_attr ( ( $attr [ "image" ] && $attr [ "image" ] !== "default" ) ? $attr [ "image" ] : $default_image ) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" //a' : $code ; $code = ( $attr [ "output" ] === "url" ) ? c_ws_plugin__s2member_utils_forms:: form_whips_2_url ( $code ) : $code ; /**/ ( $cache && $transient ) ? set_transient ( $transient , $code , apply_filters ( "ws_plugin__s2member_sc_paypal_button_encryption_cache_exp_time" , 3600 , get_defined_vars ( ) ) ) : null ; /* Caching? */ } } } /* No WordPress® Filters apply here. */ /* Instead, use: `ws_plugin__s2member_sc_paypal_button`. */ return $code ; /* Button Code. Possibly w/ API encryption applied now. */ } } } ? [ full view ]s2member\includes\classes\sc-paypal-button-e.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:29 pm


]]>
2011-07-09T06:09:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13066&p=25361#p25361 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\sc-paypal-button-e.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:09 am


]]>