Search code examples
laravelauthorize.net

Error getting valid response from API. Check log file for error details


I cant seem to find the error log of authorize.net api.

I have Laravel application which uses "authorizenet/authorizenet" package and the code where I try to create a customer profile, I get following error:

"Error getting valid response from API. Check log file for error details"

Can anyone tell me whereto find these logs? and what it's name?

I tried in /var/logs folder but i cant seem to find it.


Solution

  • if someone else has this issue, here is the solution.

    The authorize.net has changed their endpoints from https://api.authorize.net to https://api2.authorize.net which is one of the possible reasons that you might get this error.

    So if you are hardcoding these endpoints in your code then update it to the new one or if you are using library constant for it, same as me:

    \net\authorize\api\constants\ANetEnvironment::SANDBOX \net\authorize\api\constants\ANetEnvironment::PRODUCTION

    Then simply update your library by running:

    composer update authorizenet/authorizenet
    

    This is how I resolved it and it seems to be the best way so far because it will update their library to take everything up to date if they have changes something else and you started experiencing this issue.

    I hope it helps