Aug 21st, 2011, 8:08 PM
I'm not getting an email whatsoever. This is the code I'm currently using:
PHP Code:
<?php
/*
* ipn.php
*
* PHP Toolkit for PayPal v0.51
* http://www.paypal.com/pdn
*
* Copyright (c) 2004 PayPal Inc
*
* Released under Common Public License 1.0
* http://opensource.org/licenses/cpl.php
*/
mail("justin@justingaspar.com", "debugging", "Form ID: {$pp["form_id"]}, sub ID: {$_POST['custom']}");
$base_folder = dirname(__FILE__);
require_once("$base_folder/includes/library.php");
require_once("$base_folder/includes/config.inc.php");
require_once("$base_folder/includes/global_config.inc.php");
// decide which post method to use
switch ($pp["post_method"])
{
// php compiled with libCurl support
case "libCurl":
$result = libCurlPost($pp["url"], $_POST);
break;
// cURL via command line
case "curl":
$result = curlPost($pp["url"], $_POST);
break;
// php fsockopen();
case "fso":
$result = fsockPost($pp["url"], $_POST);
break;
default:
$result = fsockPost($pp["url"], $_POST);
break;
mail("justin@justingaspar.com", "debugging", "Form ID: {$pp["form_id"]}, sub ID: {$_POST['custom']}");
}
// successful payment! finalize the submission in the database
if (eregi("VERIFIED", $result))
{
mail("justin@justingaspar.com", "debugging", "Form ID: {$pp["form_id"]}, sub ID: {$_POST['custom']}");
ft_finalize_submission($pp["form_id"], $_POST['custom']);
}
// oh-oh, something either went wrong, the payment didn't go through or someone's coming to this page
// directly in their browser
else
{
}
?>(Aug 21st, 2011, 3:49 PM)Ben Wrote: Hi just1ncase,
Thanks for the kind words!Glad it's coming in handy.
Yes, the ipn.php file is where the submission should get finalized. This line should get called for all successful payments that get put through:
PHP Code:<?php
ft_finalize_submission($pp["form_id"], $_POST['custom']);

Glad it's coming in handy.