We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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' ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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'
);
}
}
The text was updated successfully, but these errors were encountered: