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™

Redirect Short Codes

s2Member Plugin. A Membership plugin for WordPress®.

Redirect Short Codes

Postby hcibrent » September 1st, 2011, 7:19 pm

Hello, I am trying to find out on the redirect short codes I read in the documentation, do they go inside the Pro Form short code section as stated, or is there a special way to implement?

I appreciate the info.
User avatar
hcibrent
Registered User
Registered User
 
Posts: 9
Joined: August 26, 2011

Re: Redirect Short Codes

Postby Cristián Lávaque » September 1st, 2011, 11:24 pm

What redirect shortcodes? Could you past a quote from the documentation or point me to it, please? 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: Redirect Short Codes

Postby hcibrent » September 2nd, 2011, 2:16 am

Hey Cris,

This was actually found in your page. I am just trying to redirect the customer to a thank you page then auto redirect to an account login page. But this is where I seen the redirect info.

Is there a way to force a custom redirect after a successful purchase?

Yes. You can add the following attribute to the Shortcode for your Form. Like this: success="http://www.example.com/thank-you.php". s2Member will automatically redirect Customers to the URL you specify. s2Member can also add query string parameters, supplying all sorts of information about the transaction. Please see s2Member -> PayPal® Pro Forms -> Custom Return URLs on Success. This also works with Pro Forms for Authorize.Net®.
User avatar
hcibrent
Registered User
Registered User
 
Posts: 9
Joined: August 26, 2011

Re: Redirect Short Codes

Postby Cristián Lávaque » September 2nd, 2011, 7:36 pm

Ah, you mean the success shortcode attribute? Yes, that'd take the person to the URL you specify after checkout. This is an s2Member Pro feature. Works with the pro-forms or the PayPal buttons. :)
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: Redirect Short Codes

Postby hcibrent » September 2nd, 2011, 7:55 pm

Yes, can we do the same thing for declines?

Just curious. Thanks.
User avatar
hcibrent
Registered User
Registered User
 
Posts: 9
Joined: August 26, 2011

Re: Redirect Short Codes

Postby Cristián Lávaque » September 2nd, 2011, 11:20 pm

Hmm... You mean if the card is declined, show him a certain page when PayPal returns him to your site?
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: Redirect Short Codes

Postby hcibrent » September 2nd, 2011, 11:53 pm

Yes, I use Authorize.net and use S2 Member Pro.

Thanks
User avatar
hcibrent
Registered User
Registered User
 
Posts: 9
Joined: August 26, 2011

Re: Redirect Short Codes

Postby Cristián Lávaque » September 3rd, 2011, 12:39 pm

Got it. I don't know if it can be done. I emailed Jason about 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: Redirect Short Codes

Postby Jason Caldwell » September 6th, 2011, 1:51 pm

Thanks for the excellent question.
hcibrent wrote:Yes, can we do the same thing for declines?

Just curious. Thanks.
Sorry, no. While it IS possible to handle redirection in a custom way on success, it is NOT possible to do this when an error occurs, s2Member handles this with error messages sent back to the Customer, at the top of your Pro Form integration.

That being said, you CAN Filter the error messages if you like.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter 
("ws_plugin__s2member_paypal_api_response", "my_s2_errors");
function my_s2_errors ($response = array ())
    {
        if (!empty ($response["__error"]) && !empty ($response["L_ERRORCODE0"]))
            {
                if ((int)$response["L_ERRORCODE0"] === 10422)
                    $response["__error"] = "Transaction declined. Please use an alternate funding source.";
            }
        /**/
        return $response;
    }
?>
* For a full list of error codes, please check the /paypal-pro-api.pdf file, which is included with the s2m-pro-extras.zip file, available for download inside your account at s2Member.com.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Redirect Short Codes

Postby hcibrent » September 6th, 2011, 1:56 pm

Thanks Jason. I appreciate the info.

Keep rockin!
User avatar
hcibrent
Registered User
Registered User
 
Posts: 9
Joined: August 26, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 0 guests

cron