Close

January 25, 2017

Magento Verify Age System – Batch Process

Due to increased BRAM Mastercard Requirements, a Magento customer recently came to us with a request to build a system that verifies the age of a customer after they have purchased a product falling within a specific category of products.

They had an account at an age verification company Veratad (https://veratad.com/), which provided a very nice age verification API. Since the customer already requires users to self-identify of being of proper age, we set about creating a service that double-checks the data with Veratad.

Since each lookup costs a few cents, we setup the system to “tag” each order as “age compliant process check”, so that way our system would not revisit orders again, thereby wasting calls. The other unique approach is that each order would ONLY be processed once, whereas a front-end based ajax system could be re-verified multiple times if a robot script where to visit the page accidentally. This could lead to incredible billing charges.

The service, was straight forward. Only for US orders, call the Veratad service and verify the user’s shipping address if the order contained products that required age verification. If the order customer failed the background check, the order would be updated with the return information of Veratad and put into a “HOLD” status so that the store owner could manually verify the age of the end customer. The end customer would also receive an email from Magento, letting them know that their order is on hold until they can provide further proof of legal age.

Let us know if you need an similar age verification checks without a host of complicated plugin installs.