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.

PayPal re-direct not working properly…

Home Forums Community Forum PayPal re-direct not working properly…

This topic contains 8 replies, has 2 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Saturday Jan 12th, 2013 at 8:56 pm #37196

I recently purchased S2Member Pro for the ability to re-direct new clients after PayPal purchase. Unfortunately, I can not seem to get this to work with the success=”” shortcode.

Here is the way the button looks:

[s2Member-PayPal-Button level="1" ccaps="" desc="1 Hour per Week - $54 per month + $20 registration fee" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="merrilldance.com" ta="0.02" tp="1" tt="M" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1"  image="default" output="button" success="http://merrilldance.com/calendar/" /]

Here is a copy of my return log:

PHP v5.2.17 :: WordPress® v3.5 :: s2Member® v121213 :: s2Member® Pro v121213
Memory 49.08 MB :: Real Memory 49.25 MB :: Peak Memory 49.23 MB :: Real Peak Memory 49.50 MB
merrilldance.com/?s2member_paypal_return=1&s2member_paypal_return_tra=fnIyOjJ6dlVhNnBMeGJzMzlqUVVhR1BXQ0Nic1FtUkhiQ0YwOmIwNWJlYTFhMGZlZmQwZmU5MzJjY2VjNzc0ODhjNTJhfHp873-Q3lYgxYyNGajeghlcPYjz3XRkeHeKUtiHootsLWycVnCcxXWzZ8XKtU31RlNRIGP_IecKtH3g-L1H0npVTdiBB3k4gm2k3-qEBPbw2XvXafE2g-ya9w_bymD8TWeZL24wK7bkHE8klGJH7V02UmolOlurEiAldMPLlRalJIpGri3ZICIbk9QPSY3lFZfyIt-tl43HCMOUujs0LK1vI6K-X5X59SfIF42QKZFGtCKh08R9c2jZtQWIetQ5Fq5AEUj7ScCTiF4aWJsvweQ_H45hOeu_VDjttRHuOj3W1RiiBmTiuWZucR-dk4BulILtJuP13VMQ6yVUg41yjYvOH0AViqB8UBN_dPhSrtcCMVbalT7UpxjMxpRQJHisEg&s2member_paypal_return_success=http%3A%2F%2Fmerrilldance.com%2Fcalendar%2F&tx=7T153959YH214135U&st=Completed&amt=0.02&cc=USD&cm=merrilldance%2ecom&item_number=&sig=cSoWbEO8R263KaeEfqeiLJkdkVYziFl22zGizu3RRVoCCRkoJmVFz4hk7Zqs9MWDd98U46ywZr2AkjUFgg5gJl38T88%2fklv7T%2bPPO3bJlA7oYGOgc8rp0TN5MMX7kCQI40t72clJFx%2fVwYUiCtWM0c5Uwfn3LaMsV4EOpDULEp8%3d
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17
array (
  'mc_gross' => '0.02',
  'invoice' => '50f20ae99f4e3~75.32.245.202',
  'protection_eligibility' => 'Ineligible',
  'recur_times' => '4147021973',
  'payer_id' => 'WK6M79DLK3D4E',
  'payment_date' => '17:16:52 Jan 12, 2013 PST',
  'payment_status' => 'Completed',
  'charset' => 'windows-1252',
  'first_name' => 'Aaron',
  'option_selection1' => '15',
  'option_selection2' => '75.32.245.202',
  'mc_fee' => '0.02',
  'subscr_id' => 'S-3UX83121ML651004U',
  'custom' => 'merrilldance.com',
  'payer_status' => 'verified',
  'business' => 'support@merrillfitness.com',
  'payer_email' => 'aaron@merrilland.com',
  'option_name1' => 'Referencing Customer ID',
  'option_name2' => 'Customer IP Address',
  'txn_id' => '7T153959YH214135U',
  'payment_type' => 'instant',
  'last_name' => 'Merrill',
  'receiver_email' => 'support@merrillfitness.com',
  'payment_fee' => '0.02',
  'receiver_id' => 'F7N4YN3GEVZRW',
  'txn_type' => 'subscr_payment',
  'item_name' => '1 Hour per Week - $54 per month + $20 registration fee',
  'mc_currency' => 'USD',
  'item_number' => '1',
  'residence_country' => 'US',
  'transaction_subject' => 'merrilldance.com',
  'payment_gross' => '0.02',
  's2member_log' => 
  array (
    0 => 'Return-Data received on: Sun Jan 13, 2013 1:17:00 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/ update vars.',
    5 => 's2Member Level/Capabilities updated w/ advanced update routines.',
    6 => 'Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/ update vars.',
    7 => 'Redirecting Customer to the Login Page. They need to log back in.',
  ),
  'subscr_gateway' => 'paypal',
  'eotper' => NULL,
  'ccaps' => NULL,
  'level' => '1',
  'ip' => '75.32.245.202',
  'period1' => '1 M',
  'mc_amount1' => '0.02',
  'period3' => '1 M',
  'mc_amount3' => '0.01',
  'recurring' => '0.01',
  'initial_term' => '1 M',
  'initial' => '0.02',
  'regular' => '0.01',
  'regular_term' => '1 M',
  's2member_paypal_return_success' => 'http://merrilldance.com/calendar/',
  's2member_paypal_return_tra' => 'fnIyOjJ6dlVhNnBMeGJzMzlqUVVhR1BXQ0Nic1FtUkhiQ0YwOmIwNWJlYTFhMGZlZmQwZmU5MzJjY2VjNzc0ODhjNTJhfHp873-Q3lYgxYyNGajeghlcPYjz3XRkeHeKUtiHootsLWycVnCcxXWzZ8XKtU31RlNRIGP_IecKtH3g-L1H0npVTdiBB3k4gm2k3-qEBPbw2XvXafE2g-ya9w_bymD8TWeZL24wK7bkHE8klGJH7V02UmolOlurEiAldMPLlRalJIpGri3ZICIbk9QPSY3lFZfyIt-tl43HCMOUujs0LK1vI6K-X5X59SfIF42QKZFGtCKh08R9c2jZtQWIetQ5Fq5AEUj7ScCTiF4aWJsvweQ_H45hOeu_VDjttRHuOj3W1RiiBmTiuWZucR-dk4BulILtJuP13VMQ6yVUg41yjYvOH0AViqB8UBN_dPhSrtcCMVbalT7UpxjMxpRQJHisEg',
)

Please advise.

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Sunday Jan 13th, 2013 at 12:00 pm #37264
Staff Member

Thanks for reporting this important issue.

In the log entry you posted, an existing User/Member is making a purchase. So this is NOT a new customer, it’s an upgrade for an existing User on your site. The success="" attribute only deals with NEW paying customers, it is not designed to support upgrades, which should really lead the customer back to their account.

Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained)
success="" Success Return URL ( optional ). s2Member handles this automatically for you. However, if you would prefer to take control over the landing page after checkout ( i.e. your own custom Thank-You Page ), you can. If supplied, this must be a full URL, starting with http://. Note, s2Member will NOT use this value if an existing account holder is being modified. s2Member handles account updates ( i.e. billing modification ) in a more dynamic way. Your Success Return URL is only applied to (new) Customers.

