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™

idevaffiliate integration

s2Member Plugin. A Membership plugin for WordPress®.

idevaffiliate integration

Postby jevans161 » December 30th, 2011, 10:49 pm

Hello:

I have idevaffiliate setup on a separate domain from s2member. I am using the instant payment notification method to track affiliate sales.

So under s2Member API / Notifications -> Payment Notification URLs, I have this:

http://www.outrageousmastery.com/affili ... v_saleamt=%%amount%%&idev_ordernum=%%txn_id%%&ip_address=%%cv1%%

and I have my order form short code configured with the custom attribute:

custom="www.yourhomeformastery.com|<?php echo $_SERVER['REMOTE_ADDR']; ?>"

I have php execution installed, and I have verified with previous sales that the ip address is being tracked correctly under %%cv1%%.

However, affiliate sales are not showing up in idevaffiliate. I tested my configuration of idevaffiliate, by taking the appropriate variables from a customer that should have shown up as affiliate sale, and created the following url:

http://www.outrageousmastery.com/affili ... .179.162.4

I copied and pasted this into a browser to test, and the commission showed exactly the way I expected in idevaffiliate. So something must be happened with s2Member not firing the payment notification url.

What do you think it could be?
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby Cristián Lávaque » December 31st, 2011, 7:24 am

Could you please enable logging and try a test transaction, then look for the related entries in the logs and paste them here x'ing out any private info? WP Admin -> s2Member -> PayPal Options -> Account Details -> Enable Logging

Have you watched this video? http://www.s2member.com/idevaffiliate-i ... ion-video/

Thanks!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: idevaffiliate integration

Postby jevans161 » December 31st, 2011, 1:16 pm

Here you go.

Thanks.
Attachments
authnet-ipn.log
(1.92 KiB) Downloaded 15 times
authnet-api.log
(4.66 KiB) Downloaded 15 times
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby jevans161 » January 2nd, 2012, 12:26 pm

Yes, I have watched the video you posted. There is a new replacement code available (%%user_ip%%), and I changed the ipn url to include that replacement code, instead of using php execution to capture it as a custom variable. It has tracked a couple of affiliate sales, but I know the system is not functioning correctly, as there should be several more affiliate sales showing up. The test sale that I posted should have shown up as an affiliate sale, but it didn't.

Please help as soon as possible on this, I really need to get it done, it's for a client.

Thanks,

Jeffry
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby Cristián Lávaque » January 3rd, 2012, 6:29 am

Hmm... Could you add an email to your notification to check if notification is being fired and has all the vars in it? WP Admin -> s2Member -> API / Notifications -> Payment Notification -> Send An Email
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: idevaffiliate integration

Postby jevans161 » January 3rd, 2012, 1:55 pm

Sometimes it works, sometimes it doesn't.

Very strange, very frustrating. I have been trying to get the affiliate system integrated for weeks now.
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby jevans161 » January 3rd, 2012, 1:56 pm

I have to have this up and running by tomorrow for this client. Please help as soon as possible.
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby jevans161 » January 3rd, 2012, 1:58 pm

If you can tell how me how to access the amount of the sale via php, I can integrate this my own way. I've checked through a lot of documentation, and cannot find a price or amount variable that can be displayed on a page/thank you page. Just the email token, which is not what I need.
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby Raam Dev » January 3rd, 2012, 5:54 pm

What is WP Admin -> s2Member -> PayPal Options -> PayPal Account Details -> PayPal® Pro Forms / Recurring Profile Behavior set to? If it's not set to Real-Time / Direct Pay, then that might explain why the Payment Notification URL wasn't fired when you expected it to be.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: idevaffiliate integration

Postby jevans161 » January 3rd, 2012, 6:03 pm

I'm using authorize.net pro forms
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby jevans161 » January 3rd, 2012, 8:41 pm

I figured it out, it was an auto-login function messing up the initial tracking.

Thanks,

Jeffry
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby Cristián Lávaque » January 4th, 2012, 3:25 pm

Thanks for the update, Jeffry! Glad you found the problem. :)

What auto-login function was it?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: idevaffiliate integration

Postby jevans161 » January 5th, 2012, 5:50 pm

User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby Cristián Lávaque » January 7th, 2012, 4:21 am

Ah, got it. I thought that'd be the one you meant, but I wanted to make sure.

Did you try the version that I posted later in that thread to fix a problem? viewtopic.php?f=4&t=14211&p=29918#p31548
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: idevaffiliate integration

Postby jevans161 » January 7th, 2012, 12:58 pm

No, I passed the user's email address to the thank you page, and added a function to functions.php to grab the email address, find the user, and log them in automatically.

Code: Select all
function checkout_login() {
    if (!is_user_logged_in() && isset($_REQUEST['user_email'])) {        
        
//get the user's email from the checkout page
        $user_email = $_REQUEST['user_email'];
        //automatically log them in, and redirect them
        global $wpdb;
        $get_user_login = $wpdb->get_row('SELECT u.user_login FROM wp_users u WHERE u.user_email = "'.$user_email.'"');        
        $user_login 
= $get_user_login->user_login;
        $user = get_userdatabylogin($user_login);
        $user_id = $user->ID;
        wp_set_auth_cookie($user_id);
        wp_redirect('http://www.example.com/thank-you/');
        exit;
    }
}
add_action('init', 'checkout_login'); 
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011

Re: idevaffiliate integration

Postby Cristián Lávaque » January 12th, 2012, 4:56 am

Ah, I see. I thought you said you had used the code in the post you linked to, but the one you quoted now is something else. Why don't you try the one I linked to?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: idevaffiliate integration

Postby jevans161 » January 12th, 2012, 12:41 pm

I did try it. It caused the problem that prompted me to post here.
User avatar
jevans161
Registered User
Registered User
 
Posts: 16
Joined: October 29, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 8 guests

cron