Code Monkey home page Code Monkey logo

plaid.net's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plaid.net's Issues

Error in Vistal Studio 2019

Hi @Ackara !

Thank you for writing this library.
I use visual studio 2019, i can't run this project.
build project cannot run, and says the type of project is not compatible.
which version of visual studio or net framework i should use ?

`FetchAccountBalanceAsync` does not accept settings

Hi there,

When I try to call the FetchAccountBalanceAsync function with an account id, I got this error:

Acklann.Plaid.Exceptions.PlaidException: the following fields are not recognized by this endpoint: Options.

There is my call:

var response = await this._client.FetchAccountBalanceAsync(new GetBalanceRequest
            {
                Secret = this._environmentConfig.Secret,
                ClientId = this._config.ClientId,
                AccessToken = accessToken,
                // TODO: Options should be used here
                Options = new GetBalanceRequest.Settings
                {
                    AccountIds = new string[] {accountId}
                }
            });

It looks like the options dont go through. But if I comment the settings object its working find.

Documentation

What is wrong with this:

var request  = await client.FetchAccountInfoAsync(new Acklann.Plaid.Auth.GetAccountInfoRequest()
            {
                AccessToken = "<acess_token>"
                ClientId = "<client_id>",
                Secret = "<secret>",
                Options = new Acklann.Plaid.Auth.GetAccountInfoOptions
                {
                    AccountIds = BankAccountIdArray
                }
            });

The error is:

image

Release 0.0.12

Release 0.0.12 so that the ability to create a link token is available to use.

Reuse HttpClient instance

The library instantiates a new HttpClient instance for every API call:

using (var http = new HttpClient())

This runs contrary to Microsoft's guidance, and I can personally attest to the fact that ignoring this guidance does lead to problems in production (not with this library specifically, but with others I used heavily). At the very least, the HttpClient instance should be cached for the lifetime of the PlaidClient instance, if not made static.

No assets endpoints anymore?

PlaidClient.cs seems to be missing all asset report related endpoints such as /asset_report/refresh and /asset_report/create

PublicToken via LinkToken

I successfully generated link token via CreateLinkTokenRequest.
Now, I am trying to get a public token via CreatePublicTokenRequest, so that i can get an access token via ExchangeTokenRequest.
But, I am getting error "ErrorMessage = "This endpoint has been discontinued as of version '2020-09-14' of the API." in CreatePublicTokenRequest.
And in the parameters of CreatePublicTokenRequest, it is taking expecting AccessToken instead of LinkToken

var response = await client.CreatePublicTokenAsync(new Acklann.Plaid.Management.CreatePublicTokenRequest
{
ClientId = clientId,
Secret = clientSecret,
AccessToken = linkToken
});

Could anyone please help on this?

How can I use this library.

Hi Ackara!

I am trying to connect to Plaid using this library. I am confused about how to use it. I Have the following code:

           var request = new AccessTokenRequest
            {
                ClientId = "client_id", 
                Secret = "secret",
                Language = "en",
                User = new User {ClientUserId = "unique_user_id"},
                Products = new[]{"auth"},
                CountryCodes = new []{"US"}
            };
            
            var client = new PlaidClient(request.ClientId, request.Secret,null, environment: Environment.Development);
           
           //create link token request
           var createLinkTokenRequest = new CreateLinkTokenRequest
           {
               Language = request.Language,
               ClientId = request.ClientId,
               Secret = request.Secret,
               ClientName = request.ClientId,
               CountryCodes = request.CountryCodes,
               Products = request.Products,
               User = new CreateLinkTokenRequest.UserInfo {ClientUserId = request.User.ClientUserId}
           };

           var linkToken = await client.CreateLinkToken(createLinkTokenRequest);

             return Json(linkToken);
           

The above code returns the link token. How can I get the public token that I need to use to exchange so I can get the access_token?

Plaid linktoken and expiration are null

Hi, I tried running this locally, and it works perfectly fine, but on the AWS Environment live server, there's no exception thrown and it returns linktoken and exception null.

Here's the code snippet:

public async Task<CreateLinkTokenResult> GetPlaidLinkToken() { var linkToken = await _client.CreateLinkToken(new CreateLinkTokenRequest() { ClientId = _clientId, Secret = _secret, User = new CreateLinkTokenRequest.UserInfo { ClientUserId = _userContext.CurrentUser.UserId, }, CountryCodes = new[] { "US" }, ClientName = "TestClient", Products = new[] { "transactions" } }); return new CreateLinkTokenResult { Expiration = linkToken.Expiration, LinkToken = linkToken.LinkToken }; }

And we always get this null result:
{ "data": { "linkToken": null, "expiration": null }, "exception": null, "errorMessage": "", "statusCode": 200 }

The result should not be nullable. Hope you guys have an idea on this.

FetchAllInstitutionsAsync should return total number of institution to be able to loop

The FetchAllInstitutionsAsync method should return the total number of institution to allow us to fetch them all correctly.

