latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Hidden custom field to store affiliate id

Home Forums Community Forum Hidden custom field to store affiliate id

This topic contains 3 replies, has 2 voices. Last updated by  Bruce 3 years, 8 months ago.

Topic Author Topic
Posted: Monday Apr 29th, 2013 at 8:55 am #48651
Rene Pall
Username: rpall

I have a situation where i’m using sagepay for checkout and Infusionsoft for managing contacts. I have a payment notification script that handles adding the customer to Infusion, creating the order and creating the referral connections.

The problem is that i have the affiliate id stored in a cookie and i can’t access the cookie when using S2Member API payment notification.

Is there a way i could read the cookie value in the payment notification script? Or i need to add the affiliate id to the user profile upon registration? If so then what would be the best way of storing the affiliate id with the customer profile so that i can read it from ther user instance in the payment notification script?

Thanks.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Apr 30th, 2013 at 3:17 am #48777
Bruce
Username: Bruce
Staff Member

Is there a way i could read the cookie value in the payment notification script? Or i need to add the affiliate id to the user profile upon registration? If so then what would be the best way of storing the affiliate id with the customer profile so that i can read it from ther user instance in the payment notification script?

You could use the information provided in this Knowledge Base Article to pass the affiliate ID on checkout as a custom value through your payment gateway.

See: Knowledge Base » Using Variables In A Shortcode

From the docs
(Dashboard -› s2Member® -› PayPal® Pro Forms -› Shortcode Attributes (Explained)):

custom=”example.com” must start with your domain. Additional values can be piped in (ex: custom=”example.com|cv1|cv2|cv3|etc”). Not valid when cancel=”1″.

Note that you’ll need to save this information using one of the solutions provided in API / Tracking or API / Notifications.

See: Knowledge Base » Building An API Notification Handler

Posted: Thursday May 2nd, 2013 at 4:15 am #49001
Rene Pall
Username: rpall

That would mean that the affiliate id would need to be passed back to me from sagepay right? It seems that it would be easier to just store that as a hidden custom field for the user profile. Can i do that?

Posted: Thursday May 2nd, 2013 at 6:55 pm #49061
Bruce
Username: Bruce
Staff Member

That would mean that the affiliate id would need to be passed back to me from sagepay right? It seems that it would be easier to just store that as a hidden custom field for the user profile. Can i do that?

Yes it would be sent through your payment gateway, just like all of the other information that creates a User’s account. If you’d rather create a dynamic Custom Registration/Profile Field, you can do that too:

Video » s2Member (Custom Fields Dynamically?)

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.