The code is fairly extensive, but hopefully I can clarify.
I am building my shortcode dynamically, in php it looks like this:
<?php
$shortcode = '[s2Member-Pro-PayPal-Form level="1" ccaps="'.$ccaps.'" desc="'.$descPretty.'" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="localhost" ta="0" tp="0" tt="D" ra="'.$totalPrice.'" rp="1" rt="L" rr="BN" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" template="checkout.php" /]';
?>
As you can see I have some variables in my shortcode: $ccaps, $descPretty and $totalPrice . These variables are set the first time the checkout page is loaded based on a from on a previous page. If there are any errors in the s2member pro form processing the page is reloaded and the form is re-displayed but my variables are not set because the $_POST data from the previous page is no longer set. This causes errors, for example the desc=”” attr is empty because my variables are empty.
So to try and clarify, if there are errors when the pro form is processed and the checkout page is re-loaded, my variables are left empty.
How can I re-set my variables? Can I do it from the “s2member_pro_paypal_checkout” array somehow when the form is processed?
Does that help clarify?
Thanks,
David