Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:51:46-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13215 2011-12-20T09:51:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=57974#p57974 <![CDATA[s2Member v111220 / Source Code: s2member-p...]]>
s2Member v111220
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: December 20, 2011, 9:51 am

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

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


]]>
2011-12-07T01:04:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=55656#p55656 <![CDATA[s2Member v111206 / Source Code: s2member-p...]]>
s2Member v111206
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: December 7, 2011, 1:04 am

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

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


]]>
2011-11-05T19:27:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=52030#p52030 <![CDATA[s2Member v111105 / Source Code: s2member-p...]]>
s2Member v111105
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: November 5, 2011, 8:27 pm

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

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


]]>
2011-10-29T20:37:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=50126#p50126 <![CDATA[s2Member v111029 / Source Code: s2member-p...]]>
s2Member v111029
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: October 29, 2011, 9:37 pm

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

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


]]>
2011-10-17T15:41:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=47920#p47920 <![CDATA[s2Member v111017 / Source Code: s2member-p...]]>
s2Member v111017
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: October 17, 2011, 1:41 pm

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

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


]]>
2011-10-11T14:37:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=46322#p46322 <![CDATA[s2Member v111011 / Source Code: s2member-p...]]>
s2Member v111011
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: October 11, 2011, 12:37 pm

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

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


]]>
2011-10-03T15:49:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=44451#p44451 <![CDATA[s2Member v111003 / Source Code: s2member-p...]]>
s2Member v111003
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: October 3, 2011, 1:49 pm

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

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


]]>
2011-10-03T03:43:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=43158#p43158 <![CDATA[s2Member v111002 / Source Code: s2member-p...]]>
s2Member v111002
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: October 3, 2011, 1:43 am

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

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


]]>
2011-09-27T05:28:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=41400#p41400 <![CDATA[s2Member v110927 / Source Code: s2member-p...]]>
s2Member v110927
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: September 27, 2011, 3:28 am

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

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


]]>
2011-09-26T21:04:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=40156#p40156 <![CDATA[s2Member v110926 / Source Code: s2member-p...]]>
s2Member v110926
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: September 26, 2011, 7:04 pm

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

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


]]>
2011-09-17T17:03:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=38300#p38300 <![CDATA[s2Member v110915 / Source Code: s2member-p...]]>
s2Member v110915
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: September 17, 2011, 3:03 pm

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

