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.

About: Horns Illustrated

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 15 topics - 1 through 15 (of 15 total)
Topic Count Last Reply
Shipping Fields for Authorize.net Pro Forms

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

3 years, 4 months ago  Horns Illustrated

Wrapping multiple shortcodes – No Select

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

3 years, 4 months ago  Horns Illustrated

Create An S2Member/WordPress Account via API

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

3 years, 4 months ago  Horns Illustrated

CShipping Fields for Autorize.net Pro Forms

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 1

3 years, 4 months ago  Horns Illustrated

One Form for Registration and Payment

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 1

3 years, 4 months ago  Bruce

No Sales Tracking S2member Idevaffiliate 1 2

By:  Matthew Bailey in: Community Forum

voices: 4
replies: 45

3 years, 6 months ago  Matthew Bailey

One last question – S2 Payment Notificatoin

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 8

3 years, 7 months ago  Horns Illustrated

API Payment Notification – triggers but…

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 4

3 years, 7 months ago  Bruce

Sending IDevAffiliate A Specific Amount

By:  Horns Illustrated in: Community Forum

voices: 3
replies: 10

3 years, 8 months ago  Bruce

Integrating iDevAffiliate and S2Member

By:  Sara Young in: Community Forum

voices: 3
replies: 4

3 years, 8 months ago  Sara Young

Passing actual couponcode to auth.net

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 4

3 years, 9 months ago  Bruce

Linking promotion codes to subscribers

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

4 years, 5 months ago  Horns Illustrated

Encryption

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 5

4 years, 8 months ago  Cristián Lávaque

Credit Card Charges

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 1

4 years, 8 months ago  Cristián Lávaque

Viewing 15 topics - 1 through 15 (of 15 total)

Topics I've Started

Viewing 13 topics - 1 through 13 (of 13 total)
Topic Count Last Reply
Shipping Fields for Authorize.net Pro Forms

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

3 years, 4 months ago  Horns Illustrated

Wrapping multiple shortcodes – No Select

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

3 years, 4 months ago  Horns Illustrated

Create An S2Member/WordPress Account via API

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

3 years, 4 months ago  Horns Illustrated

CShipping Fields for Autorize.net Pro Forms

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 1

3 years, 4 months ago  Horns Illustrated

One Form for Registration and Payment

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 1

3 years, 4 months ago  Bruce

One last question – S2 Payment Notificatoin

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 8

3 years, 7 months ago  Horns Illustrated

API Payment Notification – triggers but…

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 4

3 years, 7 months ago  Bruce

Sending IDevAffiliate A Specific Amount

By:  Horns Illustrated in: Community Forum

voices: 3
replies: 10

3 years, 8 months ago  Bruce

Passing actual couponcode to auth.net

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 4

3 years, 9 months ago  Bruce

Linking promotion codes to subscribers

By:  Horns Illustrated in: Community Forum

voices: 1
replies: 0

4 years, 5 months ago  Horns Illustrated

Encryption

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 5

4 years, 8 months ago  Cristián Lávaque

Credit Card Charges

By:  Horns Illustrated in: Community Forum

voices: 2
replies: 1

4 years, 8 months ago  Cristián Lávaque

Viewing 13 topics - 1 through 13 (of 13 total)

My Latest Replies (From Various Topics)

Viewing 22 replies - 1 through 22 (of 22 total)
Author Replies
Author Replies
Posted: Sunday Aug 25th, 2013 at 5:43 pm #58663

.

Posted: Tuesday May 28th, 2013 at 7:52 am #50740

BRUCE…

Here is what I did. I took out the wp_remote_fopen($uri) and replaced it with the echo

My code looks like this:

$p1 = "<img src=" . chr(34);				
$uri= '...sale.php?profile=83&idev_saleamt=' . $commission . '&idev_ordernum=' .$s2member_subscr_id ; 
$p2 = chr(34) . " style=" . chr(34). "height:1px; width:1px;" . chr(34). "/>";
				
$sendpart =  $p1 . $uri . $p2;
echo $sendpart;

and then I output $sendpart to a log file so I’ll know if code was generated.

The code is generated as I see the data from $sendpart in the log. However, the echo is not triggering the iDev.

I can copy the $sendpart URL into another browser window and it then does trigger it and I see the commission record in iDev.

I can only assume the ECHO is not the solution either. Is there a way I can escalate this up the support chain. I’m even willing to pay for support on this. So far, I’ve done everything that you’ve instructed me and it’s not working.

I know the MU Plugin is working and it’s running through the function fine, but neither solution you are suggest that will trigger the iDev is working.

Cordially,
Terry

Posted: Friday May 24th, 2013 at 8:53 am #50552

Bruce Help…

