Jump to content
Larry Ullman's Book Forums

Chapter 6 - Using Paypal


Recommended Posts

Hi Larry,

 

First of all great book! Have learned a lot about eCommerce.

 

I have a problem getting the IPN to work correctly. Everything on the Knowledge Is Power site works as it should, but after I modify the Register and Thanks scripts and add the ipn.php script, the database does not get updated.

 

I can register and the user details get added to the database. After the PayPal process, the payment is going through, but the database is not getting updated to expire a year later.

 

Is there something I have missed or done wrong? I have been checking the instructions in the book, but can't see what is causing this issue.

 

Thanks.

Link to comment
Share on other sites

Thanks for the nice words. Much appreciated. I expect you have missed something or done something wrong, but couldn't say what it is with the information provided. For starters, how about telling us the versions of PHP and MySQL in use? And providing a URL that you're using.

Link to comment
Share on other sites

Hi Larry.

 

Thanks for the reply. I have now found what the problem was. In the ipn.php script, for some unknown reason, I had an open bracket before $_POST when it shouldn't have been there...

 

$uid = (isset($_POST['custom'])) ? (int) ($_POST['custom'] : 0;

 

 

Should have been...

 

$uid = (isset($_POST['custom'])) ? (int) $_POST['custom'] : 0;

 

 

For something so small, can cause big problems. And being just one character can make it difficult to spot.

 

 

I have now got a problem with uploading pdf's, but I shall post this as a separate topic.

Link to comment
Share on other sites

 Share

×
×
  • Create New...