Giter VIP home page Giter VIP logo

corepro-sdk-java's People

Contributors

iamchristine avatar ivancampos avatar jramnani avatar socialmoneydev avatar stewart-noll-q2 avatar trptcolin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

corepro-sdk-java's Issues

The method `getByTag` does not work for Customer or ExternalAccount objects

For the domain objects, Customer and ExternalAccount, the method getByTag throws an error.

The error is:

Caused by: java.util.IllegalFormatConversionException: d != java.lang.String
    at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
    at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747)
    at java.util.Formatter.format(Formatter.java:2520)
    at java.util.Formatter.format(Formatter.java:2455)
    at java.lang.String.format(String.java:2940)
    at io.corepro.sdk.ExternalAccount.getByTag(ExternalAccount.java:105)
    at io.corepro.sdk.ExternalAccount.getByTag(ExternalAccount.java:99)
    at com.bmo.benjamins.service.CoreProServiceWrapperImpl.verifySourceAccount(CoreProServiceWrapperImpl.java:107)
    at com.bmo.benjamins.service.CoreProFundService.verifySourceAccount(CoreProFundService.java:78)

I notice in the method signatures that the getByTag functions take an integer, customerId, in addition to a Tag.

https://github.com/socialmoney/corepro-sdk-java/blob/master/io.corepro/src/io/corepro/sdk/Customer.java#L130

My understanding is that the purpose of getByTag is that it should not require the Customer's ID. Also, the API documentation shows only tag as a required field.
https://docs.corepro.io/api/customer/getbytag

I've noticed this issue with Customer and ExternalAccount objects, but I haven't checked to see if there are other domain objects affected.

ExternalAccount.verify always throws CoreProApiException

In our code, we need to verify an external account.

First, we are getting the ExternalAccount object with the customer ID and external account ID. This step is succeeding without any errors.

ExternalAccount account = ExternalAccount.get(
    request.getCustomerId(),
    request.getExternalAccountId(),
    connection,
    null
);

However, when we call account.verify(), this step is failing even though the account exists in core pro.

return account.verify(
    request.getAmountOne(),
    request.getAmountTwo(),
    connection,
    null
);

This is the exception that is being thrown:

CoreProApiException: Invalid ExternalAccountId '305014' See Errors property for full list of error details.

We have also tried using ExternalAccount.getByTag(), but always get the same results.

While I am not positive whether this is a problem with the SDK or the CorePro sandbox, I have had success testing this process against the CorePro sandbox API, but I haven't been able to replicate it using this SDK.

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.