bchavez / Coinbase

:moneybag: A .NET/C# implementation of the Coinbase API.
https://developers.coinbase.com/api/v2
MIT License
170 stars 93 forks source link

Errors running sample code. #4

Closed ryn0 closed 9 years ago

ryn0 commented 9 years ago

The sample code:

var api = new CoinbaseApi( apiKey: "my_api_key" );

creates a compilation error due to the deprecation of this overload.

More significantly though, the sample code does not work even using the correct overload. On the line:

var buttonResponse = api.RegisterButton( paymenRequest );

an exception is thrown which says: "Input string '7999.0' is not a valid integer. Path 'button.price.cents', line 1, position 431."

Additionally, the API endpoint in the codebase is using a depreciated URL, see: https://www.coinbase.com/docs/api/overview

bchavez commented 9 years ago

@ryn0 , thanks, for the bug report.

I updated the README docs with the correct overload.

Regarding the invalid integer exception: Are you using the NuGet package release? Or, are you using a compiled version built from source?

Thanks, Brian

bchavez commented 9 years ago

Hi @ryn0 ,

Could you pull the latest packages on Nuget: Coinbase Coinbase.Mvc for MVC projects

All the issues you mentioned should now be fixed. Please let me know if you have any trouble.

If I don't hear back in a few days, I'll assume everything is a-okay and close the issue. I've deployed the latest v0.3.7 on my production machines and everything seems to be functional.

Thanks, Brian

ryn0 commented 9 years ago

Sample code works, thanks!

bchavez commented 9 years ago

:+1: