Search code examples
.netgoogle-checkout

Google Checkout API callback URL issue


I am able to process orders no problem. However when I look in the integration console I see the following error:

We encountered an error trying to access your server at https://[urlremoved]/registerpayment.aspx -- the error we got is Send failed with code: 401. Response body was: 401 - Unauthorized: Access is denied due to invalid credentials.

Server Error

401 - Unauthorized: Access is denied due to invalid credentials.

You do not have permission to view this directory or page using the credentials that you supplied.

I am using IIS 7 with godaddy hosting account. I have SSL installed on the server. Any ideas?


Solution

  • From one of your recent questions, I assume that you are submitting the API call through HTTPS from your server-side.

    You are receiving this error because your server is not recognizing the authentication credentials of the messages sent back by Google Checkout.

    Google prefaces all callbacks and notifications with HTTP basic authentication, using your Merchant ID as the username and your Merchant Key as the password.

    An HTTP 401 error indicates that you have not fully completed HTTP basic authentication on your server.

    You may find this post useful, which includes example code on how to handle this situation: