Recently I had started a contract for a company who was doing a rebuild of one of their products. They had decided long before I had joined the team to use the CSS/Javascript development tools from
Paypal IPN Listener class.
I’ve only used Paypal IPN a couple times. Both time were in systems where the IPN was already set up. It didn’t take much work for me to actually do anything from there. I am working on a new WordPress module. Part of which includes functionality where I needed to do some paypal processing. While searching through the internet I found a lot of sample code, but nothing that was a simple object. After some headaches caused by a typo, I have a php5 class for Paypal IPN validation. define(‘PAYPAL_IPN_LISTENER_VERIFIED_STATUS’,'VERIFIED’); define(‘PAYPAL_IPN_LISTENER_INVALID_STATUS’,'INVALID’); class PaypalIPNListener { protected $status = PAYPAL_IPN_LISTENER_INVALID_STATUS; protected $payment_status = false; private $sandboxUrl = “https://www.sandbox.paypal.com/cgi-bin/webscr”; private $productionUrl = “https://www.paypal.com/cgi-bin/webscr”; private $serviceUrl = null; private $serviceData = “”; public function __construct($postData = array(), $sandbox=false) { // Set the initial serviceUrl $serviceUrl = $productionUrl; // If sandbox change the serviceUrl if($sandbox == true) $serviceUrl = $sandboxUrl; // Save the post data…
Downloadable File Protection
We are going to talk today about protecting files, and allowing access to them through some kind of authentication scheme. Let’s say you have a website that has a membership area. This membership area allows for a user to log in and view content such as pdfs and spreadsheets and word documents. The issue that any website may fall into is that these documents by default aren’t protected. Anyone who has the URL of the file can access it. Therefore you really should find some way of protecting it. The first thing you should do is keep the web server from showing a directory listing. This is just proper security from the get go. It can be dangerous to let this information be available. With apache this is done either in the httpd.conf or in the .htaccess file. Options Indexes FollowSymLinks The above code tells apache to show Indexes. Removing…
Media Region Control destroy’s culture sharing.
Anyone who knows me knows that I have traveled far beyond the boarders of the US. I have had the ability to experience a culture that most Americans only see through hollywood’s eyes. In most cases incorrectly. The best way to accurately experience culture of a foreign land without visiting it, is through their eyes. Whether it be books, music, or video it can more accurately depicts what that culture values.
PHP Class – Calendar Matrix
The other night I found myself needing a PHP class file that would give me calendar data. Specifically I needed something that I could build a calendar display with. The problem was I didn’t want it to write the HTML, I just wanted it to give me a multidimesional array of weeks and days. That way I could have whatever content I wanted in it. Not finding anything that didn’t write out HTML I created the CalendarMatrix class.