eCommerce Solutions

Returns a customer object.
<!-- getCustomer() -->
<?php
require_once('libraries/happpi/LoadAll.php'); // points to the LoadAll.php file for loading the library.
// once the library is required, you can now use one of the main "interaction" classes.
// These interaction classes contain methods that get information from our REST API and
// converts them to PHP objects for you to use.
$Customer = new CurtCustomer(); // create a new customer object to gain access to its functions.
$Customer->setEmail("CustomerEmailHere"); // set the email as it is a required dependency to get the customer.
// make sure your configuration file in the happpi library files contains the correct CustomerID and Integrated Value.
$Customer = $Customer->getCustomer(); // use getCustomer to return a CurtCustomer object
echo $Customer->getKey(); // access the API key property by using the getter.
?>