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.

How to s2Members,PayPal and iDevAffiliate

Home Forums Community Forum How to s2Members,PayPal and iDevAffiliate

This topic contains 24 replies, has 4 voices. Last updated by  Bruce 3 years, 11 months ago.

Topic Author Topic
Posted: Sunday Dec 30th, 2012 at 12:26 am #35770
925trader
Username: 925trader

I’m having a huge headache trying to set up s2Members and iDevAffiliate. Please help.

My site is very straight forward:
1) one membership level with 3 payment plans: monthly, quarterly and yearly
2) running s2Member Pro
3) subscription is processed by PayPal only.
4) no specific post/page sale

I’m setting up iDevAffiliate on the site and what I want to happen are:
1) Being able to record sales for signup (no trial period) and recurring payments
2) Being able to process commissions automatically

What I’m hoping for is step by step instructions how to set this up. I’ve gone through the videos and probably missed something.

http://www.youtube.com/watch?v=5jahj1XH8PA&list=PL46DAC29678C0F803

This is what I currently have.

API Notification >> Payment Notification

http://stockmd.net/affiliates/sale.php?profile=72198&idev_saleamt=%%amount%%&idev_ordernum=%%txn_id%%&ip_address=%%cv1%%

PayPal Button

[s2Member-PayPal-Button level="1" ccaps="" desc="Monthly Subscriber / $2 a month" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="http://www.stockmd.net|<?php $_SERVER["REMOTE_ADDR"] ?>" ta="0" tp="0" tt="D" ra="2" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" success="http://stockmd.net/thank-you/" /]

Which one? %%cv1%% or %%user_ip%% to track customer ip?

  • This topic was modified 4 years ago by  925trader.
  • This topic was modified 4 years ago by  925trader.
  • This topic was modified 4 years ago by  925trader.

List Of Topic Replies

Viewing 24 replies - 1 through 24 (of 24 total)
Author Replies
Author Replies
Posted: Sunday Dec 30th, 2012 at 12:22 pm #35810
Eduan
Username: Eduan
Moderator

Hello there,

You would use %%user_ip%%, which would return the user’s IP during the payment.

– Eduan

Posted: Sunday Dec 30th, 2012 at 5:40 pm #35824
925trader
Username: 925trader

Right now it’s not even recording the sale. I did couple of test purchases and only the clicks were recorded.

Posted: Sunday Dec 30th, 2012 at 7:21 pm #35829
Eduan
Username: Eduan
Moderator

Could you try out these troubleshooting tips?:
Knowledge Base » Common Troubleshooting Tips

Also, could you please paste the PayPal logs here inside <code></code> tags, you can find them under /wp-content/plugins/s2member-logs.

– Eduan

Posted: Monday Dec 31st, 2012 at 2:49 am #35840
925trader
Username: 925trader

there’s only a .htaccess file and nothing else there.

Posted: Monday Dec 31st, 2012 at 2:15 pm #35862
Eduan
Username: Eduan
Moderator

I see, then could you please enable logging? You can do that under Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging.

Then try another test transaction and see what it gives you.

Also, please try these common troubleshooting tips and tell me how it goes: Knowledge Base » Common Troubleshooting Tips

– Eduan

Posted: Monday Dec 31st, 2012 at 7:54 pm #35870
925trader
Username: 925trader

This is the error I received:

array (
  0 => 'IPN received on: Tue Jan 1, 2013 12:42:42 am UTC',
  1 => 's2Member POST vars verified through a POST back to PayPal®.',
  2 => 'Unable to verify `$_SERVER["HTTP_HOST"]`. Please check the `custom` value in your Button Code. It MUST start with your domain name.',

I took out the “http://www&#8221;, so the button code is:

[s2Member-PayPal-Button level="1" ccaps="" desc="Monthly Subscriber / $2 a month" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="stockmd.net|<?php $_SERVER["REMOTE_ADDR"] ?>" ta="0" tp="0" tt="D" ra="2" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" success="http://stockmd.net/thank-you/" /]

Submitted another purchase. Still nothing recorded, and this is the message I got:

's2member_log' => 
array (
  0 => 'IPN received on: Tue Jan 1, 2013 12:46:43 am UTC',
  1 => 's2Member POST vars verified through a POST back to PayPal®.',
  2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
  3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).',
  4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/ update vars.',
  5 => 'Unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access.',
),
'subscr_gateway' => 'paypal',
'eotper' => NULL,
'ccaps' => NULL,
'level' => '1',
'ip' => '67.160.135.108',
'period1' => '0 D',
'mc_amount1' => '0.00',
'initial_term' => '0 D',
'initial' => '2.00',
'regular' => '2.00',
'regular_term' => '1 M',
)
  • This reply was modified 4 years ago by  925trader.
Posted: Tuesday Jan 1st, 2013 at 1:21 pm #35900
Eduan
Username: Eduan
Moderator

OK, so I have two things for you to try:

First, make sure that you have a plugin like PHP Execution installed or something similar.

Next, when testing this do it from an account that isn’t an admin account, otherwise s2Member will just stop the payment for security measures.

– Eduan

Posted: Wednesday Jan 2nd, 2013 at 5:13 am #35955
925trader
Username: 925trader

Tried 4 different payments and they were recorded but the amount remained as “None”. Currently it is set as “%%mount%%”. I have also tried “%%initial%%” and %%regular%% and none of them worked.

Current API Notification is:

http://stockmd.net/affiliates/sale.php?profile=72198&idev_saleamt=%%amount%%&idev_ordernum=%%txn_id%%&ip_address=%%user_ip%%
  • This reply was modified 4 years ago by  925trader.
Posted: Wednesday Jan 2nd, 2013 at 5:24 am #35958
925trader
Username: 925trader

and here’s the log:

's2member_log' => 
  array (
    0 => 'Return-Data received on: Wed Jan 2, 2013 10:07:23 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ).',
    4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.',
    5 => 'Registration Cookies set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.',
    6 => 'Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.',
    7 => 'Redirecting Customer to a custom URL on success: http://stockmd.net/thank-you/',
  ),
  'subscr_gateway' => 'paypal',
  'eotper' => NULL,
  'ccaps' => NULL,
  'level' => '1',
  'ip' => '67.160.135.108',
  'period1' => '0 D',
  'mc_amount1' => '0.00',
  'period3' => '1 M',
  'mc_amount3' => '2',
  'recurring' => '2',
  'initial_term' => '0 D',
  'initial' => '2',
  'regular' => '2',
  'regular_term' => '1 M',
  's2member_paypal_return_success' => 'http://stockmd.net/thank-you/',
  's2member_paypal_return_tra' => 'fnIyOmVLSm1QVGhPeWtWV3B1WHJIZnF5OG1RY04wWkZOTnpJOjk4MzY4NTQ5YWRjOWM5ODBmNDU2ZWVlNWIzN2M4ZjRhfAxb19huv8cB4lx3eKyeYFWKEJDm1brk9rGLUoFz6y5Q3Ti9yVsxtUB1t4gDoXddDgv_Sb099p_18DdTCIakRr2pLRyjsgRd2nCGDCmzQMz4QenKDe6xojGVDSN-UOZFbebEEtH379s-te022GbkCLSLsI1aimFy5YT7ILBKiptOPq8u3morU8R-AEEZc51fEVqb8gAj_Fwi6NfCG9gbJzVyBwG4yBBBRYfB2WMykJbG5EKh3PNtul8em5ymQO3oBNAPsDFvTlCH9Y85P2bCV61BuDNnTQU3sY2XARjchWQtkIN8QTegfRLuxlO8vZJDTLmq03EDKZP_0nEIh1KSQPLj25hFLyCkflQZW8_7TEcpoUU4DvXnP-P4pSvr_8ka9Q',
)
Posted: Thursday Jan 3rd, 2013 at 4:50 am #36087

