The Email Validator library builds upon PHP's built in filter_var($emailAddress, FILTER_VALIDATE_EMAIL);
by adding a default MX record check. It also offers additional validation against disposable email addresses, free email address providers, and a custom banned domain list.
Continue reading
See me featured around the web!
Featured on The Muse. Also see me featured on Billtrust's LinkedIn And Facebook pages.
Going Deeper Into Email Address Validation
We all recognize an email address when we see one. They are comprised of a unique identifier, the @ symbol and a domain name (i.e. example.com). But is it really that simple? Can you tell which of the following email addresses are valid and which ones are not? Continue reading
PHP Simple Encryption
Encryption is a complicated topic and one that, when done incorrectly, could result in sensitive data being exposed to bad actors or lost due to an inability to decrypt that data at a later date. The PHP Simple Encryption library is designed to simplify the process of encrypting and decrypting data while ensuring best practices are followed. By default is uses a secure encryption algorithm and generates a cryptologically strong initialization vector (more on that later) so developers do not need to become experts in encryption to securely store sensitive data. Continue reading
Handling Authorize.Net's Webhooks with PHP
On December 1st, 2016, Authorize.Net announced support for Webhooks. What is a Webhook? A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST. Continue reading
Using Reflection for Better Unit Testing in PHP
Reflection is often used as part of software testing that requires the runtime creation/instantiation of mock objects. It's also great for inspecting the state of an object at any given point in time. Here's an example of using Reflection in a unit test to verify a protected class member contains the expected value. Continue reading
Tutorial: Integrate All Authorize.Net JSON APIs With One Universal PHP Package (AIM, ARB, CIM, Transaction Details)
Three years ago I published code and an article for integrating the Authorize.Net APIs using PHP. This simplified interacting with Authorize.Net’s APIs by using their common XML interface. But many developers asked for a simpler API, one that used JSON instead of XML. In November of 2014 Authorize.Net delivered by announcing their new JSON format APIs. This blog post announces a new library to work with this new format. Continue reading
Working With Dates and Times in PHP
Working with Dates and Times prior to PHP 5.2 meant using date()
, strtotime()
, and other date related functions sometimes in convoluted ways to get to the date(s) you were looking for. Fortunately with PHP 5.2 the DateTime()
class were introduced. (DateTimeZone()
was introduced as well but is not covered here). It was further enhanced in PHP with additionally methods as well as the new DatePeriod()
and DateInterval()
classes.
Continue reading
Handling Authorize.Net Silent Post with PHP
Handling Authorize.Net Silent Post submissions with PHP, or any language for that matter, is easy. It's really no different then receiving a form submission. You just need to know to expect. This code snippet takes a response and determines the status of it (i.e. approved, declined, expired card, or error). Continue reading
All About Authorize.Net's Silent Post
One very common topic at the Authorize.Net developer forums is their Silent Post feature and how it works. In fact, how it works seems to be the most common question by far. For better or worse, Authorize.Net’s documentation seems to be limited concerning silent post so I decided to make this blog post summarizing the information that has been shared in the community concerning this feature. Continue reading