Also the SearchAllRequest.AdditionalOptions has a typo for "IncludeMetadata" { InclueMetadata=true },
https://plaid.com/docs/api/institutions/

{
  "institutions": [
    {
      "country_codes": [
        "US"
      ],
      "institution_id": "ins_1",
      "name": "Bank of America",
      "oauth": false,
      "products": [
        "assets",
        "auth",
        "balance",
        "transactions",
        "identity",
        "liabilities"
      ],
      "routing_numbers": [
        "011000138",
        "011200365",
        "011400495",
        "011500010",
        "011900254",
        "021000322",
        "021200339",
        "026009593",
        "031202084",
        "051000017",
        "052001633",
        "053000196",
        "053904483",
        "054001204",
        "061000052",
        "063100277",
        "064000020",
        "071214579",
        "072000805",
        "073000176",
        "081000032",
        "081904808",
        "082000073",
        "101100045",
        "103000017",
        "107000327",
        "111000025",
        "121000358",
        "122101706",
        "122400724",
        "123103716",
        "125000024",
        "323070380"
      ]
    }
  ],
  "request_id": "tbFyCEqkU774ZGG",
  "total": 11384
}

Release 0.10.0

I know you said you'd do this - I just want to track it somewhere. Is there anything I can do to help get this release out? Thanks!

How to run Plaid Link in custom .NET applications?

I need to authenticate users' accounts using plaid API in .NET web application. I was struggling to integrate this project in my .NET 4.7 web application but I could not do so. Then I just included the Plaid.Link project in my solution and ran in the new instance in visual studio, it ran in the browser and created a local link. i.e. https://localhost:44359/. I then used it's link in my project and hit that link to create a flow to generate access link eventually. The project stores access link and access link in plaid_access_token.tmp in temp folder step by step. I understand Access token can be used after the completion of the flow to call other API end points. below screenshots are attached for all the steps.

Step 1:
plaid 1

Step 2:
plaid 2

Step 3:
plaid 3

Step 4:
plaid 4

Step 5:
plaid 5

Step 6:
plaid 6

I have 2 questions/ problems right now.
1- What I am doing is right or there is another better way of doings things? if yes, what steps should I follow.
2- When I run the project using above steps, it shows blue screens at the start and end of the flow. And in second step there is "Example uses Plaid to link your bank". How to avoid blue screen and change text at picture number two attached?

Missing account_subtypes field when creating Link token with account filters

When using CreateLinkToken with the AccountFilters option of the CreateLinkTokenRequest class, it doesn't appear to properly relay the request to Plaid. It would appear the request is missing the account_subtypes field under the account type object.

For example, to filter to only depository account types with account subtypes of checking, it currently sends a request like:

{
    ...,
    "account_filters": {
        "depository": ["checking"]
    },
    ...
}

The correct structure for the Plaid API would be:

{
    ...,
    "account_filters": {
        "depository": {
            "account_subtypes": ["checking"]
        }
    },
    ...
}

Can a new class (AccountFilterSubTypes) be created with a single property (AccountSubtypes of type List<string>) be added? Then make the AccountFilters property of the CreateLinkTokenRequest class be of type Dictionary<string, AccountFilterSubTypes>.

Plaid Docs

Tests requires secrets.json but no mention in README

Testing this repo (via tests/Plais.MSTest) requires a secrets.json file but there's no mention in the README of that file, it's format or what to put in it.

Could one be added to the repo (with fake values that need substitution) and the README updated to indicate it's format/use?

Plaid swag?

@Ackara

Apologies for filing an issue again but I don't have your contact info :-). I just wanted to say thanks for your work maintaining this library, and as thank-you we'd like to send you a small Plaid care package. If you're interested, can you let me know your shipping address, t-shirt size, and if there are any items you'd particularly like? If you don't want to publish your address on GitHub you can DM me at @plaiddev or email me at [email protected].

Thanks,
Alex

P.S. If you haven't already seen it, you might be interested in our newly-published OpenAPI file, which is designed to make Plaid SDK generation easier -- we'd love to hear any feedback you might have!

PlaidException should be type of System.Exception

PlaidException should inherit from System.Exception so that something like throw getTransactionsResponse.Exception; is a valid use. If not, I would argue that the name "Exception" here is changed to something different (like "Error")

Implement `/accounts/get` endpoint

The request and response for this endpoint are implemented as GetAccountRequest/GetAccountResponse, but the API endpoint is not available on the client.

Plaid.NET library not listed on Plaid community libraries

Hi @Ackara !

Thank you for writing this library! I work at Plaid and was wondering if you would be interested in having this library included on our community libraries page? I think a lot of Plaid users would benefit from it. If you're interested, let me know and we'll add a link!

Waiting for Activation

When I attempt to exchange tokens I just receive "Waiting for activation" - Do you know why this is occurring?

I've tried to await the request but I am never able to get back into debugging a response with the access-token.

Any information would be appreciated!

FetchInstitutionByIdAsync fails with clientId not a valid formatted client id

