API Notifications/Custom Replacement Values Question
Posted: October 15th, 2010, 1:16 pm
I am looking to integrate s2member with an affiliate plugin and am a little confused about what exactly I need to do and am hoping someone here can clarify it for me.
The part I am most confused about is the section about custom replacement values - here is what it says underneath the box where I paste my ipn handling url under payment notification urls:
That seems to be what I need to do, but wasn't sure how to set what %%cv1%% references to? What do I need to do so it works with the shortcode? When I go to setup a button in s2member, it doesn't seem like there is any place to specify the custom field values or to edit the button code to generate a shortcode for it.
Here is the documentation from the affiliate plugin for what I need to do if that is helpful to anyone:
Any insight on all of this is very much appreciated!
The part I am most confused about is the section about custom replacement values - here is what it says underneath the box where I paste my ipn handling url under payment notification urls:
%%cv1%% = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute, inside your Shortcode, like this: custom="www.mydomain.com|cv1|cv2|cv3". You can have an unlimited number of custom variables that track IP addresses, affiliate IDs, etc. In some cases you may need to use PHP code to insert a value into the custom field dynamically. Obviously this is for advanced webmasters, but the functionality has been made available for those who need it.
This example uses cv1 to track a User's IP address:
( The IP address could be referenced using %%cv1%% )
custom="www.mydomain.com|<?php echo $_SERVER["REMOTE_ADDR"]; ?>"
That seems to be what I need to do, but wasn't sure how to set what %%cv1%% references to? What do I need to do so it works with the shortcode? When I go to setup a button in s2member, it doesn't seem like there is any place to specify the custom field values or to edit the button code to generate a shortcode for it.
Here is the documentation from the affiliate plugin for what I need to do if that is helpful to anyone:
- Code: Select all
All you need to do is specify the URL of the ipn handling script in your PayPal button’s code. For example:
<input type="hidden" name="notify_url" value="http://www.your-domain-name.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php">
And add the Affiliate’s ID to the “custom” field of the button from the cookie. For example:
<input type="hidden" name="custom" value="<?php echo $_COOKIE['ap_id']; ?>">
Any insight on all of this is very much appreciated!