<?php
add_filter ("ws_plugin__s2member_pro_paypal_checkout_post_attr", "my_paypal_pro_checkout_form_attr");
function my_paypal_pro_checkout_form_attr ($attr = array ())
{
if ($_POST["something-custom"] === "some custom value")
{
$now = strtotime ("now");
$fixed_time = strtotime ("31 December " . date ("Y"));
$days_until_fixed_time = round (($fixed_time - $now) / ($seconds_in_one_day = 86400));
/**/
$attr["ra"] = "10.00";
$attr["rp"] = $days_until_fixed_time;
$attr["rt"] = "D";
$attr["rr"] = "BN";
}
/**/
return (array)$attr;
}
?>
Statistics: Posted by Jason Caldwell — May 18th, 2011, 2:55 am
<?php
add_filter ("ws_plugin__s2member_pro_paypal_checkout_post_attr", "my_paypal_pro_checkout_form_attr");
function my_paypal_pro_checkout_form_attr ($attr = array ())
{
if ($_POST["something-custom"] === "some custom value")
{
$attr["ra"] = "10.00"; /* Adjust price dynamically. */
/* And/or, you could adjust other Attributes too. */
/* $attr["rp"], $attr["rt"], etc, etc. */
}
/**/
return (array)$attr;
}
?>
<?php
add_filter ("ws_plugin__s2member_pro_paypal_sp_checkout_post_attr", "my_paypal_pro_sp_checkout_form_attr");
function my_paypal_pro_sp_checkout_form_attr ($attr = array ())
{
if ($_POST["something-custom"] === "some custom value")
{
$attr["ra"] = "10.00"; /* Adjust price dynamically. */
/* And/or, you could adjust other Attributes too. */
/* $attr["ids"], $attr["exp"], etc, etc. */
}
/**/
return (array)$attr;
}
?>
Statistics: Posted by Jason Caldwell — May 18th, 2011, 2:49 am
$eot_time = strtotime('31 December ' . date('Y'));
Statistics: Posted by Cristián Lávaque — May 16th, 2011, 8:54 pm
You'll need a little customization to get the EOTs adjusted to the calendar year. You could get some ideas from this code viewtopic.php?f=4&p=13445#p13445
Statistics: Posted by boealps — May 16th, 2011, 6:44 pm
srt: (Optional) Subscription recurring times. Number of times that subscription payments recur. Specify an integer above 1. Valid only if you specify src="1". https://merchant.paypal.com/us/cgi-bin/ ... 8A6HI00JQU
Statistics: Posted by Cristián Lávaque — May 15th, 2011, 12:46 pm
Statistics: Posted by boealps — May 15th, 2011, 1:34 am
Statistics: Posted by boealps — May 15th, 2011, 12:24 am