I’m about a week away from launching and really need to figure this out.

Would be highly interested in your thoughts on this.

I’m doing the MU Plugin and it’s triggering, however it’s not triggering the iDev sale.php so the sale gets counted.

My logic in the MU Plugin works because I’m capturing the data in a log, however it’s not registering with iDev.

Can you look at my code above and see what I might be doing wrong.

Please know I would greatly appreciate your help and getting past this…

Cordially,

Terry

Posted: Thursday May 23rd, 2013 at 7:57 am #50439

Bruce,

You know I was thinking…why would I want to use the wp_remote_fopen? This opens a remote file, however the sale.php is located on my domain.

Would I want to just use the include (/sale.php?profile=…)

The wp_remote_fopen is not working so I’m left thinking maybe this is not the correct way to do this.

What are your thougths?

Cordially,
Terry

Posted: Wednesday May 22nd, 2013 at 5:39 pm #50391

Eduan,

It seemed they could not get iDevAffiliate working properly and it also seemed like they installed it themselves. I was suggesting they have iDevAffiliate install it. We did and everything worked perfectly from the start.

Terry

Posted: Wednesday May 22nd, 2013 at 11:50 am #50374

Bruce,

First, thank you for your reply.

Secondly, I need to apologize. I have been pulling my hair out on this. Here is what I found:

1.) I actually (I know I did this before) did not remove the call in the API Tracking. This was the reason I kept thinking iDev as calling S2Member.

2.) I did remove it this time and double checked so it is gone from there.

3.) Going back to the MU Plugin – I used the $contents = wp_remote_fopen($uri);

This is not working…

I’ve tried it many different ways. I also output everything to a log. I output $contents which does not have anything in when it gets written to the log. This may be fine as I would take it as successful because the documentation suggest I would get false on failure.

I’ve also tried to hardcode the variables that I’m passing with no luck either.

I’m hoping you can help. This is getting extremely frustrating because it seems soooooo simple.

Here is my code:

<?php
add_action('init', 's2_payment_notification'); function s2_payment_notification()
	{
		if(!empty($_GET['s2_payment_notification'])) // In my URL, I have `?horns_affiliate_calc_actual_commission=yes`, that's what I'm looking for here.
			{
				if(!empty($_GET['user_id']) && !empty($_GET['item_number'])) // In my URL, I have `&user_id=%%user_id%%&item_number=%%item_number%%`, that's what I'm looking for here.
					{
						$user_id = (integer)$_GET['user_id']; // I'm expecting an integer in this value.
						$item_number = (string)$_GET['item_number']; // I'm expecting a string in this value.
						
						
						$user = new WP_User($user_id); // Get a WordPress® User object instance so I can work with this customer.
						
						// Here I might perform any number of tasks related to this user. Such as creating a user option value in WordPress.
						update_user_option($user_id, 'my_custom_data_for_this_user', $item_number);
						
						// I could also collect details about this user, by accessing properties of my WP_User object instance.
						$first_name = $user->first_name;
						$last_name = $user->last_name;
						$email = $user->user_email;
						$username = $user->user_login;
						
						$amount_paid = (string)$_GET['amount_paid']; // I'm expecting a string in this value.
						$full_coupon_code = (string)$_GET['coupon_code']; // I'm expecting a string in this value.
						// I can also pull s2Member® option values related to this user.
						$s2member_subscr_id = get_user_option('s2member_subscr_id', $user_id);
						$s2member_custom_fields = get_user_option('s2member_custom_fields', $user_id);
						$s2member_custom = get_user_option('s2member_custom', $user_id);
						$s2member_registration_ip = get_user_option('s2member_registration_ip', $user_id);
						$s2member_paid_registration_times = get_user_option('s2member_paid_registration_times', $user_id);
						$s2member_first_payment_txn_id = get_user_option('s2member_first_payment_txn_id', $user_id);
						$s2member_last_payment_time = get_user_option('s2member_last_payment_time', $user_id);
						$s2member_auto_eot_time = get_user_option('s2member_auto_eot_time', $user_id);
						$s2member_file_download_access_log = get_user_option('s2member_file_download_access_log', $user_id);
	
						
						/*Determine Product, then Transaction amount and then comission
						// Formula [Transaction $$ - Product COG] = Commission
						// Doesn't matter the discount because we will always take COG out and the rest is commissions
						*/
						$commission=0;
						$cog=0;
						
						//Determine what product and set the $commission to be pass to iDev
						Switch ($item_number){
						
						Case "1" : //Print Only 
						$cog = 2.50;
						$commission = number_format($amount_paid-$cog,2,".", "");				
						break;
						Case "2" : // Print & Digital
						$cog = 5.00;
						$commission = number_format($amount_paid-$cog,2,".", "");					
						break;
						}
						
						//if commissions is zero or less dont do anything.
						if ($commission <=0)
						{
						   	$commission=0;
						}
						else
						{
							$uri= "https://www.hornsillustrated.com/idevaffiliate/sale.php?profile=83&idev_saleamt=" . $commission . "&idev_ordernum=" .$s2member_subscr_id ; 
							$contents = wp_remote_fopen($uri);  
						}
						 	
						/*  I could also log this transaction, by creating a log entry in a static text file on-site. */
						
						file_put_contents(WP_CONTENT_DIR.'/plugins/s2member-logs/affiliate-transactions.log', 'IsString: '.is_string($uri). ' Item: ' .$item_number.  ' Commissions: '.$commission. ' Amount paid: ' .$amount_paid. ' cog: ' .$cog. ' Full Coupon Code: ' .$full_coupon_code. 'return from idev: ' .$contents. 'uri: ' .$uri. "\n", FILE_APPEND);
					}
				exit; // We can exit here. There's no reason to continue loading WordPress® or my theme during an API Notification.
			}
	}
