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.

Auto return success page not working

Home Forums Community Forum Auto return success page not working

This topic contains 14 replies, has 3 voices. Last updated by  Cristián Lávaque 3 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 21st, 2013 at 4:43 pm #50306
Paulo Jorge
Username: plourosa

Hello,

I have already read lots of articles in the S2member forum about this issue – success page – but can not seem to make this work.

Right now I have this short code on the site. Everything works ok:
1. After confirming the purchase in paypal the client is automatically directed to my site to the beginning page, to the contact form, where he introduces his name and email.
2. In this page, a box is displayed with the thank you message and the Please click here link.
3. If the client clicks here he is directed to the page with the product.
4. The client also receives and email with the link to the products page

What I would like is to eliminate step number 2 and 3, ie, after confirming the purchase the client should be automatically directed to the products page.

Short code:
[s2Member-Pro-PayPal-Form sp="1" ids="2202" exp="72" desc="Pack Desenvolvimento e Gestão em Vendas" ps="paypal" lc="" cc="EUR" dg="0" ns="1" custom="clubedasvendas.com" ra="20.00" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" success="http://www.clubedasvendas.com/?p=2202"/]

List Of Topic Replies

Viewing 14 replies - 1 through 14 (of 14 total)
Author Replies
Author Replies
Posted: Thursday May 23rd, 2013 at 5:35 am #50432
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

This is normally caused by a problem with the IPN response for your payment gateway. Do you have logging enabled? See: Dashboard -› s2Member® -› Log Files (Debug) -› Logging Configuration

If you do, then please just send us a Dashboard login so we can take a look at them. Otherwise, we’ll need you to enable that and run a test transaction so we can take a look at the response.

Posted: Thursday May 23rd, 2013 at 6:08 am #50437
Paulo Jorge
Username: plourosa

Do you mean the WP login? If so, how can I send it privately?

Posted: Thursday May 23rd, 2013 at 2:51 pm #50446
Bruce
Username: Bruce
Staff Member

Do you mean the WP login? If so, how can I send it privately?

You can send that here: s2Member® » Private Contact Form

Posted: Thursday May 23rd, 2013 at 8:39 pm #50503

Paulo, the page you’re pointing the success attribute to is the one you’re selling, which can only be accessed with the special link s2Member generates for it. So if you send the user there directly, he’ll be forwarded to the Membership Options Page.

You can use the [hilite mono]%%sp_access_url%%[/hilite] replacement code in your success attribute, but that’s encoded, so you’d need to decode it before redirecting the user to it. [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Custom Return URLs Upon Success -> Specific Post/Page -> %%sp_access_url%%[/hilite]

That doesn’t explain why the success redirection would not happen, though, not even to the Membership Options Page. I see in the log entries that a discount is mentioned in one of the entries I saw, so I looked at your coupons configuration and see one that’s incorrectly written. You entered

coupon="[poupa 20 wilques]"

When it should be something like

POUPA20|20%

Please see the documentation for coupons here: [hilite path]Dashboard -› s2Member® -› Pro Coupon Codes -› Coupon Code Configuration File[/hilite]

Not sure if that would cause the success redirection to not work, but you should still fix it if you want to have users use the discount coupon.

To test the success redirection I created a test page to try a 1 cent purchase, and after saving saw a warning about the Membership Options Page not being set:

NOTE: s2Member security restrictions will NOT be enforced until you’ve configured a Membership Options Page. See: s2Member -› General Options -› Membership Options Page.

You need to set this as well as the Login Welcome Page, please. The pages you’re selling are still public because the restrictions are not active yet because of the incomplete configuration.

Anyway, I went ahead and did the 1 cent test purchase using the shortcode you posted above and after completing the payment was taken to http://clubedasvendas.com/pack-raul-candeloro/pack-raul-candeloro-links which is the page with ID 2202 in your success attribute:

[[s2Member-Pro-PayPal-Form sp="1" ids="2202" exp="72" desc="Pack Desenvolvimento e Gestão em Vendas" ps="paypal" lc="" cc="EUR" dg="0" ns="1" custom="clubedasvendas.com" ra="0.01" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" success="http://www.clubedasvendas.com/?p=2202" /]]

I couldn’t reproduce your problem yet. Could you please give us a step by step to reproduce it, please? Thanks!

Posted: Friday May 24th, 2013 at 2:25 am #50536
Paulo Jorge
Username: plourosa

Do I have to have a login page for members if I do not have a membership program? I just sell products and services through the specific post/page options.
I have eliminated the coupon.

Posted: Friday May 24th, 2013 at 8:49 pm #50586

Yeah, you need to assign that page in your settings for the s2Member restrictions to become active.

We call it Membership Options Page, but it’s used even if you don’t sell memberships. That’s the page where the person will be taken if he tries to open one of your protected pages without the access for it. It could be called the Instructions-to-gain-access-to-that-page-you-could-not-view page.

You can put whatever you want in that Membership Options page, so it’s not only to sell a recurring payments subscription. Even if you sell a specific page without even requiring a registration, if a visitor tries to load that page, he needs to be shown how to gain access to it, that’s all.

I hope that clarifies it. :)

Posted: Sunday May 26th, 2013 at 2:09 pm #50661
Paulo Jorge
Username: plourosa

Hello all,

I’m using Paulo’s account because I’m trying to help him resolve this issue but I’m also having some troubles.

Right now the shortcode we’re using is this:

[s2Member-Pro-PayPal-Form sp="1" ids="2202,2180,2176,2172" exp="72" desc="Pack Desenvolvimento e Gestão em Vendas" ps="paypal" lc="" cc="EUR" dg="0" ns="1" custom="clubedasvendas.com" ra="0.01" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" success="%%sp_access_url%%"/]

Can you help me try to figure out why the redirect is not working? It’s the first time I’m using this plugin, that’s why I need to ask this. I’ve read all the previous comments but I wasn’t able to figure out what I need to do to fix this.

Out goal is to redirect the users after the checkout to the content page with this URL – http://clubedasvendas.com/pack-raul-candeloro/pack-raul-candeloro-links

Thanks in advance.
Daniel

Posted: Tuesday May 28th, 2013 at 11:14 pm #50783
Bruce
Username: Bruce
Staff Member

Out goal is to redirect the users after the checkout to the content page with this URL – http://clubedasvendas.com/pack-raul-candeloro/pack-raul-candeloro-links

Do you have logging enabled? If so, check your logs and see if the correct URL is being passed to s2Member. If you just post the entire log entry for your test transaction from paypal-rtn.log here (with sensitive data xxx’d out), I may be able to tell you why s2Member is not redirecting the User.

Posted: Wednesday May 29th, 2013 at 4:46 pm #50873
Paulo Jorge
Username: plourosa

Yes I do have logging enabled. In the Description for paypal-rtn.log, it says “Not used in s2Member® Pro Form integrations however”. I’m using s2member Pro form. The transactions do not appear in this log entry.
The only information that appears in this log entry pertaining the tests I’ve done is:

LOG ENTRY: Tue May 28th, 2013 @ precisely 6:47 pm UTC
PHP v5.3.22 :: WordPress® v3.5.1 :: s2Member® v130513 :: s2Member® Pro v130513
Memory 11.27 MB :: Real Memory 11.50 MB :: Peak Memory 11.46 MB :: Real Peak Memory 11.50 MB
clubedasvendas.com/?s2member_paypal_return=1&s2member_paypal_proxy=paypal&s2member_paypal_proxy_use=x-preview
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0
array (
‘subscr_gateway’ => ‘paypal’,
‘s2member_log’ =>
array (
0 => ‘Test preview of Return Page `proxy_use`: ( `x_preview` ).’,
1 => ‘Redirecting Customer to the Home Page (after displaying preview information).’,
),
‘s2member_paypal_proxy’ => ‘paypal’,
‘s2member_paypal_proxy_use’ => ‘x-preview’,
)

How can I send you the information?

Posted: Thursday May 30th, 2013 at 6:49 am #50932
Bruce
Username: Bruce
Staff Member

Yes I do have logging enabled. In the Description for paypal-rtn.log, it says “Not used in s2Member® Pro Form integrations however”. I’m using s2member Pro form.

Ah yes, sorry for the confusion here.

I just took a look at your Dashboard using the information that you provided previously through Private Contact Form. I’m going to say the issue is related to what Cristian mentioned in his previous reply:

You can use the %%sp_access_url%% replacement code in your success attribute, but that’s encoded, so you’d need to decode it before redirecting the user to it. Dashboard -› s2Member® -› PayPal® Pro Forms -› Custom Return URLs Upon Success -> Specific Post/Page -> %%sp_access_url%%

Would you mind trying a test transaction with a different URL other than this, and see if the redirect itself is wrong?

Posted: Thursday May 30th, 2013 at 7:19 am #50945
Paulo Jorge
Username: plourosa

Sorry, but what do you mean by decoding?
By a different url you mean a different success url?

Posted: Friday May 31st, 2013 at 7:19 am #51026
Bruce
Username: Bruce
Staff Member

Sorry, but what do you mean by decoding?

The URL that s2Member returns from this parameter is URL encoded, so you can’t actually redirect to this URL directly. You’ll have to have a process that decodes this value to redirect to it. However like Cristian mentioned, we can’t tell for sure if this is a problem with the redirection, or this fact.

By a different url you mean a different success url?

Yes, it wold be great if you could change your success URL and run a test transaction to see if the redirect itself is working correctly.

Posted: Friday May 31st, 2013 at 7:41 am #51027
Paulo Jorge
Username: plourosa

Yes, the redirect works with another success url. I then tried again with the same “old” success url and now its working!

[s2Member-Pro-PayPal-Form sp="1" ids="2202,2180,2176,2172" exp="72" desc="Pack Desempenho e Gestão em Vendas" ps="paypal" lc="" cc="EUR" dg="0" ns="1" custom="clubedasvendas.com" ra="20.00" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="PT" captcha="0" success="http://clubedasvendas.com/pack-raul-candeloro/pack-raul-candeloro-links" /]

Thanks for the help.

Posted: Friday May 31st, 2013 at 5:48 pm #51070

Cool. The redirection works, but the page you’re pointing to is the one with ID 2202, which will redirect the user to the Membership Options page, because the URL in the redirection doesn’t have the access credentials, he’ll get the access link in the confirmation email. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Specific Post/Page Confirmation Email[/hilite]

To redirect him to the protected page after payment, you’ll need to generate the access URL behind the scenes and then redirect him there. So your [hilite mono]success[/hilite] attribute’s URL could be

success="http://clubedasvendas.com/?success=%%sp_access_url%%"

and in a hack have something like this (not tested):

Create this dir/file: /wp-content/mu-plugins/s2hacks.php
Knowledge Base » Hacking s2Member® Via Hooks/Filters
[hilite pre_code]
http://adambrown.info/p/wp_hooks/hook/wp_loaded
http://php.net/manual/en/function.urldecode.php
http://codex.wordpress.org/Function_Reference/wp_redirect

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