Statistics: Posted by System Robot — September 17th, 2011, 5:03 pm


]]>
2011-09-14T01:29:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=36878#p36878 <![CDATA[s2Member v110913 / Source Code: s2member-p...]]>
s2Member v110913
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: September 13, 2011, 11:29 pm

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

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


]]>
2011-09-13T12:04:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=35606#p35606 <![CDATA[s2Member v110912 / Source Code: s2member-p...]]>
s2Member v110912
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: September 13, 2011, 10:04 am

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

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


]]>
2011-08-15T15:16:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=31714#p31714 <![CDATA[s2Member v110815 / Source Code: s2member-p...]]>
s2Member v110815
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: August 15, 2011, 4:17 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-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php ?php /** * ccBill® DataLink integration. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * This WordPress® plugin ( s2Member Pro ) is comprised of two parts: * * o (1) Its PHP code is licensed under the GPL license, as is WordPress®. * 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/}. * * o (2) All other parts of ( s2Member Pro ); including, but not limited to: * the CSS code, some JavaScript code, images, and design; * are licensed according to the license purchased. * See: {@link http://www.s2member.com/prices/} * * Unless you have our prior written consent, you must NOT directly or indirectly license, * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module; * or make an offer to do any of these things. All of these things are strictly * prohibited with part (2) of the s2Member Pro Module. * * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com * ( i.e. new features, bug fixes, updates, improvements ); along with full access * to our video tutorial library: {@link http://www.s2member.com/videos/} * * @package s2Member\ccBill * @since 1.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_pro_ccbill_datalink" ) ) { /** * ccBill® DataLink integration. * * @package s2Member\ccBill * @since 1.5 */ class c_ws_plugin__s2member_pro_ccbill_datalink { /** * Connect to and process DataLink information for ccBill®. * * s2Member's Auto EOT System must be enabled for this to work properly. * * If you have a HUGE userbase, increase the max IPNs per process. * But NOTE, this runs ``$per_process`` *( per Blog )* on a Multisite Network. * To increase, use: ``add_filter ("ws_plugin__s2member_pro_ccbill_datalink_ipns_per_process");``. * * @package s2Member\ccBill * @since 1.5 * * @attaches-to ``add_action("ws_plugin__s2member_after_auto_eot_system");`` * * @param array $vars Expects an array of defined variables passed in by the Action Hook. * @return null */ public static function ccbill_datalink ( $vars = FALSE ) { global $wpdb ; /* Need global DB obj. */ global $current_site , $current_blog ; /* For Multisite support. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_client_id" ] ) /* Configd? */ { $datalink = "https://datalink.ccbill.com/data/main.cgi" ; /* DataLink service. */ /**/ if ( ! ( $last = get_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) ) ) || $last ( time ( ) - 86400 ) ) { $start = ( $last && $last = ( time ( ) - ( 86400 + 43200 ) ) ) ? $last : time ( ) - 86400 ; /* Don't let $start time be less than 1 day + 12 hours ago. */ $end = $last = ( $start + 86400 ) ; /* Sets $end time to exactly 1 day later. This also sets $last time; which is recorded later in this routine. */ /**/ $qvrs = array ( "startTime" = date ( "YmdHis" , $start ) , "endTime" = date ( "YmdHis" , $end ) , "transactionTypes" = "EXPIRE,REBILL,REFUND,CHARGEBACK" , "clientAccnum" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_client_id" ] , "clientSubacc" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_client_sid" ] , "username" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_dl_user" ] , "password" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_dl_pass" ] ) ; /**/ if ( ( $unprocessed_ipn_lines = trim (c_ws_plugin__s2member_utils_urls:: remote ( $datalink = add_query_arg ( urlencode_deep ( $qvrs ) , $datalink ) ) ) ) && ! preg_match ( "/^Error\:/i" , $unprocessed_ipn_lines ) ) { $ccbill [ "s2member_log" ] [ ] = "Storing last DataLink time: " . date ( "D M j, Y g:i:s a T" , $last ) ; /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) , $last , 31556926 ) ; /**/ $ccbill [ "s2member_log" ] [ ] = "Storing new DataLink IPNs into a Transient Queue." ; $ccbill [ "s2member_log" ] [ ] = $datalink ; /* Record the full DataLink URL as well. */ $ccbill [ "s2member_log" ] [ ] = $unprocessed_ipn_lines ; /* Record list in log. */ /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) , trim ( trim ( get_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) ) ) . "\n" . $unprocessed_ipn_lines ) , 31556926 ) ; } else if ( ! preg_match ( "/^Error\:/i" , $unprocessed_ipn_lines ) ) /* In this case, there we no new IPNs. */ { $ccbill [ "s2member_log" ] [ ] = "Storing last DataLink time: " . date ( "D M j, Y g:i:s a T" , $last ) ; /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) , $last , 31556926 ) ; /**/ $ccbill [ "s2member_log" ] [ ] = "No new Datalink IPNs at this time: " . date ( "D M j, Y g:i:s a T" ) ; $ccbill [ "s2member_log" ] [ ] = $datalink ; /* Record the full DataLink URL as well. */ $ccbill [ "s2member_log" ] [ ] = $unprocessed_ipn_lines ; /* Log this; just in case. */ } else /* Otherwise, we need to record any errors that were found in the DataLink response. */ { $ccbill [ "s2member_log" ] [ ] = "Storing last DataLink time: " . date ( "D M j, Y g:i:s a T" , $last ) ; /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) , $last , 31556926 ) ; /**/ $ccbill [ "s2member_log" ] [ ] = "Recording DataLink error at: " . date ( "D M j, Y g:i:s a T" ) ; $ccbill [ "s2member_log" ] [ ] = "Recording server IP address: " . $_SERVER [ "SERVER_ADDR" ] ; $ccbill [ "s2member_log" ] [ ] = $datalink ; /* Record the full DataLink URL as well. */ $ccbill [ "s2member_log" ] [ ] = $unprocessed_ipn_lines ; /* Log error mesg. */ } /**/ $logv = c_ws_plugin__s2member_utilities:: ver_details ( ) ; $logm = c_ws_plugin__s2member_utilities:: mem_details ( ) ; $log4 = $_SERVER [ "HTTP_HOST" ] . $_SERVER [ "REQUEST_URI" ] . "\nUser-Agent: " . $_SERVER [ "HTTP_USER_AGENT" ] ; $log4 = ( is_multisite ( ) && ! is_main_site ( ) ) ? ( $_log4 = $current_blog - domain . $current_blog - path ) . "\n" . $log4 : $log4 ; $log2 = ( is_multisite ( ) && ! is_main_site ( ) ) ? "ccbill-dl-4-" . trim ( preg_replace ( "/[^a-z0-9]/i" , "-" , $_log4 ) , "-" ) . ".log" : "ccbill-dl.log" ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "gateway_debug_logs" ] ) if ( is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) if ( is_writable ( $logs_dir ) && c_ws_plugin__s2member_utils_logs:: archive_oversize_log_files ( ) ) file_put_contents ( $logs_dir . "/" . $log2 , $logv . "\n" . $logm . "\n" . $log4 . "\n" . var_export ( $ccbill , true ) . "\n \n" , FILE_APPEND) ; } /**/ else if ( ( $unprocessed_ipn_lines = trim ( get_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) ) ) ) ) /* Anything? */ { $per_process = apply_filters ( "ws_plugin__s2member_pro_ccbill_datalink_ipns_per_process" , $vars [ "per_process" ] , get_defined_vars ( ) ) ; /**/ foreach ( ( $unprocessed_lines = preg_split ( "/[\r \n]+/" , $unprocessed_ipn_lines ) ) as $line = $unprocessed_line ) /* Begin processing IPN lines. */ { unset ( $ccbill , $processing , $processed , $ipn , $ipn_q , $log4 , $_log4 , $log2 , $logs_dir ) ; /* Unset/reset these variables each pass. */ /**/ if ( ( $unprocessed_line = trim ( $unprocessed_line ) ) && ( $counter = (int) $counter + 1 ) ) /* Keep a count of each IPN data line. */ { $ccbill [ "s2member_log" ] [ ] = "DataLink IPN processed on: " . date ( "D M j, Y g:i:s a T" ) ; /**/ $ccbill [ "dl_ipn" ] = c_ws_plugin__s2member_utils_strings:: trim_dq_deep ( preg_split ( "/\",\"/" , $unprocessed_line ) ) ; /**/ if ( is_array ( $ccbill [ "dl_ipn_signup_vars" ] = c_ws_plugin__s2member_utils_users:: get_user_ipn_signup_vars ( false , $ccbill [ "dl_ipn" ] [ 3 ] ) ) ) { if ( preg_match ( "/^REBILL$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) /* Recurring payments. */ { $ccbill [ "s2member_log" ] [ ] = "ccBill® transaction identified as (SUBSCRIPTION PAYMENT)." ; $ccbill [ "s2member_log" ] [ ] = "IPN reformulated. Piping through s2Member's core/standard PayPal® processor as txn_type (subscr_payment)." ; $ccbill [ "s2member_log" ] [ ] = "Please check PayPal® IPN logs for further processing details." ; /**/ $processing = $processed = true ; $ipn = array ( ) ; /* Reset. */ /**/ $ipn [ "txn_type" ] = "subscr_payment" ; $ipn [ "subscr_id" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "subscr_id" ] ; /**/ $ipn [ "custom" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "custom" ] ; /**/ $ipn [ "txn_id" ] = $ccbill [ "dl_ipn" ] [ 5 ] ; /* Unique transaction ID. */ /**/ $ipn [ "mc_gross" ] = number_format ( $ccbill [ "dl_ipn" ] [ 6 ] , 2 , "." , "" ) ; $ipn [ "mc_currency" ] = strtoupper ( "USD" ) ; /* DataLink uses USD. */ $ipn [ "tax" ] = number_format ( "0.00" , 2 , "." , "" ) ; /**/ $ipn [ "payer_email" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "payer_email" ] ; $ipn [ "first_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "first_name" ] ; $ipn [ "last_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "last_name" ] ; /**/ $ipn [ "option_name1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name1" ] ; $ipn [ "option_selection1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection1" ] ; /**/ $ipn [ "option_name2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name2" ] ; $ipn [ "option_selection2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection2" ] ; /**/ $ipn [ "item_number" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_number" ] ; $ipn [ "item_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_name" ] ; /**/ $ipn_q = "&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=standard-emails" ; $ipn_q .= "&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities:: paypal_proxy_key_gen ( ) ) ; /**/ c_ws_plugin__s2member_utils_urls:: remote ( site_url ( "/?s2member_paypal_notify=1" . $ipn_q ) , $ipn , array ( "timeout" = 20 ) ) ; } /**/ else if ( preg_match ( "/^EXPIRE$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) /* Expired Subscriptions. */ { $ccbill [ "s2member_log" ] [ ] = "ccBill® transaction identified as (SUBSCRIPTION EXPIRATION)." ; $ccbill [ "s2member_log" ] [ ] = "IPN reformulated. Piping through s2Member's core/standard PayPal® processor as txn_type (subscr_eot)." ; $ccbill [ "s2member_log" ] [ ] = "Please check PayPal® IPN logs for further processing details." ; /**/ $processing = $processed = true ; $ipn = array ( ) ; /* Reset. */ /**/ $ipn [ "txn_type" ] = "subscr_eot" ; $ipn [ "subscr_id" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "subscr_id" ] ; /**/ $ipn [ "custom" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "custom" ] ; /**/ $ipn [ "period1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "period1" ] ; $ipn [ "period3" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "period3" ] ; /**/ $ipn [ "payer_email" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "payer_email" ] ; $ipn [ "first_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "first_name" ] ; $ipn [ "last_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "last_name" ] ; /**/ $ipn [ "option_name1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name1" ] ; $ipn [ "option_selection1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection1" ] ; /**/ $ipn [ "option_name2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name2" ] ; $ipn [ "option_selection2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection2" ] ; /**/ $ipn [ "item_number" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_number" ] ; $ipn [ "item_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_name" ] ; /**/ $ipn_q = "&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=standard-emails" ; $ipn_q .= "&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities:: paypal_proxy_key_gen ( ) ) ; /**/ c_ws_plugin__s2member_utils_urls:: remote ( site_url ( "/?s2member_paypal_notify=1" . $ipn_q ) , $ipn , array ( "timeout" = 20 ) ) ; } /**/ else if ( preg_match ( "/^(REFUND|CHARGEBACK)$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) /* Refunds/Reversals. */ { $ccbill [ "s2member_log" ] [ ] = "ccBill® transaction identified as (REFUND|CHARGEBACK)." ; $ccbill [ "s2member_log" ] [ ] = "IPN reformulated. Piping through s2Member's core/standard PayPal® processor as payment_status (refunded|reversed)." ; $ccbill [ "s2member_log" ] [ ] = "Please check PayPal® IPN logs for further processing details." ; /**/ $processing = $processed = true ; $ipn = array ( ) ; /* Reset. */ /**/ $ipn [ "custom" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "custom" ] ; /**/ $ipn [ "parent_txn_id" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "subscr_id" ] ; /**/ $ipn [ "payment_status" ] = ( preg_match ( "/^CHARGEBACK$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) ? "reversed" : "refunded" ; $ipn [ "mc_fee" ] = "-" . number_format ( "0.00" , 2 , "." , "" ) ; $ipn [ "mc_gross" ] = "-" . number_format ( $ccbill [ "dl_ipn" ] [ 5 ] , 2 , "." , "" ) ; $ipn [ "mc_currency" ] = strtoupper ( "USD" ) ; /* DataLink uses USD. */ $ipn [ "tax" ] = "-" . number_format ( "0.00" , 2 , "." , "" ) ; /**/ $ipn [ "payer_email" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "payer_email" ] ; $ipn [ "first_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "first_name" ] ; $ipn [ "last_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "last_name" ] ; /**/ $ipn [ "option_name1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name1" ] ; $ipn [ "option_selection1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection1" ] ; /**/ $ipn [ "option_name2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name2" ] ; $ipn [ "option_selection2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection2" ] ; /**/ $ipn [ "item_number" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_number" ] ; $ipn [ "item_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_name" ] ; /**/ $ipn_q = "&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=standard-emails" ; $ipn_q .= "&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities:: paypal_proxy_key_gen ( ) ) ; /**/ c_ws_plugin__s2member_utils_urls:: remote ( site_url ( "/?s2member_paypal_notify=1" . $ipn_q ) , $ipn , array ( "timeout" = 20 ) ) ; } /**/ else if ( ! $processed ) /* Here we add a message to the logs indicating the IPN was ignored; no action taken. */ $ccbill [ "s2member_log" ] [ ] = "Ignoring this DataLink IPN. It does NOT require any action on the part of s2Member." ; } /**/ else if ( ! $processed ) /* Here we add a message to the logs indicating that no IPN vars are available. */ $ccbill [ "s2member_log" ] [ ] = "Ignoring this DataLink IPN. No IPN signup vars for Subscr. ID: " . $ccbill [ "dl_ipn" ] [ 3 ] . "." ; /**/ $logv = c_ws_plugin__s2member_utilities:: ver_details ( ) ; $logm = c_ws_plugin__s2member_utilities:: mem_details ( ) ; $log4 = $_SERVER [ "HTTP_HOST" ] . $_SERVER [ "REQUEST_URI" ] . "\nUser-Agent: " . $_SERVER [ "HTTP_USER_AGENT" ] ; $log4 = ( is_multisite ( ) && ! is_main_site ( ) ) ? ( $_log4 = $current_blog - domain . $current_blog - path ) . "\n" . $log4 : $log4 ; $log2 = ( is_multisite ( ) && ! is_main_site ( ) ) ? "ccbill-dl-ipn-4-" . trim ( preg_replace ( "/[^a-z0-9]/i" , "-" , $_log4 ) , "-" ) . ".log" : "ccbill-dl-ipn.log" ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "gateway_debug_logs" ] ) if ( is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) if ( is_writable ( $logs_dir ) && c_ws_plugin__s2member_utils_logs:: archive_oversize_log_files ( ) ) file_put_contents ( $logs_dir . "/" . $log2 , $logv . "\n" . $logm . "\n" . $log4 . "\n" . var_export ( $ccbill , true ) . "\n \n" , FILE_APPEND) ; } /**/ unset ( $unprocessed_lines [ $line ] ) ; /* Remove this line and update the list of unprocessed IPN lines. */ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) , implode ( "\n" , $unprocessed_lines ) , 31556926 ) ; /**/ if ( $counter = $per_process ) /* Only this many. */ break ; /* Break the loop now. */ } } } /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:16 pm


]]>
2011-07-11T17:34:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=27879#p27879 <![CDATA[s2Member v110710 / Source Code: s2member-p...]]>
s2Member v110710
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: July 11, 2011, 6:34 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-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php ?php /** * ccBill® DataLink integration. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * This WordPress® plugin ( s2Member Pro ) is comprised of two parts: * * o (1) Its PHP code is licensed under the GPL license, as is WordPress®. * 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/}. * * o (2) All other parts of ( s2Member Pro ); including, but not limited to: * the CSS code, some JavaScript code, images, and design; * are licensed according to the license purchased. * See: {@link http://www.s2member.com/prices/} * * Unless you have our prior written consent, you must NOT directly or indirectly license, * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module; * or make an offer to do any of these things. All of these things are strictly * prohibited with part (2) of the s2Member Pro Module. * * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com * ( i.e. new features, bug fixes, updates, improvements ); along with full access * to our video tutorial library: {@link http://www.s2member.com/videos/} * * @package s2Member\ccBill * @since 1.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_pro_ccbill_datalink" ) ) { /** * ccBill® DataLink integration. * * @package s2Member\ccBill * @since 1.5 */ class c_ws_plugin__s2member_pro_ccbill_datalink { /** * Connect to and process DataLink information for ccBill®. * * s2Member's Auto EOT System must be enabled for this to work properly. * * If you have a HUGE userbase, increase the max IPNs per process. * But NOTE, this runs ``$per_process`` *( per Blog )* on a Multisite Network. * To increase, use: ``add_filter ("ws_plugin__s2member_pro_ccbill_datalink_ipns_per_process");``. * * @package s2Member\ccBill * @since 1.5 * * @attaches-to ``add_action("ws_plugin__s2member_after_auto_eot_system");`` * * @param array $vars Expects an array of defined variables passed in by the Action Hook. * @return null */ public static function ccbill_datalink ( $vars = FALSE ) { global $wpdb ; /* Need global DB obj. */ global $current_site , $current_blog ; /* For Multisite support. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_client_id" ] ) /* Configd? */ { $datalink = "https://datalink.ccbill.com/data/main.cgi" ; /* DataLink service. */ /**/ if ( ! ( $last = get_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) ) ) || $last ( time ( ) - 86400 ) ) { $start = ( $last && $last = ( time ( ) - ( 86400 + 43200 ) ) ) ? $last : time ( ) - 86400 ; /* Don't let $start time be less than 1 day + 12 hours ago. */ $end = $last = ( $start + 86400 ) ; /* Sets $end time to exactly 1 day later. This also sets $last time; which is recorded later in this routine. */ /**/ $qvrs = array ( "startTime" = date ( "YmdHis" , $start ) , "endTime" = date ( "YmdHis" , $end ) , "transactionTypes" = "EXPIRE,REBILL,REFUND,CHARGEBACK" , "clientAccnum" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_client_id" ] , "clientSubacc" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_client_sid" ] , "username" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_dl_user" ] , "password" = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "pro_ccbill_dl_pass" ] ) ; /**/ if ( ( $unprocessed_ipn_lines = trim (c_ws_plugin__s2member_utils_urls:: remote ( $datalink = add_query_arg ( urlencode_deep ( $qvrs ) , $datalink ) ) ) ) && ! preg_match ( "/^Error\:/i" , $unprocessed_ipn_lines ) ) { $ccbill [ "s2member_log" ] [ ] = "Storing last DataLink time: " . date ( "D M j, Y g:i:s a T" , $last ) ; /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) , $last , 31556926 ) ; /**/ $ccbill [ "s2member_log" ] [ ] = "Storing new DataLink IPNs into a Transient Queue." ; $ccbill [ "s2member_log" ] [ ] = $datalink ; /* Record the full DataLink URL as well. */ $ccbill [ "s2member_log" ] [ ] = $unprocessed_ipn_lines ; /* Record list in log. */ /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) , trim ( trim ( get_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) ) ) . "\n" . $unprocessed_ipn_lines ) , 31556926 ) ; } else if ( ! preg_match ( "/^Error\:/i" , $unprocessed_ipn_lines ) ) /* In this case, there we no new IPNs. */ { $ccbill [ "s2member_log" ] [ ] = "Storing last DataLink time: " . date ( "D M j, Y g:i:s a T" , $last ) ; /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) , $last , 31556926 ) ; /**/ $ccbill [ "s2member_log" ] [ ] = "No new Datalink IPNs at this time: " . date ( "D M j, Y g:i:s a T" ) ; $ccbill [ "s2member_log" ] [ ] = $datalink ; /* Record the full DataLink URL as well. */ $ccbill [ "s2member_log" ] [ ] = $unprocessed_ipn_lines ; /* Log this; just in case. */ } else /* Otherwise, we need to record any errors that were found in the DataLink response. */ { $ccbill [ "s2member_log" ] [ ] = "Storing last DataLink time: " . date ( "D M j, Y g:i:s a T" , $last ) ; /**/ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_last_datalink" ) , $last , 31556926 ) ; /**/ $ccbill [ "s2member_log" ] [ ] = "Recording DataLink error at: " . date ( "D M j, Y g:i:s a T" ) ; $ccbill [ "s2member_log" ] [ ] = "Recording server IP address: " . $_SERVER [ "SERVER_ADDR" ] ; $ccbill [ "s2member_log" ] [ ] = $datalink ; /* Record the full DataLink URL as well. */ $ccbill [ "s2member_log" ] [ ] = $unprocessed_ipn_lines ; /* Log error mesg. */ } /**/ $logv = c_ws_plugin__s2member_utilities:: ver_details ( ) ; $log4 = $_SERVER [ "HTTP_HOST" ] . $_SERVER [ "REQUEST_URI" ] . "\nUser-Agent: " . $_SERVER [ "HTTP_USER_AGENT" ] ; $log4 = ( is_multisite ( ) && ! is_main_site ( ) ) ? ( $_log4 = $current_blog - domain . $current_blog - path ) . "\n" . $log4 : $log4 ; $log2 = ( is_multisite ( ) && ! is_main_site ( ) ) ? "ccbill-dl-4-" . trim ( preg_replace ( "/[^a-z0-9]/i" , "-" , $_log4 ) , "-" ) . ".log" : "ccbill-dl.log" ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "gateway_debug_logs" ] ) if ( is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) if ( is_writable ( $logs_dir ) && c_ws_plugin__s2member_utils_logs:: archive_oversize_log_files ( ) ) file_put_contents ( $logs_dir . "/" . $log2 , $logv . "\n" . $log4 . "\n" . var_export ( $ccbill , true ) . "\n \n" , FILE_APPEND) ; } /**/ else if ( ( $unprocessed_ipn_lines = trim ( get_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) ) ) ) ) /* Anything? */ { $per_process = apply_filters ( "ws_plugin__s2member_pro_ccbill_datalink_ipns_per_process" , $vars [ "per_process" ] , get_defined_vars ( ) ) ; /**/ foreach ( ( $unprocessed_lines = preg_split ( "/[\r \n]+/" , $unprocessed_ipn_lines ) ) as $line = $unprocessed_line ) /* Begin processing IPN lines. */ { unset ( $ccbill , $processing , $processed , $ipn , $ipn_q , $log4 , $_log4 , $log2 , $logs_dir ) ; /* Unset/reset these variables each pass. */ /**/ if ( ( $unprocessed_line = trim ( $unprocessed_line ) ) && ( $counter = (int) $counter + 1 ) ) /* Keep a count of each IPN data line. */ { $ccbill [ "s2member_log" ] [ ] = "DataLink IPN processed on: " . date ( "D M j, Y g:i:s a T" ) ; /**/ $ccbill [ "dl_ipn" ] = c_ws_plugin__s2member_utils_strings:: trim_dq_deep ( preg_split ( "/\",\"/" , $unprocessed_line ) ) ; /**/ if ( is_array ( $ccbill [ "dl_ipn_signup_vars" ] = c_ws_plugin__s2member_utils_users:: get_user_ipn_signup_vars ( false , $ccbill [ "dl_ipn" ] [ 3 ] ) ) ) { if ( preg_match ( "/^REBILL$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) /* Recurring payments. */ { $ccbill [ "s2member_log" ] [ ] = "ccBill® transaction identified as (SUBSCRIPTION PAYMENT)." ; $ccbill [ "s2member_log" ] [ ] = "IPN reformulated. Piping through s2Member's core/standard PayPal® processor as txn_type (subscr_payment)." ; $ccbill [ "s2member_log" ] [ ] = "Please check PayPal® IPN logs for further processing details." ; /**/ $processing = $processed = true ; $ipn = array ( ) ; /* Reset. */ /**/ $ipn [ "txn_type" ] = "subscr_payment" ; $ipn [ "subscr_id" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "subscr_id" ] ; /**/ $ipn [ "custom" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "custom" ] ; /**/ $ipn [ "txn_id" ] = $ccbill [ "dl_ipn" ] [ 5 ] ; /* Unique transaction ID. */ /**/ $ipn [ "mc_gross" ] = number_format ( $ccbill [ "dl_ipn" ] [ 6 ] , 2 , "." , "" ) ; $ipn [ "mc_currency" ] = strtoupper ( "USD" ) ; /* DataLink uses USD. */ $ipn [ "tax" ] = number_format ( "0.00" , 2 , "." , "" ) ; /**/ $ipn [ "payer_email" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "payer_email" ] ; $ipn [ "first_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "first_name" ] ; $ipn [ "last_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "last_name" ] ; /**/ $ipn [ "option_name1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name1" ] ; $ipn [ "option_selection1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection1" ] ; /**/ $ipn [ "option_name2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name2" ] ; $ipn [ "option_selection2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection2" ] ; /**/ $ipn [ "item_number" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_number" ] ; $ipn [ "item_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_name" ] ; /**/ $ipn_q = "&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=standard-emails" ; $ipn_q .= "&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities:: paypal_proxy_key_gen ( ) ) ; /**/ c_ws_plugin__s2member_utils_urls:: remote ( site_url ( "/?s2member_paypal_notify=1" . $ipn_q ) , $ipn , array ( "timeout" = 20 ) ) ; } /**/ else if ( preg_match ( "/^EXPIRE$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) /* Expired Subscriptions. */ { $ccbill [ "s2member_log" ] [ ] = "ccBill® transaction identified as (SUBSCRIPTION EXPIRATION)." ; $ccbill [ "s2member_log" ] [ ] = "IPN reformulated. Piping through s2Member's core/standard PayPal® processor as txn_type (subscr_eot)." ; $ccbill [ "s2member_log" ] [ ] = "Please check PayPal® IPN logs for further processing details." ; /**/ $processing = $processed = true ; $ipn = array ( ) ; /* Reset. */ /**/ $ipn [ "txn_type" ] = "subscr_eot" ; $ipn [ "subscr_id" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "subscr_id" ] ; /**/ $ipn [ "custom" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "custom" ] ; /**/ $ipn [ "period1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "period1" ] ; $ipn [ "period3" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "period3" ] ; /**/ $ipn [ "payer_email" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "payer_email" ] ; $ipn [ "first_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "first_name" ] ; $ipn [ "last_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "last_name" ] ; /**/ $ipn [ "option_name1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name1" ] ; $ipn [ "option_selection1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection1" ] ; /**/ $ipn [ "option_name2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name2" ] ; $ipn [ "option_selection2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection2" ] ; /**/ $ipn [ "item_number" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_number" ] ; $ipn [ "item_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_name" ] ; /**/ $ipn_q = "&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=standard-emails" ; $ipn_q .= "&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities:: paypal_proxy_key_gen ( ) ) ; /**/ c_ws_plugin__s2member_utils_urls:: remote ( site_url ( "/?s2member_paypal_notify=1" . $ipn_q ) , $ipn , array ( "timeout" = 20 ) ) ; } /**/ else if ( preg_match ( "/^(REFUND|CHARGEBACK)$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) /* Refunds/Reversals. */ { $ccbill [ "s2member_log" ] [ ] = "ccBill® transaction identified as (REFUND|CHARGEBACK)." ; $ccbill [ "s2member_log" ] [ ] = "IPN reformulated. Piping through s2Member's core/standard PayPal® processor as payment_status (refunded|reversed)." ; $ccbill [ "s2member_log" ] [ ] = "Please check PayPal® IPN logs for further processing details." ; /**/ $processing = $processed = true ; $ipn = array ( ) ; /* Reset. */ /**/ $ipn [ "custom" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "custom" ] ; /**/ $ipn [ "parent_txn_id" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "subscr_id" ] ; /**/ $ipn [ "payment_status" ] = ( preg_match ( "/^CHARGEBACK$/i" , $ccbill [ "dl_ipn" ] [ 0 ] ) ) ? "reversed" : "refunded" ; $ipn [ "mc_fee" ] = "-" . number_format ( "0.00" , 2 , "." , "" ) ; $ipn [ "mc_gross" ] = "-" . number_format ( $ccbill [ "dl_ipn" ] [ 5 ] , 2 , "." , "" ) ; $ipn [ "mc_currency" ] = strtoupper ( "USD" ) ; /* DataLink uses USD. */ $ipn [ "tax" ] = "-" . number_format ( "0.00" , 2 , "." , "" ) ; /**/ $ipn [ "payer_email" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "payer_email" ] ; $ipn [ "first_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "first_name" ] ; $ipn [ "last_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "last_name" ] ; /**/ $ipn [ "option_name1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name1" ] ; $ipn [ "option_selection1" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection1" ] ; /**/ $ipn [ "option_name2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_name2" ] ; $ipn [ "option_selection2" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "option_selection2" ] ; /**/ $ipn [ "item_number" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_number" ] ; $ipn [ "item_name" ] = $ccbill [ "dl_ipn_signup_vars" ] [ "item_name" ] ; /**/ $ipn_q = "&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=standard-emails" ; $ipn_q .= "&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities:: paypal_proxy_key_gen ( ) ) ; /**/ c_ws_plugin__s2member_utils_urls:: remote ( site_url ( "/?s2member_paypal_notify=1" . $ipn_q ) , $ipn , array ( "timeout" = 20 ) ) ; } /**/ else if ( ! $processed ) /* Here we add a message to the logs indicating the IPN was ignored; no action taken. */ $ccbill [ "s2member_log" ] [ ] = "Ignoring this DataLink IPN. It does NOT require any action on the part of s2Member." ; } /**/ else if ( ! $processed ) /* Here we add a message to the logs indicating that no IPN vars are available. */ $ccbill [ "s2member_log" ] [ ] = "Ignoring this DataLink IPN. No IPN signup vars for Subscr. ID: " . $ccbill [ "dl_ipn" ] [ 3 ] . "." ; /**/ $logv = c_ws_plugin__s2member_utilities:: ver_details ( ) ; $log4 = $_SERVER [ "HTTP_HOST" ] . $_SERVER [ "REQUEST_URI" ] . "\nUser-Agent: " . $_SERVER [ "HTTP_USER_AGENT" ] ; $log4 = ( is_multisite ( ) && ! is_main_site ( ) ) ? ( $_log4 = $current_blog - domain . $current_blog - path ) . "\n" . $log4 : $log4 ; $log2 = ( is_multisite ( ) && ! is_main_site ( ) ) ? "ccbill-dl-ipn-4-" . trim ( preg_replace ( "/[^a-z0-9]/i" , "-" , $_log4 ) , "-" ) . ".log" : "ccbill-dl-ipn.log" ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "gateway_debug_logs" ] ) if ( is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) if ( is_writable ( $logs_dir ) && c_ws_plugin__s2member_utils_logs:: archive_oversize_log_files ( ) ) file_put_contents ( $logs_dir . "/" . $log2 , $logv . "\n" . $log4 . "\n" . var_export ( $ccbill , true ) . "\n \n" , FILE_APPEND) ; } /**/ unset ( $unprocessed_lines [ $line ] ) ; /* Remove this line and update the list of unprocessed IPN lines. */ set_transient ( "s2m_" . md5 ( "s2member_pro_ccbill_datalink_ipns" ) , implode ( "\n" , $unprocessed_lines ) , 31556926 ) ; /**/ if ( $counter = $per_process ) /* Only this many. */ break ; /* Break the loop now. */ } } } /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

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


]]>
2011-07-09T06:14:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13215&p=25510#p25510 <![CDATA[s2Member v111220 / Source Code: s2member-p...]]>
s2Member v111220
Source Code: s2member-pro\includes\classes\gateways\ccbill\ccbill-datalink.inc.php
Docs updated: December 20, 2011, 9:51 am

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

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


]]>