minfraud-api-php icon indicating copy to clipboard operation
minfraud-api-php copied to clipboard

Documentation needs more examples

Open ghost opened this issue 6 years ago • 6 comments

Hello

This is not really an issue per say, more of a plea for further documentation examples and some help.

I'm currently trying to understand how I can access all of the data that I am getting back from a response

With,

$mf = new MinFraud($this->id, $this->key);

$request = $mf->withDevice([
    'ip_address' => $data->ip_address,
    'user_agent' => $data->user_agent,
])->withEmail([
    'address' => $data->address,
    'domain'  => $data->address_domain,
])->withBilling([
    'first_name' => $data->first_name,
    'last_name'  => $data->last_name,
]);

$response = $request->insights();

I do not understand why I cannot simply access, say, the latitude of the IP Address with:

$response->ipAddress->location->latitude or $response->ipAddress->location['latitude']

For a simpleton like myself I just need that extra bit of assistance / documentation on how to access and store this information.

Is there a method to get data by key? Is this a free trial account limitation, or.. ?

Cheers!

ghost avatar Aug 11 '17 00:08 ghost