All-righty then.
Solved my issue and thought i would share in case anyone else is in the same boat. Please note that this is specific processing for PayPal Pro Payflow accounts.
This allows you to offer the remainder of the current subscription as a free trial when users are updating. I’m using it with a “modify=1” form, which will recharge a user immediately when they submit. This way the renewal will come at the end of their subscription.
Solved this by pulling the nextpayment date from the s2member_pro_payflow_rbp_for_user() array.
<?php
$arr=(s2member_pro_payflow_rbp_for_user()); //grab the paypal pro payflow array for the current user
$theDate = $arr['NEXTPAYMENT']; //grab the 'mmddyyy' fromt he array
$newDate = preg_replace("/(\d{2})(\d{2})(\d{4})/", "$1/$2/$3","$theDate"); //regex and insert to create mm/dd/yyyy date
$now = strtotime("now");
$fixed_time = strtotime("$newDate");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
$days_until_fixed_time = max(0,$days_until_fixed_time); //if less than 0, set at 0
//echo $fixed_time." - " . $now . " = " . $days_until_fixed_time; // unmark to outout for testing
?>
<h2 id="bodytitle">We've lowered our pricing, and renamed your plan!</h2>
<div><p>To take advantage of our new lower pricing, you'll need to complete the information below before your account expires. We value your continued support!</p>
<?php if ($days_until_fixed_time < 0){ ?><p>Update today for this special offer!</p><?php } else { ?><p>You have <strong><?php echo $days_until_fixed_time; ?></strong> days to take advantage of this offer!</p><?php } ?></div>
set your trial period value in your short code with:
tp="<?php echo $days_until_fixed_time; ?>"