PHP Toolkit for PayPal v0.51 ipn

Hi I am using a script available online called PHP Toolkit for PayPal v0.51

I have used it on a test site i am making, but I need to get something working that I have realsed I need.

It has a ipn folder that has a ipn_success.php file which says:

{see attached code}

What I need it to do is change the database table for that order to say "Yes" if the payment has gone through.

I assume its done there, as the comment says:
//log successful transaction to file or database

I need to know how to get this working, and how is the order sent back to the site, with a order id? or something else?

I really would like to get this working.

Thanks for any help you can provide.
I wish I could give you 1000 points to get this working as soon as possible

//include file - not accessible directly
//log successful transaction to file or database

	die('This page is not directly accessible');

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cataleptic_stateAuthor Commented:
The order response file example they give is attached

How can I get this to print out on a page or add update to database?


     if (!strcmp(getenv("REQUEST_METHOD"),"POST")){

        $path=""; #set your logfile directory path here



        fwrite($FILE,"OrderID - $oid\n");

        fwrite($FILE,"Transaction Status - $transactionstatus\n");

        fwrite($FILE,"Total - $total\n");

        fwrite($FILE,"ClientID - $clientid\n");

        fwrite($FILE,"Transaction Time Stamp - $datetime\n");

        fwrite($FILE,"ECI Status - $ecistatus\n");

        fwrite($FILE,"Card Prefix - $cardprefix \n");



Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
I'd suggest that you should hire a PayPal developer to help with this.  It is not a single issue or a simple issue, and there are penalties for making mistakes with money - some of these involve handcuffs.  Better safe than sorry.

I can help with one critical part of the process.  When you are trying to debug any asynchronous script like the PayPal IPN, you have no browser output and that makes it difficult to visualize your data.  What I like to do is capture the output buffer and mail it to myself.  See the code example for how this is done.

best regards, ~Ray

<?php // RAY_ob_start_example.php

echo "Hello World";

$x = $y;

$buffer = ob_get_clean();
mail('', 'OUTPUT BUFFER', $buffer);

Open in new window

Ray PaseurCommented:
So what was the solution?
cataleptic_stateAuthor Commented:
I had to hire someone to make it work, its still not working 100%
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.