I have a free registration but we sell ‘capabilities’. The code below is what I use in a foreach to loop through the available packages we have.
echo do_shortcode( '[s2Member-PayPal-Button level="*" ccaps="country_' . $package[ 'country_code' ] . '" desc="' . $package[ 'country_name' ] . ' package" ps="paypal" lc="" cc="EUR" dg="0" ns="1" custom="' . $domain . '" ra="' . $package[ 'price' ] . '.00" rp="1" rt="L" rr="BN" image="default" output="button" success="' . home_url() . '/thank-you/" /]' );
Even though success="" is defined, it does not get picked-up after a successful payment.
After every successful payment the return url = http://www.domain.com/?s2member_paypal_return=1&s2member_paypal_return_success=http%3A%2F%2Fwww.domain.com%2Fthank-you%2F.
That leads to this default grey page informing the user he now has capability X and he needs to login again. I can’t seem to get around this page.