-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
We have request like this to check if customer exist or not but when I use this function
$gateway->customer()->find($id);
It must not send PHP error when nothing return else we could not continue.
public function find($id, $associationFilterId = null)
{
$this->_validateId($id);
try {
$queryParams = '';
if ($associationFilterId) {
$queryParams = '?association_filter_id=' . $associationFilterId;
}
$path = $this->_config->merchantPath() . '/customers/' . $id . $queryParams;
$response = $this->_http->get($path);
return Customer::factory($response['customer']);
} catch (Exception\NotFound $e) {
throw new Exception\NotFound(
'customer with id ' . $id . ' not found'
);
}
}
Metadata
Metadata
Assignees
Labels
No labels