May 1st, 2011, 11:37 AM
Ah, sorry. Allow me to explain, Ben.
It relates to the IPN script I've recently been updating (more of a structural re-write as it turns out). Naturally, there's a sizeable amount of data manipulation and database queries occurring. As such, I've included lots of error handling in the event of failure(s); both in a log file and email alerts.
Concerning email notifications, I could of course include a global variable in the accompanying config file, but I figured why bother when the information is already available in the database; it's one less variable to configure.
I then simply pass the returned variable into the mail() header as-is; it's a notification to all admins so it makes sense.
Back-peddling slightly, the idea stemmed from trying to make the IPN script as idiot-proof as possible to implement, and highly extensible with minimal set-up. So far, I've built in a lot of automation that I find extremely useful:
- dynamically auto-switch between sandbox/live paypal account without taking the form off-line
- subscription payment aware (e.g. create a new submissions when a recurring subscription payment is fired from PayPal)
- automatically create additional fields when setting up a payment form for storing relevant ipn post data.
- lots of other jazz besides
Without much knowledge of php/mysql at the time, I managed to piece together an on-line payment and booking system using FT1.5 based largely off of your tutorial and the work by M. A. Howard. Since then, I've decided to invest some time on the programming side as I've been meaning to update to 2.0x for a long while now.
Anyway, before this turns into my own personal autobiography thread, I'd appreciate any suggestions or input you may have to offer on the completed script. You may find it useful for the site and for other users to learn off of. Perhaps even develop it as an official module.
It relates to the IPN script I've recently been updating (more of a structural re-write as it turns out). Naturally, there's a sizeable amount of data manipulation and database queries occurring. As such, I've included lots of error handling in the event of failure(s); both in a log file and email alerts.
Concerning email notifications, I could of course include a global variable in the accompanying config file, but I figured why bother when the information is already available in the database; it's one less variable to configure.
I then simply pass the returned variable into the mail() header as-is; it's a notification to all admins so it makes sense.
Back-peddling slightly, the idea stemmed from trying to make the IPN script as idiot-proof as possible to implement, and highly extensible with minimal set-up. So far, I've built in a lot of automation that I find extremely useful:
- dynamically auto-switch between sandbox/live paypal account without taking the form off-line
- subscription payment aware (e.g. create a new submissions when a recurring subscription payment is fired from PayPal)
- automatically create additional fields when setting up a payment form for storing relevant ipn post data.
- lots of other jazz besides
Without much knowledge of php/mysql at the time, I managed to piece together an on-line payment and booking system using FT1.5 based largely off of your tutorial and the work by M. A. Howard. Since then, I've decided to invest some time on the programming side as I've been meaning to update to 2.0x for a long while now.
Anyway, before this turns into my own personal autobiography thread, I'd appreciate any suggestions or input you may have to offer on the completed script. You may find it useful for the site and for other users to learn off of. Perhaps even develop it as an official module.