if your going to write your own script, use. Paypal's IPN, response systems. Here's an example code of it: (Every account, above Standard, can access this system, some standards can).
PHP Code:
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
if ($_POST[txn_type] == subscr_cancel) { RUNYOURCODEHEREIFTHEYUNSUBSCRIVE }
// you have the following variables, in subscriptions (dealing with payment)
if ($_POST[txn_type] == subscr_signup)
if ($_POST[txn_type] == subscr_eot)
if ($_POST[txn_type] == subscr_failed)
if ($_POST[txn_type] == subscr_cancel)
if ($_POST[txn_type] == subscr_payment)
o, yeah. and to make this work with paypal, depending on your settings,
add the following to a subscription buttons code:
<input type="hidden" name="notify_url" value="http://www.yoursite.com/ipn.php" />
It's very detailed, the paypal documentation on this. So,
it's on you to get it done, if your not looking to hire
someone or buy a script.
Bookmarks