Could you try the shortcode without the PHP block you had added for the IP address? It’s missing an echo, so that may be causing trouble, but you don’t need it anyway because now there’s the [hilite mono]%%user_ip%%[/hilite] replacement code available.

[hilite pre_code]
[[s2Member-PayPal-Button level="1" ccaps="" desc="Monthly Subscriber / $2 a month" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="stockmd.net" ta="0" tp="0" tt="D" ra="2" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" success="http://stockmd.net/thank-you/" /]]
[/hilite]

About the notification, could you enter your email address to get an email with all the variables? That way we can see if the notification fires and what the values of the replacement codes are. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications -> Email[/hilite]

Posted: Thursday Jan 3rd, 2013 at 5:55 am #36092
925trader
Username: 925trader

I tried two purchases with and without the PHP block. Both times didn’t get recorded at all.

Here’s the log for the one with the PHP block with the echo added:

's2member_log' => 
array (
  0 => 'IPN received on: Thu Jan 3, 2013 10:45:42 am UTC',
  1 => 's2Member POST vars verified through a POST back to PayPal®.',
  2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
  3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).',
  4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/o update vars.',
  5 => 'Signup Confirmation Email sent to: "Marcus Dinh" <marcusdinh@gmail.com>.',
  6 => 'Signup Notification Emails have been processed.',
  7 => 'Storing IPN signup vars into a Transient Queue. These will be processed on registration.',
),
'subscr_gateway' => 'paypal',
'eotper' => NULL,
'ccaps' => NULL,
'level' => '1',
'ip' => '50.76.109.177',
'period1' => '0 D',
'mc_amount1' => '0.00',
'initial_term' => '0 D',
'initial' => '2.00',
'regular' => '2.00',
'regular_term' => '1 M',
)
's2member_log' => 
array (
  0 => 'IPN received on: Thu Jan 3, 2013 10:45:45 am UTC',
  1 => 's2Member POST vars verified through a POST back to PayPal®.',
  2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
  3 => 's2Member `txn_type` identified as ( `subscr_payment|recurring_payment` ).',
  4 => 'Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
  5 => 'Awake. It\'s Thu Jan 3, 2013 10:45:50 am UTC. s2Member `txn_type` identified as ( `subscr_payment|recurring_payment` ).',
  6 => 'Skipping this IPN response, for now. The Subscr. ID is not associated with a registered Member.',
  7 => 'Re-generating. This IPN will go into a Transient Queue; and be re-processed during registration.',
),
'subscr_gateway' => 'paypal',
'ccaps' => NULL,
'level' => '1',
'ip' => '50.76.109.177',
)