That being said, s2Member does expose a filter for this scenario that you’ve encountered. If you’d like to customize the URL that a customer is redirected to upon modifying their existing account, please follow the instructions below.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

Please let us know if problems persist :-)

Posted: Sunday Jan 13th, 2013 at 1:23 pm #37278

Sorry – I should have noted that I am seeing this behavior on new and existing (upgrading) accounts. I should have noted that I also had created a mu-plugin that had been suggested in the forums.

A file named s2-hacks.php current resides in /wp-content/mu-plugins , its content is as follows:

<?php
add_filter('ws_plugin__s2member_redirection_url_after_modification', 'my_modification_redirection_url');
function my_modification_redirection_url(){
	return 'http://www.merrilldance.com/calendar/';
}

Not sure what I am doing wrong – but I always end up paypal_return page.

Posted: Sunday Jan 13th, 2013 at 1:34 pm #37281

You know what – I figured it out. The button I was testing on didn’t have the success=”” shortcode.

Everything is working now – thanks for your help.

Posted: Sunday Jan 13th, 2013 at 1:35 pm #37282
Staff Member

Thanks for the follow-up :-)

OK. Well with that s2-hacks.php file, the log entry is wrong. It should say: “Redirecting Customer to a custom URL after modification: http://www.merrilldance.com/calendar/“, but it’s does NOT say that.

Something is off somewhere. Please submit a Dashboard login and I’ll run diagnostics for you. Please use this private contact form: s2Member® » Private Contact Form

Posted: Saturday Feb 2nd, 2013 at 9:03 am #40413
Staff Member

Details received. Thank you!

Reviewing.

Posted: Saturday Feb 2nd, 2013 at 9:11 am #40414
Staff Member

So sorry. I’m confused now.
It looks like you updated this thread at some point.
Did you resolve this already? Thanks!

Posted: Wednesday Feb 6th, 2013 at 2:24 am #40897

I was following up your comment:

Something is off somewhere. Please submit a Dashboard login and I’ll run diagnostics for you. Please use this private contact form: s2Member® » Private Contact Form

Posted: Saturday Feb 9th, 2013 at 12:34 am #41245
Staff Member
OK. I see now. Thanks for clarifying.
I’m taking a look at your log files now. One moment please.
Viewing 8 replies - 1 through 8 (of 8 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.