close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Regarding PayPal IPN listener page

Thread began 2/07/2023 7:16 am by Jared Lui | Last modified 2/10/2023 3:15 pm by Jared Lui | 492 views | 14 replies

Jared Lui

Regarding PayPal IPN listener page

Hi Ray,

I looked at the IPN details on the PayPal website and ended up with more questions than answers so instead found these two examples via Google search.

Obviously these are custom and will need to be edited for my DB needs and connection, etc. I get the main idea connecting to PayPal and confirming the connection with the back and forth in both versions. I know that one of these is very stripped down and the other includes some debugging and the ability to send a custom email response. I think I can figure out how to edit either one as needed.

My question is, do you see one as being better than the other code wise? I do have 'listener.php' uploaded and working now and I can send a payment live with no issues. So that I take it is a good thing.

However, I still have not added the ability to INSERT or UPDATE my DB.

If you read the comments in the 'listener.php' on LINES 66-72 he creates a record with the payment details with a "pending" status and then once the payment is verified, updates the record to "Paid"

Could you write an example code snippet using the attached table called 'dues' where the duesID could be the PayPal 'custom' parameter session id and maybe one or two of the other like duesAmtPaid and duesPaidDate?

I am sure I could figured it out after I had an example of the structure/format needed to post/update the the DB and where it goes in that page. I assume it will go in the space occupied by the comments between the {}.

And can you confirm this using the example below:
(the variables would be my table column names and they correspond to the PayPal variables - correct? and this is what I use to INSERT/UPDATE my DB?)

$lotNumber = $_POST['item_number'];
$duesStatus = $_POST['payment_status'];
$duesAmtPaid = $_POST['mc_gross'];
$duesID = $_POST['custom'];

I know I could probably figure it out on my own if I had the time and headspace to work on it but once again I have zero time. I will of course pay you for your time and appreciate as always your help and expertise!

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...