Here’s the log for the button without the PHP block like you asked.

's2member_log' => 
 array (
   0 => 'IPN received on: Thu Jan 3, 2013 10:47:14 am UTC',
   1 => 's2Member POST vars verified through a POST back to PayPal®.',
   2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
   3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).',
   4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/o update vars.',
   5 => 'Signup Confirmation Email sent to: "Marcus Dinh" <marcusdinh@gmail.com>.',
   6 => 'Signup Notification Emails have been processed.',
   7 => 'Storing IPN signup vars into a Transient Queue. These will be processed on registration.',
 ),
 'subscr_gateway' => 'paypal',
 'eotper' => NULL,
 'ccaps' => NULL,
 'level' => '1',
 'ip' => '50.76.109.177',
 'period1' => '0 D',
 'mc_amount1' => '0.00',
 'initial_term' => '0 D',
 'initial' => '2.00',
 'regular' => '2.00',
 'regular_term' => '1 M',
)
's2member_log' => 
 array (
   0 => 'IPN received on: Thu Jan 3, 2013 10:47:14 am UTC',
   1 => 's2Member POST vars verified through a POST back to PayPal®.',
   2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
   3 => 's2Member `txn_type` identified as ( `subscr_payment|recurring_payment` ).',
   4 => 'Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
   5 => 'Awake. It\'s Thu Jan 3, 2013 10:47:19 am UTC. s2Member `txn_type` identified as ( `subscr_payment|recurring_payment` ).',
   6 => 'Skipping this IPN response, for now. The Subscr. ID is not associated with a registered Member.',
   7 => 'Re-generating. This IPN will go into a Transient Queue; and be re-processed during registration.',
 ),
 'subscr_gateway' => 'paypal',
 'ccaps' => NULL,
 'level' => '1',
 'ip' => '50.76.109.177',
)

