PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
global $current_user;
get_currentuserinfo();
$user_id = $current_user->ID;
<?php echo do_shortcode('[s2Member-Pro-PayPal-Form sp="1" ids="'.$guide_ID.'" exp="'.$time.'" desc="'.get_the_title($guide_ID).'" ps="paypal" lc="" cc="USD" dg="0" ns="1"'.
'custom="'.$site_url.'|'.$user_id.'" '.
'ra="'.$price.'" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]'); ?>
custom="cristian.websharks-inc.net" must start with your domain. Additional values can be piped in ( ex: custom="example.com|cv1|cv2|cv3|etc" ).
$shortcode = '[s2Member-Pro-PayPal-Form sp="1" ids="'.$guide_ID.'" exp="'.$time.'" desc="Purchase '.get_the_title($guide_ID).':" ps="paypal" lc="" cc="USD" dg="0" ns="1"'.
' custom="'.$domain.'|'.$current_user_id.'" '.
'ra="'.$price.'" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="1" default_country_code="" captcha="0" /]';
http://www.mydomain.com/log-payments/?secret_key=SECRET&sp_access_url=%%sp_access_url%%&sp_access_exp=%%sp_access_exp%%&txn_id=%%txn_id%%&item_name=%%item_name%%&payer_email=%%payer_email%%&id=%%cv1%%
if ($_GET) {
$payer_email = $_GET['payer_email'];
$guide_name = $_GET['item_name'];
$expiration_date = $_GET['sp_access_exp'];
$sp_access_url = $_GET['sp_access_url'];
$txn_id = $_GET['txn_id']; //s2member transaction id
$user_id = $_GET['id'];
date_default_timezone_set('America/New_York');
$date = date('Y-m-d H:i:s');
//$user_id = 5;
}
s_d_p wrote:Error#www.mydomain.com
Obviously this doesn't work. Strangely, most of the time, a working url gets passed that looks something like this: http://tinyurl.com/3lcfs39#www.mydomain.com
Any ideas why this might happen?
$tinyurl . "#" . $_SERVER["HTTP_HOST"]
@param bool $shrink Optional. Defaults to true. If false, the raw link will NOT be processed by the tinyURL API.
else if ($shrink && ($tinyurl = c_ws_plugin__s2member_utils_urls::remote ("http://tinyurl.com/api-create.php?url=" . rawurlencode ($register_link))))
return apply_filters ("ws_plugin__s2member_register_link_gen", $tinyurl . "#" . $_SERVER["HTTP_HOST"], get_defined_vars ());
else if ($shrink && ($tinyurl = c_ws_plugin__s2member_utils_urls::remote ("http://tinyurl.com/api-create.php?url=" . rawurlencode ($register_link))) && stripos ($tinyurl, "http") === 0)
return apply_filters ("ws_plugin__s2member_register_link_gen", $tinyurl . "#" . $_SERVER["HTTP_HOST"], get_defined_vars ());
* (s2Member) **tinyURL bug fix**. s2Member's handling of potential failures in the output of tinyURLs, generated by the tinyURL API; was NOT considering all possibilities. A symptom of this bug was to see URLs in your Signup Confirmation Email (occassionally, upon connection failure to the tinyURL API, when it was down for whatever reason) starting with: `Error#`. Corrected in this release.
* (s2Member) **URL Shortening API (Preference)**. s2Member now includes a class method dedicated to URL shortening service APIs. Currently, s2Member will use the tinyURL API first *(i.e. tinyurl.com )*, and then use Google's URL Shortening API *(i.e. goo.gl )* as a backup when/if the tinyURL API is down for whatever reason. In this release, a new configurable option is available, which allows advanced site owners to preference the Google Shortening API over tinyURL, if they desire. For further details, please check your Dashboard, under: `s2Member -> General Options -> URL Shortening API (Preference)`.
Users browsing this forum: Google [Bot] and 1 guest