Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:19-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13067 2011-12-20T09:50:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=57803#p57803 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\sc-paypal-button-in.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:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=55485#p55485 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\sc-paypal-button-in.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=13067&p=51859#p51859 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\sc-paypal-button-in.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=13067&p=49954#p49954 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\sc-paypal-button-in.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:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=47748#p47748 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\sc-paypal-button-in.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=13067&p=46149#p46149 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\sc-paypal-button-in.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:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=44279#p44279 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\sc-paypal-button-in.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:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=42986#p42986 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\sc-paypal-button-in.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=13067&p=41232#p41232 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\sc-paypal-button-in.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:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=39988#p39988 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\sc-paypal-button-in.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:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=38130#p38130 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\sc-paypal-button-in.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=13067&p=36711#p36711 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\sc-paypal-button-in.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=13067&p=35439#p35439 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\sc-paypal-button-in.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:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=31544#p31544 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\sc-paypal-button-in.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-in.inc.php ?php /** * Shortcode `[s2Member-PayPal-Button]` ( inner processing 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_in" ) ) { /** * Shortcode `[s2Member-PayPal-Button]` ( inner processing routines ). * * @package s2Member\PayPal * @since 3.5 */ class c_ws_plugin__s2member_sc_paypal_button_in { /** * Handles the Shortcode for: `[s2Member-PayPal-Button /]`. * * @package s2Member\PayPal * @since 3.5 * * @attaches-to: ``add_shortcode("s2Member-PayPal-Button");`` * * @param array $attr An array of Attributes. * @param str $content Content inside the Shortcode. * @param str $shortcode The actual Shortcode name itself. * @return str The resulting PayPal® Button Code. */ public static function sc_paypal_button ( $attr = FALSE , $content = FALSE , $shortcode = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_sc_paypal_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ c_ws_plugin__s2member_no_cache:: no_cache_constants ( true ) ; /* No caching on pages that contain this Button. */ /**/ $attr = c_ws_plugin__s2member_utils_strings:: trim_quot_deep ( ( array ) $attr ) ; /* Force array, and fix " in attrs. */ /**/ $attr = shortcode_atts ( apply_filters ( "ws_plugin__s2member_sc_paypal_button_default_attrs" , array ( "ids" = "0" , "exp" = "72" , "level" = "1" , "ccaps" = "" , "desc" = "" , "ps" = "paypal" , "lc" = "" , "cc" = "USD" , "dg" = "0" , "ns" = "1" , "custom" = $_SERVER [ "HTTP_HOST" ] , "ta" = "0" , "tp" = "0" , "tt" = "D" , "ra" = "0.01" , "rp" = "1" , "rt" = "M" , "rr" = "1" , "rrt" = "" , "rra" = "1" , "modify" = "0" , "cancel" = "0" , "sp" = "0" , "image" = "default" , "output" = "button" ) , get_defined_vars ( ) ) , $attr ) ; /**/ /* Automatically adjust to `modify="0"` ( when an Initial/Trial Period is configured ), and a User is either NOT logged-in, or has nothing to modify. */ $attr [ "modify" ] = ( $attr [ "modify" ] === "1" && ( ! is_user_logged_in ( ) || ! get_user_option ( "s2member_subscr_id" ) ) && $attr [ "tp" ] ) ? "0" : $attr [ "modify" ] ; /**/ $attr [ "lc" ] = strtoupper ( $attr [ "lc" ] ) ; /* Locale code absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ $attr [ "tt" ] = strtoupper ( $attr [ "tt" ] ) ; /* Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ $attr [ "rt" ] = strtoupper ( $attr [ "rt" ] ) ; /* Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ $attr [ "rr" ] = strtoupper ( $attr [ "rr" ] ) ; /* Must be provided in upper-case format. Numerical, or BN value. Only after running shortcode_atts(). */ $attr [ "ccaps" ] = strtolower ( $attr [ "ccaps" ] ) ; /* Custom Capabilities must be typed in lower-case format. Only after running shortcode_atts(). */ $attr [ "rr" ] = ( $attr [ "rt" ] === "L" ) ? "BN" : $attr [ "rr" ] ; /* Lifetime Subscriptions require Buy Now. Only after running shortcode_atts(). */ $attr [ "rr" ] = ( $attr [ "level" ] === "*" ) ? "BN" : $attr [ "rr" ] ; /* Independent Ccaps require Buy Now. Only after running shortcode_atts(). */ $attr [ "ns" ] = ( $attr [ "dg" ] === "1" ) ? "1" : $attr [ "ns" ] ; /* No shipping directive must be 1 for digital items. After shortcode_atts(). */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_sc_paypal_button_after_shortcode_atts" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $attr [ "cancel" ] ) /* This is a special routine for Cancellation Buttons. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_unsubscribe_LG.gif" ; /* Default Image. */ /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-cancellation-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; /**/ $code = $_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" ) ? $code : $code ; /* Cancellation Buttons are already in anchor format; Button format is not used in Cancellations. */ $code = ( $attr [ "output" ] === "url" ) ? "https://" . ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) . "/cgi-bin/webscr?cmd=_subscr-find&alias=" . urlencode ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) : $code ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_sc_paypal_cancellation_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } /**/ else if ( $attr [ "sp" ] ) /* This is a special routine for Specific Post/Page Buttons. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default Image. */ /**/ $paypal_on0_input_value = ( $referencing = c_ws_plugin__s2member_utils_users:: get_user_subscr_or_wp_id ( ) ) ? "Referencing Customer ID" : "Originating Domain" ; $paypal_os0_input_value = ( $referencing ) ? $referencing : $_SERVER [ "HTTP_HOST" ] ; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ /**/ $paypal_on1_input_value = "Customer IP Address" ; /* Identifies the Customer's IP Address for tracking purposes. */ $paypal_os1_input_value = $_SERVER [ "REMOTE_ADDR" ] ; /* Current User's IP Address for tracking purposes. */ /**/ $paypal_invoice_input_value = uniqid ( ) . "~" . $_SERVER [ "REMOTE_ADDR" ] ; /* s2Member's Unique Code~IP combo. */ /**/ $attr [ "sp_ids_exp" ] = "sp:" . $attr [ "ids" ] . ":" . $attr [ "exp" ] ; /* Combined "sp:ids:expiration hours". */ /**/ $success_return_url = site_url ( "/?s2member_paypal_return=1" ) ; /* s2Member handles this all by itself. However, it can be Filtered. */ $success_return_url = apply_filters ( "ws_plugin__s2member_during_sc_paypal_button_success_return_url" , $success_return_url , get_defined_vars ( ) ) ; /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-sp-checkout-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; $code = preg_replace ( "/%%cancel_return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( home_url ( "/" ) ) ) , $code ) ; $code = preg_replace ( "/%%notify_url%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( "/?s2member_paypal_notify=1" ) ) ) , $code ) ; $code = preg_replace ( "/%%return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $success_return_url ) ) , $code ) ; $code = preg_replace ( "/%%custom%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) , $code ) ; /**/ $code = preg_replace ( '/ name\="lc" value\="(.*?)"/' , ' name="lc" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "lc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="no_shipping" value\="(.*?)"/' , ' name="no_shipping" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ns" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_name" value\="(.*?)"/' , ' name="item_name" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "desc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_number" value\="(.*?)"/' , ' name="item_number" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "sp_ids_exp" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="page_style" value\="(.*?)"/' , ' name="page_style" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ps" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="currency_code" value\="(.*?)"/' , ' name="currency_code" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "cc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="custom" value\="(.*?)"/' , ' name="custom" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="invoice" value\="(.*?)"/' , ' name="invoice" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_invoice_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="on0" value\="(.*?)"/' , ' name="on0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os0" value\="(.*?)"/' , ' name="os0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="on1" value\="(.*?)"/' , ' name="on1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on1_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os1" value\="(.*?)"/' , ' name="os1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os1_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="amount" value\="(.*?)"/' , ' name="amount" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; /**/ $code = $_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 ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_sc_paypal_sp_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } else if ( $attr [ "level" ] === "*" ) /* This is a special routine for Independent Custom Capabilities. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default Image. */ /**/ $paypal_on0_input_value = ( $referencing = c_ws_plugin__s2member_utils_users:: get_user_subscr_or_wp_id ( ) ) ? "Referencing Customer ID" : "Originating Domain" ; $paypal_os0_input_value = ( $referencing ) ? $referencing : $_SERVER [ "HTTP_HOST" ] ; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ /**/ $paypal_on1_input_value = "Customer IP Address" ; /* Identifies the Customer's IP Address for tracking purposes. */ $paypal_os1_input_value = $_SERVER [ "REMOTE_ADDR" ] ; /* Current User's IP Address for tracking purposes. */ /**/ $paypal_invoice_input_value = uniqid ( ) . "~" . $_SERVER [ "REMOTE_ADDR" ] ; /* s2Member's Unique Code~IP combo. */ /**/ $attr [ "level_ccaps_eotper" ] = ( $attr [ "rr" ] === "BN" && $attr [ "rt" ] !== "L" ) ? $attr [ "level" ] . ":" . $attr [ "ccaps" ] . ":" . $attr [ "rp" ] . " " . $attr [ "rt" ] : $attr [ "level" ] . ":" . $attr [ "ccaps" ] ; $attr [ "level_ccaps_eotper" ] = rtrim ( $attr [ "level_ccaps_eotper" ] , ":" ) ; /* Clean any trailing separators from this string. */ /**/ $success_return_url = site_url ( "/?s2member_paypal_return=1" ) ; /* s2Member handles this all by itself. However, it can be Filtered. */ $success_return_url = apply_filters ( "ws_plugin__s2member_during_sc_paypal_button_success_return_url" , $success_return_url , get_defined_vars ( ) ) ; /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-ccaps-checkout-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; $code = preg_replace ( "/%%cancel_return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( home_url ( "/" ) ) ) , $code ) ; $code = preg_replace ( "/%%notify_url%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( "/?s2member_paypal_notify=1" ) ) ) , $code ) ; $code = preg_replace ( "/%%return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $success_return_url ) ) , $code ) ; $code = preg_replace ( "/%%custom%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) , $code ) ; /**/ $code = preg_replace ( '/ name\="lc" value\="(.*?)"/' , ' name="lc" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "lc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="no_shipping" value\="(.*?)"/' , ' name="no_shipping" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ns" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_name" value\="(.*?)"/' , ' name="item_name" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "desc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_number" value\="(.*?)"/' , ' name="item_number" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "level_ccaps_eotper" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="page_style" value\="(.*?)"/' , ' name="page_style" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ps" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="currency_code" value\="(.*?)"/' , ' name="currency_code" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "cc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="custom" value\="(.*?)"/' , ' name="custom" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="invoice" value\="(.*?)"/' , ' name="invoice" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_invoice_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="on0" value\="(.*?)"/' , ' name="on0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os0" value\="(.*?)"/' , ' name="os0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="on1" value\="(.*?)"/' , ' name="on1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on1_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os1" value\="(.*?)"/' , ' name="os1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os1_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="amount" value\="(.*?)"/' , ' name="amount" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; /**/ $code = $_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 ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_sc_paypal_ccaps_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } else /* Otherwise, we'll process this Button normally, using the Membership routines. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default PayPal® Image. */ /**/ $paypal_on0_input_value = ( $referencing = c_ws_plugin__s2member_utils_users:: get_user_subscr_or_wp_id ( ) ) ? "Referencing Customer ID" : "Originating Domain" ; $paypal_os0_input_value = ( $referencing ) ? $referencing : $_SERVER [ "HTTP_HOST" ] ; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ /**/ $paypal_on1_input_value = "Customer IP Address" ; /* Identifies the Customer's IP Address for tracking purposes. */ $paypal_os1_input_value = $_SERVER [ "REMOTE_ADDR" ] ; /* Current User's IP Address for tracking purposes. */ /**/ $paypal_invoice_input_value = uniqid ( ) . "~" . $_SERVER [ "REMOTE_ADDR" ] ; /* s2Member's Unique Code~IP combo. */ /**/ $attr [ "desc" ] = ( ! $attr [ "desc" ] ) ? $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $attr [ "level" ] . "_label" ] : $attr [ "desc" ] ; /**/ $attr [ "level_ccaps_eotper" ] = ( $attr [ "rr" ] === "BN" && $attr [ "rt" ] !== "L" ) ? $attr [ "level" ] . ":" . $attr [ "ccaps" ] . ":" . $attr [ "rp" ] . " " . $attr [ "rt" ] : $attr [ "level" ] . ":" . $attr [ "ccaps" ] ; $attr [ "level_ccaps_eotper" ] = rtrim ( $attr [ "level_ccaps_eotper" ] , ":" ) ; /* Clean any trailing separators from this string. */ /**/ $success_return_tra = array ( "ta" = $attr [ "ta" ] , "tp" = $attr [ "tp" ] , "tt" = $attr [ "tt" ] , "ra" = $attr [ "ra" ] , "rp" = $attr [ "rp" ] , "rt" = $attr [ "rt" ] , "rr" = $attr [ "rr" ] , "rrt" = $attr [ "rrt" ] , "rra" = $attr [ "rra" ] , "invoice" = $paypal_invoice_input_value , "checksum" = md5 ( $paypal_invoice_input_value . $_SERVER [ "REMOTE_ADDR" ] . $attr [ "level_ccaps_eotper" ] ) ) ; /**/ $success_return_url = site_url ( "/?s2member_paypal_return=1" ) ; /* s2Member handles this all by itself. However, it can be Filtered ( see below ). */ $success_return_url = add_query_arg ( "s2member_paypal_return_tra" , urlencode (c_ws_plugin__s2member_utils_encryption:: encrypt ( serialize ( $success_return_tra ) ) ) , $success_return_url ) ; $success_return_url = apply_filters ( "ws_plugin__s2member_during_sc_paypal_button_success_return_url" , $success_return_url , get_defined_vars ( ) ) ; /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-checkout-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; $code = preg_replace ( "/%%level_label%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $attr [ "level" ] . "_label" ] ) ) , $code ) ; $code = preg_replace ( "/%%cancel_return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( home_url ( "/" ) ) ) , $code ) ; /* This brings them back to Front Page. */ $code = preg_replace ( "/%%notify_url%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( "/?s2member_paypal_notify=1" ) ) ) , $code ) ; $code = preg_replace ( "/%%return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $success_return_url ) ) , $code ) ; $code = preg_replace ( "/%%custom%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) , $code ) ; $code = preg_replace ( "/%%level%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "level" ] ) ) , $code ) ; /**/ $code = preg_replace ( '/ \\!--(\input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\)--\/' , " $1" , $code ) ; $code = ( $attr [ "rr" ] === "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="cmd" value\=")(.*?)(" \/\)/' , " $1_xclick $3" , $code ) : $code ; $code = ( $attr [ "rr" ] === "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\)/' , " !--$1--" , $code ) : $code ; $code = ( $attr [ "rr" ] === "BN" || ! $attr [ "tp" ] ) ? preg_replace ( '/ (\input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\)/' , " !--$1--" , $code ) : $code ; $code = ( $attr [ "rr" ] !== "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="cmd" value\=")(.*?)(" \/\)/' , " $1_xclick-subscriptions$3" , $code ) : $code ; $code = ( $attr [ "rr" ] !== "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="amount" value\="(.*?)" \/\)/' , " !--$1--" , $code ) : $code ; /**/ $code = preg_replace ( '/ name\="lc" value\="(.*?)"/' , ' name="lc" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "lc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="no_shipping" value\="(.*?)"/' , ' name="no_shipping" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ns" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_name" value\="(.*?)"/' , ' name="item_name" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "desc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_number" value\="(.*?)"/' , ' name="item_number" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "level_ccaps_eotper" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="page_style" value\="(.*?)"/' , ' name="page_style" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ps" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="currency_code" value\="(.*?)"/' , ' name="currency_code" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "cc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="custom" value\="(.*?)"/' , ' name="custom" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="invoice" value\="(.*?)"/' , ' name="invoice" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_invoice_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="on0" value\="(.*?)"/' , ' name="on0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os0" value\="(.*?)"/' , ' name="os0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="on1" value\="(.*?)"/' , ' name="on1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on1_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os1" value\="(.*?)"/' , ' name="os1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os1_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="modify" value\="(.*?)"/' , ' name="modify" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "modify" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="amount" value\="(.*?)"/' , ' name="amount" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="src" value\="(.*?)"/' , ' name="src" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rr" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="srt" value\="(.*?)"/' , ' name="srt" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rrt" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="sra" value\="(.*?)"/' , ' name="sra" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rra" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="a1" value\="(.*?)"/' , ' name="a1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ta" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="p1" value\="(.*?)"/' , ' name="p1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "tp" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="t1" value\="(.*?)"/' , ' name="t1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "tt" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="a3" value\="(.*?)"/' , ' name="a3" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="p3" value\="(.*?)"/' , ' name="p3" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rp" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="t3" value\="(.*?)"/' , ' name="t3" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rt" ] ) ) . '"' , $code ) ; /**/ $code = $_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 ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; ( $attr [ "modify" ] ) ? do_action ( "ws_plugin__s2member_during_sc_paypal_modification_button" , get_defined_vars ( ) ) /**/ : do_action ( "ws_plugin__s2member_during_sc_paypal_button" , get_defined_vars ( ) ) ; /* Else, we process normally. */ unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } /**/ $code = c_ws_plugin__s2member_sc_paypal_button_e:: sc_paypal_button_encryption ( $code , get_defined_vars ( ) ) ; /**/ return apply_filters ( "ws_plugin__s2member_sc_paypal_button" , $code , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\sc-paypal-button-in.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:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=27730#p27730 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\sc-paypal-button-in.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-in.inc.php ?php /** * Shortcode `[s2Member-PayPal-Button]` ( inner processing 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_in" ) ) { /** * Shortcode `[s2Member-PayPal-Button]` ( inner processing routines ). * * @package s2Member\PayPal * @since 3.5 */ class c_ws_plugin__s2member_sc_paypal_button_in { /** * Handles the Shortcode for: `[s2Member-PayPal-Button /]`. * * @package s2Member\PayPal * @since 3.5 * * @attaches-to: ``add_shortcode("s2Member-PayPal-Button");`` * * @param array $attr An array of Attributes. * @param str $content Content inside the Shortcode. * @param str $shortcode The actual Shortcode name itself. * @return str The resulting PayPal® Button Code. */ public static function sc_paypal_button ( $attr = FALSE , $content = FALSE , $shortcode = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_sc_paypal_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ c_ws_plugin__s2member_no_cache:: no_cache_constants ( true ) ; /* No caching on pages that contain this Button. */ /**/ $attr = c_ws_plugin__s2member_utils_strings:: trim_quot_deep ( ( array ) $attr ) ; /* Force array, and fix " in attrs. */ /**/ $attr = shortcode_atts ( apply_filters ( "ws_plugin__s2member_sc_paypal_button_default_attrs" , array ( "ids" = "0" , "exp" = "72" , "level" = "1" , "ccaps" = "" , "desc" = "" , "ps" = "paypal" , "lc" = "" , "cc" = "USD" , "dg" = "0" , "ns" = "1" , "custom" = $_SERVER [ "HTTP_HOST" ] , "ta" = "0" , "tp" = "0" , "tt" = "D" , "ra" = "0.01" , "rp" = "1" , "rt" = "M" , "rr" = "1" , "rrt" = "" , "rra" = "1" , "modify" = "0" , "cancel" = "0" , "sp" = "0" , "image" = "default" , "output" = "button" ) , get_defined_vars ( ) ) , $attr ) ; /**/ /* Automatically adjust to `modify="0"` ( when an Initial/Trial Period is configured ), and a User is either NOT logged-in, or has nothing to modify. */ $attr [ "modify" ] = ( $attr [ "modify" ] === "1" && ( ! is_user_logged_in ( ) || ! get_user_option ( "s2member_subscr_id" ) ) && $attr [ "tp" ] ) ? "0" : $attr [ "modify" ] ; /**/ $attr [ "lc" ] = strtoupper ( $attr [ "lc" ] ) ; /* Locale code absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ $attr [ "tt" ] = strtoupper ( $attr [ "tt" ] ) ; /* Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ $attr [ "rt" ] = strtoupper ( $attr [ "rt" ] ) ; /* Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ $attr [ "rr" ] = strtoupper ( $attr [ "rr" ] ) ; /* Must be provided in upper-case format. Numerical, or BN value. Only after running shortcode_atts(). */ $attr [ "ccaps" ] = strtolower ( $attr [ "ccaps" ] ) ; /* Custom Capabilities must be typed in lower-case format. Only after running shortcode_atts(). */ $attr [ "rr" ] = ( $attr [ "rt" ] === "L" ) ? "BN" : $attr [ "rr" ] ; /* Lifetime Subscriptions require Buy Now. Only after running shortcode_atts(). */ $attr [ "ns" ] = ( $attr [ "dg" ] === "1" ) ? "1" : $attr [ "ns" ] ; /* No shipping directive must be 1 for digital items. After shortcode_atts(). */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_sc_paypal_button_after_shortcode_atts" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $attr [ "cancel" ] ) /* This is a special routine for Cancellation Buttons. Cancellation Buttons use a different template. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_unsubscribe_LG.gif" ; /* Default Image. */ /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-cancellation-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; /**/ $code = $_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" ) ? $code : $code ; /* Cancellation Buttons are already in anchor format; Button format is not used in Cancellations. */ $code = ( $attr [ "output" ] === "url" ) ? "https://" . ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) . "/cgi-bin/webscr?cmd=_subscr-find&alias=" . urlencode ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) : $code ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_sc_paypal_cancellation_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } /**/ else if ( $attr [ "sp" ] ) /* This is a special routine for Specific Post/Page Buttons. Specific Post/Page Buttons use a different template. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default Image. */ /**/ $paypal_on0_input_value = ( $referencing = c_ws_plugin__s2member_utils_users:: get_user_subscr_or_wp_id ( ) ) ? "Referencing Customer ID" : "Originating Domain" ; $paypal_os0_input_value = ( $referencing ) ? $referencing : $_SERVER [ "HTTP_HOST" ] ; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ /**/ $paypal_on1_input_value = "Customer IP Address" ; /* Identifies the Customer's IP Address for tracking purposes. */ $paypal_os1_input_value = $_SERVER [ "REMOTE_ADDR" ] ; /* Current User's IP Address for tracking purposes. */ /**/ $success_return_url = site_url ( "/?s2member_paypal_return=1" ) ; /* s2Member handles this all by itself. However, it can be Filtered. */ $success_return_url = apply_filters ( "ws_plugin__s2member_during_sc_paypal_button_success_return_url" , $success_return_url , get_defined_vars ( ) ) ; /**/ $attr [ "sp_ids_exp" ] = "sp:" . $attr [ "ids" ] . ":" . $attr [ "exp" ] ; /* Combined "sp:ids:expiration hours". */ /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-sp-checkout-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; $code = preg_replace ( "/%%cancel_return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( home_url ( "/" ) ) ) , $code ) ; $code = preg_replace ( "/%%notify_url%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( "/?s2member_paypal_notify=1" ) ) ) , $code ) ; $code = preg_replace ( "/%%return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $success_return_url ) ) , $code ) ; $code = preg_replace ( "/%%custom%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $_SERVER [ "HTTP_HOST" ] ) ) , $code ) ; /**/ $code = preg_replace ( '/ name\="lc" value\="(.*?)"/' , ' name="lc" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "lc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="no_shipping" value\="(.*?)"/' , ' name="no_shipping" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ns" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_name" value\="(.*?)"/' , ' name="item_name" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "desc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_number" value\="(.*?)"/' , ' name="item_number" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "sp_ids_exp" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="page_style" value\="(.*?)"/' , ' name="page_style" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ps" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="currency_code" value\="(.*?)"/' , ' name="currency_code" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "cc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="custom" value\="(.*?)"/' , ' name="custom" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="on0" value\="(.*?)"/' , ' name="on0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os0" value\="(.*?)"/' , ' name="os0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="on1" value\="(.*?)"/' , ' name="on1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on1_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os1" value\="(.*?)"/' , ' name="os1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os1_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="amount" value\="(.*?)"/' , ' name="amount" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; /**/ $code = $_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 ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_sc_paypal_sp_button" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } else /* Otherwise, we'll process this Button normally, using the Membership routines. Also handles Modification Buttons. */ { $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" ; /* Default PayPal® Image. */ /**/ $paypal_on0_input_value = ( $referencing = c_ws_plugin__s2member_utils_users:: get_user_subscr_or_wp_id ( ) ) ? "Referencing Customer ID" : "Originating Domain" ; $paypal_os0_input_value = ( $referencing ) ? $referencing : $_SERVER [ "HTTP_HOST" ] ; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ /**/ $paypal_on1_input_value = "Customer IP Address" ; /* Identifies the Customer's IP Address for tracking purposes. */ $paypal_os1_input_value = $_SERVER [ "REMOTE_ADDR" ] ; /* Current User's IP Address for tracking purposes. */ /**/ $success_return_url = site_url ( "/?s2member_paypal_return=1" ) ; /* s2Member handles this all by itself. However, it can be Filtered. */ $success_return_url = apply_filters ( "ws_plugin__s2member_during_sc_paypal_button_success_return_url" , $success_return_url , get_defined_vars ( ) ) ; /**/ $attr [ "desc" ] = ( ! $attr [ "desc" ] ) ? $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $attr [ "level" ] . "_label" ] : $attr [ "desc" ] ; /**/ $attr [ "level_ccaps_eotper" ] = ( $attr [ "rr" ] === "BN" && $attr [ "rt" ] !== "L" ) ? $attr [ "level" ] . ":" . $attr [ "ccaps" ] . ":" . $attr [ "rp" ] . " " . $attr [ "rt" ] : $attr [ "level" ] . ":" . $attr [ "ccaps" ] ; $attr [ "level_ccaps_eotper" ] = rtrim ( $attr [ "level_ccaps_eotper" ] , ":" ) ; /* Clean any trailing separators from this string. */ /**/ $code = trim ( file_get_contents ( dirname ( dirname ( __FILE__ ) ) . "/templates/buttons/paypal-checkout-button.html" ) ) ; $code = preg_replace ( "/%%images%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "dir_url" ] . "/images" ) ) , $code ) ; $code = preg_replace ( "/%%wpurl%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( ) ) ) , $code ) ; /**/ $code = preg_replace ( "/%%endpoint%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_sandbox" ] ) ? "www.sandbox.paypal.com" : "www.paypal.com" ) ) , $code ) ; $code = preg_replace ( "/%%paypal_business%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "paypal_business" ] ) ) , $code ) ; $code = preg_replace ( "/%%level_label%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $attr [ "level" ] . "_label" ] ) ) , $code ) ; $code = preg_replace ( "/%%cancel_return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( home_url ( "/" ) ) ) , $code ) ; /* This brings them back to Front Page. */ $code = preg_replace ( "/%%notify_url%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( site_url ( "/?s2member_paypal_notify=1" ) ) ) , $code ) ; $code = preg_replace ( "/%%return%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $success_return_url ) ) , $code ) ; $code = preg_replace ( "/%%custom%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $_SERVER [ "HTTP_HOST" ] ) ) , $code ) ; $code = preg_replace ( "/%%level%%/" , c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "level" ] ) ) , $code ) ; /**/ $code = preg_replace ( '/ \\!--(\input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\)--\/' , " $1" , $code ) ; $code = ( $attr [ "rr" ] === "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="cmd" value\=")(.*?)(" \/\)/' , " $1_xclick $3" , $code ) : $code ; $code = ( $attr [ "rr" ] === "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\)/' , " !--$1--" , $code ) : $code ; $code = ( $attr [ "rr" ] === "BN" || ! $attr [ "tp" ] ) ? preg_replace ( '/ (\input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\)/' , " !--$1--" , $code ) : $code ; $code = ( $attr [ "rr" ] !== "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="cmd" value\=")(.*?)(" \/\)/' , " $1_xclick-subscriptions$3" , $code ) : $code ; $code = ( $attr [ "rr" ] !== "BN" ) ? preg_replace ( '/ (\input type\="hidden" name\="amount" value\="(.*?)" \/\)/' , " !--$1--" , $code ) : $code ; /**/ $code = preg_replace ( '/ name\="lc" value\="(.*?)"/' , ' name="lc" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "lc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="no_shipping" value\="(.*?)"/' , ' name="no_shipping" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ns" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_name" value\="(.*?)"/' , ' name="item_name" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "desc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="item_number" value\="(.*?)"/' , ' name="item_number" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "level_ccaps_eotper" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="page_style" value\="(.*?)"/' , ' name="page_style" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ps" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="currency_code" value\="(.*?)"/' , ' name="currency_code" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "cc" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="custom" value\="(.*?)"/' , ' name="custom" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "custom" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="on0" value\="(.*?)"/' , ' name="on0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os0" value\="(.*?)"/' , ' name="os0" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os0_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="on1" value\="(.*?)"/' , ' name="on1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_on1_input_value ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="os1" value\="(.*?)"/' , ' name="os1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $paypal_os1_input_value ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="modify" value\="(.*?)"/' , ' name="modify" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "modify" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="amount" value\="(.*?)"/' , ' name="amount" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="src" value\="(.*?)"/' , ' name="src" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rr" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="srt" value\="(.*?)"/' , ' name="srt" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rrt" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="sra" value\="(.*?)"/' , ' name="sra" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rra" ] ) ) . '"' , $code ) ; /**/ $code = preg_replace ( '/ name\="a1" value\="(.*?)"/' , ' name="a1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ta" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="p1" value\="(.*?)"/' , ' name="p1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "tp" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="t1" value\="(.*?)"/' , ' name="t1" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "tt" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="a3" value\="(.*?)"/' , ' name="a3" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "ra" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="p3" value\="(.*?)"/' , ' name="p3" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rp" ] ) ) . '"' , $code ) ; $code = preg_replace ( '/ name\="t3" value\="(.*?)"/' , ' name="t3" value="' . c_ws_plugin__s2member_utils_strings:: esc_ds ( esc_attr ( $attr [ "rt" ] ) ) . '"' , $code ) ; /**/ $code = $_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 ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; ( $attr [ "modify" ] ) ? do_action ( "ws_plugin__s2member_during_sc_paypal_modification_button" , get_defined_vars ( ) ) /**/ : do_action ( "ws_plugin__s2member_during_sc_paypal_button" , get_defined_vars ( ) ) ; /* Else, we process normally. */ unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } /**/ $code = c_ws_plugin__s2member_sc_paypal_button_e:: sc_paypal_button_encryption ( $code , get_defined_vars ( ) ) ; /**/ return apply_filters ( "ws_plugin__s2member_sc_paypal_button" , $code , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\sc-paypal-button-in.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:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13067&p=25362#p25362 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\sc-paypal-button-in.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


]]>