Skip to content

Commit

Permalink
Update AddressValidation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rgodiyal authored May 17, 2024
1 parent fd832d7 commit 4be2225
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/AddressValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ public function validate(string $client_id, string $client_secret): array
}

$addresses = $this->getAddresses($res->XAVResponse->Candidate);
return ['status' => 'success', 'addresses' => $addresses];

$return_res = ['status' => 'success', 'addresses' => $addresses];
if (isset($res->XAVResponse->AddressClassification)) {
$return_res['address_classification'] = $res->XAVResponse->AddressClassification;
}

return $return_res;
}

private function getPayLoad(): array
Expand Down

0 comments on commit 4be2225

Please sign in to comment.