Thursday, 07 October 2010 17:40

Recurring Payments and PayPal using RSForm Pro

Written by 

This is a follow-up to a previous post which demonstrates how to connect RSForm Pro to PayPal using a custom amount field.  This takes it one step further, and connects the custom amount field to a recurring payment plan (e.g. monthly subscription).


if (isset($_POST['form']['Amount']))
{
$business = This email address is being protected from spambots. You need JavaScript enabled to view it. ';
$item_name = 'Recurring Payment from '.$_POST['form']['FullName'];
$amount = $_POST['form']['Amount'];
header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business='.$business.'&item_name=Recurring%20Payment&a3='.$amount.'&p3=1&t3=M&currency_code=USD');
exit();
}


In the header () line above, make note of the "p3" and "t3" settings in the URL:
p3=periods (e.g. 1)
t3=time (e.g. month)

Read 4828 times Last modified on Thursday, 07 October 2010 17:45

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.