Also, I never got the confirmation emails for either purchases.

Posted: Saturday Jan 5th, 2013 at 4:01 am #36230
925trader
Username: 925trader

I switched to use image code instead and it seems to record without a problem unlike API notification:

However, I don’t think they are registered as “recurring commission”. Can someone point me to the right direction please?

<img border="0" src="http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=%%initial%%&idev_ordernum=%%subscr_id%%" width="1" height="1">

Thank you.

Posted: Saturday Jan 5th, 2013 at 4:14 pm #36328
Bruce
Username: Bruce
Staff Member

However, I don’t think they are registered as “recurring commission”. Can someone point me to the right direction please?

Jason posted something in the old forums that explains how this works:

http://www.primothemes.com/forums/viewtopic.php?f=4&t=6275&p=14129#p14111

Posted: Saturday Jan 5th, 2013 at 7:21 pm #36353
925trader
Username: 925trader

if API Notification worked in the first place, I wouldn’t be here.

API TRACKING / recorded but not recurring

<img src="http://stockmd.net/opp/sale.php?profile=72198&amp;idev_saleamt=%%initial%%&amp;idev_ordernum=%%subscr_id%%" width="1" height="1" />

API NOTIFICATION / I set up both Sign-Up Notification and Payment Notification. NOT WORKING AT ALL
Payment notification

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=%%amount%%&idev_ordernum=%%txn_id%%"

Sign-up Notification

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=%%initial%%&idev_ordernum=%%subscr_id%%"

I sell one subscription product. I also want to pay affiliates recurring commissions. What is one set up that will work?

  • This reply was modified 4 years ago by  925trader.
  • This reply was modified 4 years ago by  925trader.
Posted: Saturday Jan 5th, 2013 at 7:27 pm #36355
925trader
Username: 925trader

API NOTIFICATION FOR PAYMENT & RECURRING COMISSIONS:

Do I need to set up both Sign-Up Notification and Payment Notification or just Payment Notification is sufficient?

I don’t sell posts, so I don’t need to set that up.

Posted: Monday Jan 7th, 2013 at 5:58 am #36443

The signup one would only happen for a paid registration, while the payment one happens then and every recurring payment afterwards. If you only want to pay a commission on the first payment, the signup one would be best, while the payment notification will work if you want to pay a commission on the recurring payments too.

Posted: Monday Jan 7th, 2013 at 8:04 pm #36507
925trader
Username: 925trader

This is my current set up:
PayPal IPN is turned on and set to:

http://stockmd.net/?s2member_paypal_notify=1

API Signup Notification / I also set this up to capture sign up because Payment noticication does not register initial sign up.

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=%%initial%%&idev_ordernum=%%subscr_id%%&ip_address=%%user_ip%%

API Payment Notification:

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=%%amount%%&idev_ordernum=%%txn_id%%"

I load this in the following URL bar and it works fine without the “%%user_ip%%”; meaning loading the code alone registers a pending commission in iDevAffiliate, so it’s not iDevAffiliate problem.

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=33&idev_ordernum=103

It seems to me the communication between PayPal and s2Member is the problem here and I can’t figure out why.

  • This reply was modified 4 years ago by  925trader.
Posted: Wednesday Jan 9th, 2013 at 5:07 am #36706

The payment notification would work for paid registrations (signups) too. The payment notification happens every time there’s a payment. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications[/hilite]

