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.

Existing user with Paypal IPN w. Proxy

Home Forums Community Forum Existing user with Paypal IPN w. Proxy

This topic contains 4 replies, has 3 voices. Last updated by  Abbe 4 years, 1 month ago.

Topic Author Topic
Posted: Wednesday Nov 7th, 2012 at 5:36 pm #30937
Abbe
Username: raptor

I have stumbled on another challenge when creating subscriptions with IPN w Proxy methodology. This is creating a subscription for a user that already exists in my wordpress blog. It might be a user that had a previous subscription and then got demoted and now has the ‘subscriber’ role (Level #0 user).

When I create a new subscription with txn_type=’subscr_signup’, s2Member sends the user that paid a mail telling him that payment was successful and link so that he can register. This is good and works for new Yet unregistered users.

But if I have a user that already is registered in my wordpress blog with the subscriber (Level #0 user) role it doesn’t work. Sending a transaction with txn_type=’subscr_signup’ doesn’t recognise that the user already exists, and will still send an e-mail with link to register. Unfortunately, this time the user cannot register as the user already exists.

I therefore tried to create a subscription with txn_type=’subscr_payment’ instead. I still failed though. See log below.

So my questions are.
1: What is the strategy to create an subscription for an already existing user so that s2Member recognises him and automatically associates the transaction with him?

2: If txn_type=’subscr_payment’ is the right way, what important field have I missed to get s2Member to recognise that the transaction belongs to an existing user?

Please se log below:

array (
‘first_name’ => ‘Test’,
‘last_name’ => ‘Testuser’,
‘payer_email’ => ‘test@testing.com’,
‘item_number’ => ’1′,
‘item_name’ => ‘s2Member Level 1′,
‘mc_currency’ => ‘USD’,
‘mc_amount3′ => ’29.95′,
‘mc_fee’ => ’0.34′,
‘mc_gross’ => ’9.34′,
‘txn_type’ => ‘subscr_payment’,
‘subscr_id’ => ’0702362132′,
‘period3′ => ’1 D’,
‘recurring’ => ”,
‘custom’ => ‘www.myweb.com’,
‘proxy_verified’ => ‘sms’,
‘s2member_log’ =>
array (
0 => ‘IPN received on: Sat Nov 3, 2012 9:14:35 pm UTC’,
1 => ‘s2Member POST vars verified with a Proxy Key’,
2 => ‘s2Member originating domain ( `$_SERVER[“HTTP_HOST”]` ) validated.’,
3 => ‘Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.’,
),
‘subscr_gateway’ => ‘sms’,
‘s2member_paypal_proxy’ => ‘sms’,
‘s2member_paypal_proxy_verification’ => ‘d8fa2a4e12218c04d3205119612c7ff8′,
)

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Thursday Nov 8th, 2012 at 5:24 pm #31061
Raam Dev
Username: Raam
Staff Member

Hi Abbe,

I’ll send the lead developer (Jason) a message to see if he can offer some guidance on this. Thank you for your patience.

Posted: Monday Nov 12th, 2012 at 12:55 pm #31323
Abbe
Username: raptor

Any updates on this one?

Posted: Tuesday Nov 13th, 2012 at 3:06 pm #31475
Staff Member

Thanks for the heads up on this thread.

Please send an IPN with txn_type=subscr_signup, just as you would for a new customer. To tell s2Member that this is an existing user of the site, please add the following two variables to your POST data in the IPN that you send to s2Member.

option_name1=upgrade
option_selection1=123

Where 123 is the existing user’s ID in WordPress.
http://codex.wordpress.org/Function_Reference/get_current_user_id

Posted: Sunday Nov 18th, 2012 at 4:22 pm #31945
Abbe
Username: raptor

Thank you, I got it to work :)

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