Posted: Tuesday May 21st, 2013 at 1:27 pm #50298

Bruce,

Thanks for the direction. I used it and it worked, however the data sent to iDev is not being used by iDev.

I’m sending: https://www.hornsillustrated.com/idevaffiliate/sale.php?profile=xx&idev_saleamt=2.5&idev_ordernum=16903267

I do have the correct profile # and only replaced it here to xx.

Cordially,

Terry

Posted: Tuesday May 21st, 2013 at 8:03 am #50286

Brian,

Thank you for your reply. You say you don’t this this is possible…

I was trying to implement this based on the conversation on this post: http://www.s2member.com/forums/topic/sending-idevaffiliate-a-specific-amount/

I’m not sure even what question to ask now. I did take out the API/Tracking code for iDev.

I did this so that the API Payment Notification would trigger and then I created a MU Plugin that calculated the new idev_saleamt. The MU Plugin works perfectly except for sending the new value to iDev.

Curious, what do you think this is not possible. I think I know, because sale.php actually reads (it appears) S2Member records from the db.

As a test, in the MU Plugin, I just put in the call to iDev only sale.php?profile=83 and it still pulled the actual sale amount. So without passing it idev_saleamt it still knew what it was. Also like the order/transaction # was in a memory variable or something.

So here is all I want to do. Take the original sale amount subtract cost of goods and make the remaining amount the commissionable amount.

Sale Amount = $100
COG = $75
idev_saleamt=$25

img src=”xyz.com/idevaffiliate/sale.php?profile=83&idev_saleamt=25&idev_ordernum=1234″

Are there ANY options I do have?

Cordially,

Terry

Posted: Sunday May 19th, 2013 at 6:22 am #50194

I’m curious, is there a list of replacement codes that iDevAffiliate accepts?

Posted: Saturday May 18th, 2013 at 9:14 am #50163

Matthew,

You may have already thought of this. I would *highly* suggest simply having iDevAffiliate do the installation of iDev into S2Member.

It cost $45 (I think) and they’ll have it up and running.

Terry

Posted: Thursday May 2nd, 2013 at 7:52 pm #49068

Bruce,

No no…

If I’m sitting on this page: http://hornsillustrated.com/index.php/2013/04/04/a-deeper-look-at-texas-baseballs-minnesota-road-trip/

and I click on the Login link (see bottom of the post) I go to the login page. The previous page should be where it came from which in this case is http://hornsillustrated.com/index.php/2013/04/04/a-deeper-look-at-texas-baseballs-minnesota-road-trip/

So when I login should it take me back to that page?

I’m not following you on this.

Now, the login widget is on the login page…agreed.

So, here’s the 1,000,000 dollar question. Specifically, how could I implement the EXACT login that S2Member has where you click on login and a dropbox appears and you login. This is excellent campared to my 1990 style I have now.

Cordially,
Terry

Posted: Wednesday May 1st, 2013 at 8:58 am #48895

I have a seperate login page where I put the following code:

$ops = array(‘title’ => ”, ‘login_redirect’ => “%%previous%%”, ‘profile_title’=>”, ‘display_gravatar’=>’0′, ‘display_name’=>’1′, ‘my_account_url’=>”, ‘my_profile_url’=>”);

echo s2member_pro_login_widget($ops);

I do get logged in, however…

When I’m on a page the required user access and I send them to a login form and they login, the redirect does not take them back to the original place they started.

Here’s a live example

http://hornsillustrated.com/index.php/2013/04/04/a-deeper-look-at-texas-baseballs-minnesota-road-trip/