Heres a snippet of my code using the client.FetchInstitutionByIdAsync() method I am in c# , using api end point version "2019-05-29" I am using nuget package version "v0.0.13-rc"

snippet
"
var searchByIdRequest = new SearchByIdRequest
{
InstitutionId = institutionId,
PublicKey = _plaidPublicKey,
};
var client = new PlaidClient(_plaidClientId, _plaidSecret, null, _plaidEnvironment, "2019-05-29");
var task = Task.Run(async () => await client.FetchInstitutionByIdAsync(searchByIdRequest));"

when I make this call I get an error message back saying that the clientId is missing, however it is supplied when I instantiate the plaidClient. when I have encountered this before in other methods I then added ClientId to the Request object, however this SearchByIdRequest object doesnt contain an item for me to Put the ClientId in the request...

I would appreciate a fix, a work around or a fix if you can please

Regards Julian

work with Unity?

Apologizes if this is the wrong way to get this answered, but I didn't see this in the readme (or any better way) -- will this code work inside a Unity project? Has anyone tried it in such a thing? I know it's an odd request, but a client actually wants to gamify banking and use this software for occasional real transactions and I'm at the phase where I'm deciding on a platform. I know certain .net libraries would need to be added for Unity to recognize the code -- I'd just like to know which ones, since the editor's AI doesn't seem to do a good job of figuring it out, heh.

EDIT: So far, it looks like Unity compatibility is a no-go (even when I manage to circumvent the nuget issues that Unity has and delete all the redundant dll copies, it still freaks out with dozens of soft runtime errors with the included dependencies), but would be cool to get confirmation.

Support: 'dotnet pack' to create NuGet package

This project has an fairly lengthy build script with a lot of options, but 'dotnet build' and 'dotnet test' work, however 'dotnet pack' does not.

Issues:

  • unsupported license reference in csproj
  • icon is added twice in csproj

API Version 2020-09-14

According to the README, this library is configured for Plaid API version 2019-05-29. The latest Plaid API version is now 2020-09-14. Can you consider supporting this latest version?

Unhandled exception when calling PlaidClient.FetchTransactionsAsync

I have the following code:

GetTransactionsResponse transactions = await plaidClient.FetchTransactionsAsync(new GetTransactionsRequest
{
    ClientId = plaidClientId,
    Secret = plaidSecret,
    AccessToken = sources[source],
    StartDate = beginningOfMonth,
    EndDate = beginningOfNextMonth,
});

I call this code in a loop and during one iteration I got the following unhandled exception:

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at Acklann.Plaid.PlaidClient.CreateResponse[TResponse](HttpResponseMessage response)
   at Acklann.Plaid.PlaidClient.PostAsync[TResponse](String path, SerializableContent request)
   at TransactionChecker.Program.CheckForNewTransactionsAsync(Boolean firstRun) in C:\Users\derek\source\repos\TransactionChecker\TransactionChecker\Program.cs:line 85

Could this be wrapped up into a PlaidException and return GetTransactionsResponse.IsSuccessStatusCode = false?

nuget install error

PM> Install-Package Acklann.Plaid -Version 0.0.6-beta

Attempting to gather dependency information for package 'Acklann.Plaid.0.0.6-beta' with respect to project 'Clients\Stripe.Service', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 330.28 ms
Attempting to resolve dependencies for package 'Acklann.Plaid.0.0.6-beta' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Acklann.Plaid.0.0.6-beta'
Resolved actions to install package 'Acklann.Plaid.0.0.6-beta'
Retrieving package 'Acklann.Plaid 0.0.6-beta' from 'nuget.org'.
GET https://api.nuget.org/v3-flatcontainer/acklann.plaid/0.0.6-beta/acklann.plaid.0.0.6-beta.nupkg
OK https://api.nuget.org/v3-flatcontainer/acklann.plaid/0.0.6-beta/acklann.plaid.0.0.6-beta.nupkg 285ms
Installing Acklann.Plaid 0.0.6-beta.
Install failed. Rolling back...
Package 'Acklann.Plaid.0.0.6-beta' does not exist in project 'xxxx.Service'
Package 'Acklann.Plaid.0.0.6-beta' does not exist in folder 'C:\Users\tmwil\Documents\VS\GF_dev\packages'
Executing nuget actions took 821.27 ms
Install-Package : Could not install package 'Acklann.Plaid 0.0.6-beta'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any
assembly references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1

  • Install-Package Acklann.Plaid -Version 0.0.6-beta
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    

ExchangeTokenRequest doesn't inherit RequestBase

Hello,
I'm sorry if it's done by design but I personally was really surprised when:

var request = new ExchangeTokenRequest
{
    PublicToken = publicToken
};
ExchangeTokenResponse response = await _plaidClient.ExchangeTokenAsync(request);

returned bad request saying client_id and secret are missed.

I started digging and found out that EnsureCredentials method doesn't do anything because ExchangeTokenRequest doesn't inherit RequestBase (as other classes) so request parameters such as Secret/ClientId are not fallbacked with values from PlaidClient.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.