So, unlike the `Signup` Notification, `Payment` Notifications take place whenever actual payments are received, instead of just once after signup is completed. If a payment is required during signup ( i.e. no Free Trial is being offered ), a Signup Notification will be triggered, and a Payment Notification will ALSO be triggered. In other words, a Payment Notification occurs anytime funds are received, no matter what.

It’s weird that the notification isn’t working… In the log entries you quoted before, the signup notification was logged as processed:

6 => ‘Signup Notification Emails have been processed.’,

Did you add your email address to it? Did you get the notification email? [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications -> Email[/hilite]

Did you happen to install the post-registration auto-login hack? That one’s known to cause the notifications to not happen.

Posted: Wednesday Jan 9th, 2013 at 5:11 am #36707
925trader
Username: 925trader

there are two things that aren’t happening:
1) I don’t get the email for recurring payment
2) The silent communication between s2Member and iDevAffiliate isn’t work either

When I load this URL into the URL bar, I get the commission notification from iDevAffiliate, so their software is working fine.

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=33&idev_ordernum=103
Posted: Wednesday Jan 9th, 2013 at 7:53 am #36738

So the purchase doesn’t have a problem, everything works great during the transaction, it’s only the notification that’s failing?

Did you follow the suggestions in this article? Knowledge Base » Common Troubleshooting Tips

And are you using the post-registration auto-login hack?

Posted: Wednesday Jan 9th, 2013 at 8:02 am #36740
925trader
Username: 925trader

The commissions come in for SignUp Notification which isn’t that much different from Payment Notification. Does that ring a bell?

Posted: Friday Jan 11th, 2013 at 7:47 am #36964

So the signup notification works, but the payment notification doesn’t? That’s odd, the payment one would fire every time the gateway tells s2Member about a payment.

Do the recurring payments show up in your PayPal IPN log? [hilite mono]/wp-content/plugins/s2member-logs/[/hilite]

Did you enter your email address in your payment notification to get an email? Did this work? [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications -> Email[/hilite]

Did you do the troubleshooting tests? Knowledge Base » Common Troubleshooting Tips

Posted: Friday Jan 11th, 2013 at 9:31 pm #37064
925trader
Username: 925trader

Email field was filled out.

http://stockmd.net/opp/sale.php?profile=72198&idev_saleamt=33&idev_ordernum=103

When I load this URL, I get an email from iDevAffiliate installation and not s2Member installation. I have two questions:

1. I have not tried troubleshooting tests. Do you have a list of plugins potentially conflicting with s2Members?

2. For the recurring commission to work, does a sign-up have to register as a user when he/she is taken back to the Payment Confirmation page?

Thank you.

Posted: Monday Jan 14th, 2013 at 4:21 pm #37528
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up

You mentioned above that Payment Notifications should fire much more often than Signup Notifications. It’s likely that there’s an invalid IPN setup. Could you please post the logs as Cristián mentioned above? Make sure logging is enabled under Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging, and run a test transaction. Then post the info from /wp-content/plugins/s2member-logs/paypal-ipn.log here. Make sure to xx out any sensitive data.

1. I have not tried troubleshooting tests. Do you have a list of plugins potentially conflicting with s2Members?

We do not have a list of incompatible plugins currently. The best way to troubleshoot this is just to disable all plugins and see if that fixes the issue. If it does, then you’ll need to reactivate plugins one by one until you find the culprit.

2. For the recurring commission to work, does a sign-up have to register as a user when he/she is taken back to the Payment Confirmation page?

The commission starting should not be affected by this. The notifications to iDevAffiliate happen at the end of s2Member’s IPN processes, so they should be fired any time s2Member receives data from PayPal / any other gateway that you’re integrated with.


To find the issue we will need your log files. If you’re having an issue with this please send us your details in our Private Contact Form so that we may take a look.

If you do use the Private Contact Form, please send us an update here letting us know that you have sent these details.

Viewing 24 replies - 1 through 24 (of 24 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.