At the bottom of the article, there is a link for login. Please use that one.

The login at the top of the page works perfectly.

you can use the credentials adsguest/ads1234

Any help would be awesome…thank you.

Cordially,

Terry

Posted: Tuesday Apr 30th, 2013 at 10:41 pm #48875

Bruce,

I get it…thank you! I really appreciate you for explaining this. Makes sense.

I’ve been reading the MU Plugin stuff.

Thanks again…

Cordially,

Terry

Posted: Tuesday Apr 30th, 2013 at 8:33 pm #48848

Bruce

Thanks again for your reply. So I can get my head around this…

I had IDevAffiliate do the integration (installation) It sounds like I need to undo this (I guess)

When a payment is made the notification gets triggered and sent to my script for processing, however how would I stop the order from going to IDev before I do my calc?

I’m not tracking with what you are saying.

I get the URL thing but I’m not following exactly how the flow goes as it pertains to an affiliate sending traffic and then an order gets made.

If I ddi nothing, IDev would capture the order and apply a commission. I need to divert that order, make a quick calc and send to IDev a different SaleAmt.

I get how to create a notification trigger, but the whole flow is tripping me up. Can you explain

As always, Thanks.

Cordially,

Terry

Posted: Tuesday Apr 30th, 2013 at 3:12 pm #48813

Bruce,

Thanks your response. One last question (hopefully).

When a Payment Notification gets triggered and I have a MU Script that does some calc, how do I pass the data back to iDevaffiliate or S2Member?

Or, is this a one way communications. S2Member has a payment and it performs a call out to IDevAffiliate and whatever URL I have listed in the Payment Notifications.

I would then need to take that script and notify IDevAffiliate seperately outside of S2Member thus removing any integration between S2 and IDev?

Just trying to get my head around this…

Appreciate your insight…Thank You!

Cordially,

Terry

Posted: Monday Apr 29th, 2013 at 12:22 pm #48656

Cristian,

So, the process would be: Order Placed > Data Send To Handler (Calcs the commission) > Send To IDevAffiliate

Your thoughts?

Cordially,

Terry

Posted: Saturday Apr 27th, 2013 at 11:04 am #48575

Cristian,

Thank you for your reply. I appreciate your insight.

How would I go about intercepting the transaction and passing it to my script? Is this something that is triggered based the API Notification Handler?

It seems like the handler works such that an order gets placed and then data is passed to whatever URL’s are in the Handler list. One of the URL’s would be my script (PHP)

Am I thinking correctly?

So, the process would be: Order Placed > Data Send To Handler (Calcs the commission) > Send To IDevAffiliate

Your thoughts?

Cordially,

Terry

Posted: Tuesday Apr 9th, 2013 at 10:19 pm #46986

Bruce,

Thank you for your reply. I’m hoping I’ve asked the right question because it seems to me that you must be concatenating this data somewhere in the S2Member code. We know that the Coupon Code is available on the form submit so the variable is accessible.

I’d think we could simple add something like $_Get[‘couponcode’] to the description line that get’s submitted to the gateway.

Here’s also my thought…we use Authorize.net and when we get the receipt there are 2 “Merchant Defined” variables that are populated.

S2_Invoice:
S2_Custom: http://www.hornsillustrated.com

How could I put a S2_Coupon: [couponcode]

I apologize for driving this back at you but I’m hoping maybe I before I didn’t fully ask the right question. It’s seems to easy (in my mind).

Cordially,
Terry

Posted: Monday Apr 8th, 2013 at 2:56 pm #46860

Is there a way to affect how the Desc field gets calculated or concatenated? I’d like to concatenate it with Coupon: [CouponCode] the amount and the description

Does anyone know how to accomplish this?

Terry

Posted: Monday Apr 8th, 2013 at 9:05 am #46845

Sara,

I hope you get this fixed as it will make a huge difference in your expenses/commissions you have to pay out.

Question: We are about to implement iDevAffiliate. Are you happy with them? Any hidden gotchas we should be aware of? Or, things you wish you would have known before you launched it?

I’ll be watching this thread and also ask your question of iDevAffiliate today as I have a call into them.

Cordially,

Terry

Posted: Monday May 7th, 2012 at 11:56 pm #12870

Perhaps you can help with another topic if that’s OK. Our client also wants to set up EOT notifications at 30 and 15 days prior to expiration. I’ve read on your site where that is in the works for the new release. Any news about that release I could pass along? I’ve also read about the hooks. I’ve passed this info on to my developer, but they said that this may create security risks. What are your thoughts?

Posted: Monday May 7th, 2012 at 11:36 pm #12867

Thanks Cristian. We are using authorize.net, and I have the SSL in progress now. Thank you for your help!!

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

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.