Community Support Forums — WordPress® ( Users Helping Users ) — 2011-09-06T13:56:48-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14815 2011-09-06T13:56:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=34112#p34112 <![CDATA[Re: Redirect Short Codes]]>
Keep rockin!

Statistics: Posted by hcibrent — September 6th, 2011, 1:56 pm


]]>
2011-09-06T13:51:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=34110#p34110 <![CDATA[Re: Redirect Short Codes]]> 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:
<?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.

Statistics: Posted by Jason Caldwell — September 6th, 2011, 1:51 pm


]]>
2011-09-03T12:39:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33882#p33882 <![CDATA[Re: Redirect Short Codes]]> Statistics: Posted by Cristián Lávaque — September 3rd, 2011, 12:39 pm


]]>
2011-09-02T23:53:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33851#p33851 <![CDATA[Re: Redirect Short Codes]]>
Thanks

Statistics: Posted by hcibrent — September 2nd, 2011, 11:53 pm


]]>
2011-09-02T23:20:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33844#p33844 <![CDATA[Re: Redirect Short Codes]]> Statistics: Posted by Cristián Lávaque — September 2nd, 2011, 11:20 pm


]]>
2011-09-02T19:55:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33802#p33802 <![CDATA[Re: Redirect Short Codes]]>
Just curious. Thanks.

Statistics: Posted by hcibrent — September 2nd, 2011, 7:55 pm


]]>
2011-09-02T19:36:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33799#p33799 <![CDATA[Re: Redirect Short Codes]]>

Statistics: Posted by Cristián Lávaque — September 2nd, 2011, 7:36 pm


]]>
2011-09-02T02:16:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33732#p33732 <![CDATA[Re: Redirect Short Codes]]>
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®.

Statistics: Posted by hcibrent — September 2nd, 2011, 2:16 am


]]>
2011-09-01T23:24:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33722#p33722 <![CDATA[Re: Redirect Short Codes]]> Statistics: Posted by Cristián Lávaque — September 1st, 2011, 11:24 pm


]]>
2011-09-01T19:19:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14815&p=33690#p33690 <![CDATA[Redirect Short Codes]]>
I appreciate the info.

Statistics: Posted by hcibrent — September 1st, 2011, 7:19 pm


]]>