Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-01T19:01:51-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14258 2011-10-01T19:01:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=42100#p42100 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> Confirmed. Changes coming in the next release of s2Member.
* (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)`.

Statistics: Posted by Jason Caldwell — October 1st, 2011, 7:01 pm


]]>
2011-10-01T17:01:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=42095#p42095 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> Thanks for the heads up on this thread.

It looks like tinyURL has changed the way their API returns on failure,
and this section of s2Member's code needs to be updated to correct the problem.
Code:
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 ()); 

Needs to be changed to this:
Code:
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 ()); 

I'm having this fixed in the next release so the problem is not ongoing.
In addition, we'll add a built-in backup URL shortener as well, so that failures, if/when they do occur, don't result in a long URL all the time.

Statistics: Posted by Jason Caldwell — October 1st, 2011, 5:01 pm


]]>
2011-09-28T21:43:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=41871#p41871 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
yoursiteurlhere?s2member_sp_access=fnIyOklndkNBNkRKS1JhREpXdHhQUkhIMGtZSUc4U2c0T1pPfLiA_6EWQAAqutZaN3DsEqD_OIo55fyvwRBD8DkCfIMep5YyCZXj0OjuKepdeyHxfECVhqK2NPs3-kyncVk_PM8

So after you pointed this out - this might not be such a good idea - particularly due to email message wrapping - which might cause the url to break - if sending out links.

Thanks for pointing that out.

I wonder if adding a hook in there via s2-hacks to use even another url shortner might be a better idea in the event that the initial service times out or fails.

Statistics: Posted by sgtcory — September 28th, 2011, 9:43 pm


]]>
2011-09-28T21:28:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=41868#p41868 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> @sgtcory: That's an interesting idea. Is there any security risk with giving access up front to the access url? It has special parameters tacked on that its best to shield from the user, right? But I guess those appear when they use the link anyway, so maybe it doesn't matter. I'm just throwing this concern out there. Is there any reason besides convenience to use the tinyurl api?

Statistics: Posted by s_d_p — September 28th, 2011, 9:28 pm


]]>
2011-09-28T00:30:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=41778#p41778 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
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?


Just thought I would jump in here - since I was interested in using your method over my current solution. That second url is the correct url generated for specific post / pages. These urls are shortened via the Tinyurl api in :

/s2member/includes/classes/sp-access.inc.php

Code:
$tinyurl . "#" . $_SERVER["HTTP_HOST"]


So it looks like there was an error when using the tinyurl api - which Jason did account for with an alternate filter to pass the long url - but it also failed.

Not particularly helpful in solving the issue - but might help better to understand that you can bypass the url shortening altogether.

Code:
@param bool $shrink Optional. Defaults to true. If false, the raw link will NOT be processed by the tinyURL API.

Statistics: Posted by sgtcory — September 28th, 2011, 12:30 am


]]>
2011-09-27T23:36:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=41773#p41773 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> WP Admin -> s2Member -> PayPal Options -> Account Details -> Enable Logging

Statistics: Posted by Cristián Lávaque — September 27th, 2011, 11:36 pm


]]>
2011-09-25T18:44:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=39146#p39146 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
My pro form is generated by this:

Code:
$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" /]'


My notifications url looks like this:

Code:
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%%


The url parameters get sent to a page (/log-payments/) which contains this code:

Code:
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;

Statistics: Posted by s_d_p — September 25th, 2011, 6:44 pm


]]>
2011-09-25T17:50:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=39130#p39130 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
Also, why are you using do_shortcode? It'd be easier to work with the shortcode directly. viewtopic.php?f=36&t=1604

Statistics: Posted by Cristián Lávaque — September 25th, 2011, 5:50 pm


]]>
2011-09-22T13:33:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=38938#p38938 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
I successfully created a purchase history using the method described above. However, we've noticed an infrequent problem that confuses me.

Every now and then, the parameter sp_access_url gets passed as: 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?

Statistics: Posted by s_d_p — September 22nd, 2011, 1:33 pm


]]>
2011-08-17T03:52:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=32110#p32110 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> $_SERVER['HTTP_HOST'].

WP Admin -> s2member -> PayPal Buttons -> Shortcode Attributes (Explained) -> custom
custom="cristian.websharks-inc.net" must start with your domain. Additional values can be piped in ( ex: custom="example.com|cv1|cv2|cv3|etc" ).


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — August 17th, 2011, 3:52 am


]]>
2011-08-16T17:01:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=32061#p32061 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
The custom attribute in the shortcode requires the first item to be the site DOMAIN. I was inserting the site's url, which was causing the entire attribute (including the pipe delimited attributes that followed) to be ignored.

So to demonstrate, this WONT work apparently:
custom="http://www.example.com|custom_thing"

While this WILL:
custom="example.com|custom_thing"

I'm not exactly sure why this is. Even though the change seems to have solved my problem for the moment, I would love to hear a bit of explanation about how those custom parameters are supposed to work.

Statistics: Posted by s_d_p — August 16th, 2011, 5:01 pm


]]>
2011-08-15T16:25:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=31991#p31991 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>
Code:
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" /]'); ?>


Do you see any reason why this shouldn't successfully pass the current user's id as cv1?

Here's the notification URL:
http://my_domain.com/log-payments/?secr ... ccess_url=%%sp_access_url%%&sp_access_exp=%%sp_access_exp%%&txn_id=%%txn_id%%&item_name=%%item_name%%&payer_email=%%payer_email%%&id=%%cv1%%

Statistics: Posted by s_d_p — August 15th, 2011, 4:25 pm


]]>
2011-08-11T22:48:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=30561#p30561 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> WP Admin -> s2Member -> API / Notifications

http://www.s2member.com/api-tracking-no ... ons-video/

Statistics: Posted by Cristián Lávaque — August 11th, 2011, 10:48 pm


]]>
2011-08-11T22:30:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=30556#p30556 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> Statistics: Posted by s_d_p — August 11th, 2011, 10:30 pm


]]>
2011-07-27T22:37:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=29371#p29371 <![CDATA[Re: Can I add a member's purchase history to their profile p]]>

Statistics: Posted by Cristián Lávaque — July 27th, 2011, 10:37 pm


]]>
2011-07-27T20:07:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=29363#p29363 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> Statistics: Posted by s_d_p — July 27th, 2011, 8:07 pm


]]>
2011-07-27T17:18:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=29350#p29350 <![CDATA[Re: Can I add a member's purchase history to their profile p]]> Statistics: Posted by Cristián Lávaque — July 27th, 2011, 5:18 pm


]]>
2011-07-27T16:14:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14258&p=29331#p29331 <![CDATA[Can I add a member's purchase history to their profile page?]]> Statistics: Posted by s_d_p — July 27th, 2011, 4:14 pm


]]>