Giter Club home page Giter Club logo

mangopay2-java-sdk's Introduction

MANGOPAY API Known Issues

You can use the issues tab of this repo to follow known issues in our production and sandbox environments.

Feel free to subscribe to an issue to be updated of any changes.

MANGOPAY API Status

For the current status of the API and scheduled maintenance announcements, please see status.mangopay.com

mangopay2-java-sdk's People

Contributors

andrzej-rojek avatar catacraciun avatar celinelz avatar cosmin-m21 avatar cosmin-margarit avatar federicogatti avatar hectorespert avatar hobailey avatar iulian03 avatar jide-whenthen avatar jidefela-mgp avatar jonathanlalou avatar lukasz-drzewiecki avatar mangomaxoasis avatar mickaelpois avatar mihaimoiseanu avatar mkoppanen avatar msolovastru-ro avatar murarumihai avatar nboire avatar nomishdr avatar paulhristea avatar silvianagh avatar sodiqoladeni avatar solojr avatar trefaspaula avatar vlad-mircan avatar

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

Watchers

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

mangopay2-java-sdk's Issues

Use slf4j-api for logging

It would be super awesome if you could make the sdk's log statements use slf4j instead of System.out.println so that client systems can better manage logging.

You can see a sample implementation with slf4j and logback as the backend in this commit: https://github.com/nikosk/mangopay2-java-sdk/commit/1206d88453d16485bb33facc902193c64b56ec0e.

Notice that there is no more need for "isDebugEnabled" checks. If debug is switch off in the logging framework then the log statements are no-op.

FYI, using slf4j is a standard practice in java projects, it abstracts logging requirements so that the clients of your library can hook in whatever logging framework they wish. There are slf4j backends for every major logging framework including Android so there realy is no downside in using it.

Users.getNatural returns empty_body exception

Hi,
I'm receiving below exception when using Users.getNatural:
com.mangopay.core.ResponseException: Bad request. {"Message":"the body cannot be empty","Type":"empty_body","Id":"492c0812-18ac-46b2-b66f-d91acf6e8cfa","Date":1427290802.0,"errors":null}

getNatural API call is done as the following:
try {
UserNatural user=MangoApi.Users.getNatural(retUser.Id);
} catch (Exception e){....

Insert is done successfully just before by retUser=MangoApi.Users.create(newUser);
then retUser.Id is correctly set ("6185965" value in my case).

could you please help ?
thx

RestTool castResponseToEntity() method doesn't handle enums correctly

To reproduce:
Add to the hook creation test case (ApiHooksTest.test_Hooks_Get() ) an assert directive (sty like assertEquals(getHook.EventType, hook.EventType);) to check that the hook's event type of the object returned by the creation is the same as the input event type (by the way it should already have been tested). See that null is always returned.

The cause is in the RestTool class, where it can be seen that the json to java conversion doesn't handle Enums at all.
Possible (really) dirty fix:
insert something like this i, the 'if (fieldIsArray)' code:
} else if (f.getType().isEnum()) {// Enumeration, try getting enum by name
Class cls = f.getType();
Object val = Enum.valueOf(cls, entry.getValue().getAsString());
f.set(result, val);

and this in the else statement:
} else if (genericTypeClass.isEnum()) {// Enumeration, try getting enum by name
Class cls = genericTypeClass;
Object val = Enum.valueOf(cls, e.getAsJsonPrimitive().getAsString());
addMethod.invoke(o, val);

Pagination error with class Users

I can not use the class Pagination for User model . The error below

Error:(58, 31) java: no suitable method found for getAll(com.mangopay.core.Pagination)
    method com.mangopay.core.APIs.ApiUsers.getAll() is not applicable
      (actual and formal argument lists differ in length)
    method com.mangopay.core.APIs.ApiUsers.getAll(com.mangopay.core.Pagination,com.mangopay.core.Sorting) is not applicable
      (actual and formal argument lists differ in length)

My code :

        Pagination pagination = new Pagination(1, 8); // get 1st page, 8 items per page
        try {
            users =  api.Users.getAll(pagination); // It does not work
        } catch (Exception e) {
            e.printStackTrace();
        }

Idempotency.get doesn't seem to work

Hi,

I have multiple issues with Idempotency.get. I can not make it work on the sandbox environment.

Idempotency.get("")

When the string is empty we have this weird error instead of a 404 I suppose.
{"Message":"No HTTP resource was found that matches the request URI 'https://api.sandbox.mangopay.com/v2.01/XXXXX/responses/'."} (MangoPayApi.scala:160)

Idempotency.get("77nurmc5up7vl8i9rkfnggtc30")

When I try to get an existing key I have the following message:
java.lang.IllegalStateException: Not a JSON Object: null (JsonElement.java:90) com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:90) com.mangopay.core.RestTool.checkResponseCode(RestTool.java:974)

Do you know what is the problem?

Thanks for your help.

Missing feature - GET Settlement

Hi guys,

This API is not available in maven repo:
https://api.sandbox.mangopay.com/v2.01/m3application5test/settlements/38334743

I am using this maven repo:
https://mvnrepository.com/artifact/com.mangopay/mangopay2-java-sdk/2.2.0

Basically get settlement is not yet implemented and for us it is an issue. I would like to know if there is a real chance that you guys add this functionality in the next days or we should customize our code to perform this function with regular GET calls.

Thanks a lot
A

Add GB Bank Account (not working)

Adding a GB bank account currently fails with the new SDK. I have submitted a screenshot via your contact page. Here is the exception (it's not very informative):

{"Message":"Internal Server Error","Type":"other","Id":"d989139b-4980-42b8-85de-78af8a1a1cab#1476906932","Date":1476906933.0,"errors":null}

Edit: This occurs whilst using the sandbox

Release issues

Hi,

I would like to upgrade the library in our project.

It's written on the the README that the SDK is published as a Maven artifact on jCenter.
When I check jCenter, the last release is v1.0.6 on the May 16th.
https://bintray.com/mangopay/mangopay2-java-sdk/mangopay2-java-sdk/v1.0.6/view

But on github the last release is v1.0.7 on Apr 12th.
What version should I take? Should I trust github or jCenter to download the artifact?

It seems that there is an issue in https://github.com/Mangopay/mangopay2-java-sdk/blob/master/build.gradle#L53
It doesn't match the version of the application.
https://github.com/Mangopay/mangopay2-java-sdk/blob/master/build.gradle#L22

When I try to build it myself (to deploy in our internal maven repository), I have 18 tests failures with the command gradle test
Is there any configuration to setup in order to run the tests?
mangopay test failures

How can I the last stable version?

Thanks for your help.

Payin whit preauthorization error

I cannot do a payin with a preauthorization.
The error returned is:

Execution is not defined or it is not object type

So i tryed to add to execution the type Preauthorization BUT the class PayinExecutionDetailsPreauthorization doesn't exist.

Please tell me what is the way to create a payin from a preauthorization?

NaturalUser IncomeRange not been handled correctly

Hello,

There appears to be problem with handling properties of type Integer, for example UserNatural.IncomeRange.

Looking at RestTool looks like the issue is the handling of the response for Integers, the code just checks for int.class rather than Integer (Double checks appears to do this correctly).
Consequence of this is the NaturalUser income range is not returned during gets.

Thanks,
Stuart

Error Handling

Hello,

I am just starting to use this library and I am slightly confused about error handling. Seems like most of the errors throw generic exceptions and the error messages are marshalled into something that is not machine readable (https://github.com/Mangopay/mangopay2-java-sdk/blob/master/src/com/mangopay/core/RestTool.java#L885).

As mentioned, I am just starting with the library but I don't see an easy way to handle different types of errors coming back from the library. Am I missing something?

DisputeReasonType LATE_FAILURE_CONTACT_USER missing in enum

Today we received a new dispute created event.

If we want to get more info about it (mangoApi.Disputes.get(id)) the following exception is thrown:

java.lang.IllegalArgumentException: No enum constant com.mangopay.core.enumerations.DisputeReasonType.LATE_FAILURE_CONTACT_USER
at java.lang.Enum.valueOf(Enum.java:238)
at com.mangopay.core.RestTool.castResponseToEntity(RestTool.java:739)
at com.mangopay.core.RestTool.castResponseToEntity(RestTool.java:554)
at com.mangopay.core.RestTool.castResponseToEntity(RestTool.java:666)
at com.mangopay.core.RestTool.castResponseToEntity(RestTool.java:554)
at com.mangopay.core.RestTool.doRequest(RestTool.java:421)
at com.mangopay.core.RestTool.request(RestTool.java:142)
at com.mangopay.core.RestTool.request(RestTool.java:166)
at com.mangopay.core.APIs.ApiBase.getObject(ApiBase.java:261)
at com.mangopay.core.APIs.ApiBase.getObject(ApiBase.java:276)
at com.mangopay.core.APIs.ApiDisputes.get(ApiDisputes.java:38)

LATE_FAILURE_CONTACT_USER is missing in DisputeReasonType.

Allow updating of BankAccount Tag property via the Java SDK

It would be useful to be able to update the BankAccount.Tag property after a BankAccount is created. I can see how to do this via HTTP, but not via the Java SDK.

Use case: our users have a single 'active' bank account. They are allowed to add a new account as/when they like and after doing so, previous accounts on the system are ignored. Ideally we'd like to mark the previous accounts as "Inactive" via the Tag property to avoid confusion.

Please let me know if you'd like more details.

API transport security

Hello,
could you please elaborate about the security aspects when using API, mainly about transport part (what is embedded in SDK ?) and token management (is it requested on client part ?).
thanks

Fail read Mangopay SDK version properties

I updated a project to 1.3.0 library version, it is working but I receive this exception in the logs.

java.io.FileNotFoundException: version.properties (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at com.mangopay.core.APIs.implementation.OAuthApiImpl.getProjectVersion(OAuthApiImpl.java:66)
22-Feb-2017 09:04:04.714 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
	at com.mangopay.core.APIs.implementation.OAuthApiImpl.createToken(OAuthApiImpl.java:58)
	at com.mangopay.core.AuthorizationTokenManager.getToken(AuthorizationTokenManager.java:39)
	at com.mangopay.core.AuthenticationHelper.getHttpHeaderStrong(AuthenticationHelper.java:61)
	at com.mangopay.core.AuthenticationHelper.getHttpHeaderKey(AuthenticationHelper.java:30)
	at com.mangopay.core.RestTool.getHttpHeaders(RestTool.java:912)
	at com.mangopay.core.RestTool.doRequest(RestTool.java:336)
	at com.mangopay.core.RestTool.request(RestTool.java:142)
	at com.mangopay.core.RestTool.request(RestTool.java:166)
	at com.mangopay.core.APIs.ApiBase.getObject(ApiBase.java:266)
	at com.mangopay.core.APIs.ApiBase.getObject(ApiBase.java:281)
	at com.mangopay.core.APIs.implementation.WalletApiImpl.get(WalletApiImpl.java:33)

I make this pull request #59 to fix this bug and add improvements.

Getting com.google.gson.stream.MalformedJsonException on all API calls

I have a strange problem: on our development machines, all calls to the MangoPay API work very well, but on our test server I get this exception for ALL calls to the API:
com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 25 path $

Would anyone know where that could come from and how to address that?

Thanks a lot!

Active == null

Hello,

on sandbox I am getting following card structure back (dumped as json):

{"Id":"8327520","Tag":null,"CreationDate":1441068315,"ExpirationDate":"1218","Alias":"356999XXXXXX0140","CardProvider":"MASTERCARD","CardType":"CB_VISA_MASTERCARD","Product":" ","BankCode":"unknown","Active":null,"Currency":"GBP","Validity":"VALID","readOnlyProperties":["Id","CreationDate","ExpirationDate","Alias","CardProvider","CardType","Product","BankCode","Active","Currency"],"values":{},"dependentObjects":{},"subObjects":{}}

As you can see Active is null instead of false. Is this card valid or invalid?

BankingAlias deserialization

There is a problem deserialization BankingAlias object due to "details" object:

Java Object v2.5.0:
public String CreditedUserId;
public String WalletId;
public String OwnerName;
public BankingAliasType Type;
public CountryIso Country;
public boolean Active;
public BankingAliasDetails Details;

Api response:
{
"OwnerName": "someOwner",
"IBAN": "XXXXXXXXXX",
"BIC": "XXXXX",
"CreditedUserId": "1234567",
"Country": "XX",
"Tag": null,
"CreationDate": 1536760165,
"Active": true,
"Type": "IBAN",
"Id": "123456",
"WalletId": "123456"
}

Details is missing and SDK is throwing "NoSuchFieldException":
screen shot 2018-09-12 at 15 19 11

Use Gradle to build sdk

It would be awesome if you provided a standard way to build the sdk. Gradle is the least intrusive build system and it is supported by most IDEs. Following is a sample build script for the sdk:

apply plugin: 'idea'
apply plugin: 'java'

buildDir = 'target'
version = '1.0'

allprojects {
    sourceCompatibility = '1.7'
    targetCompatibility = '1.7'
}

jar {
    manifest {
        attributes("Implementation-Title": "Mangopay2-SDK", "Implementation-Version": version)
    }
}

sourceSets {
    main {
        java {
            srcDir 'src'
            output.classesDir = 'target/classes/main'
        }
    }
    test {
        java {
            srcDir 'test'
            include '**/*.txt'
            output.classesDir = 'target/classes/test'
        }
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'commons-codec:commons-codec:1.8'

    testCompile "junit:junit:4.11"
}



task wrapper(type: Wrapper) {
    gradleVersion = '1.11'
}

To test it create a file named "build.gradle" in the root of the project and paste the above script. To build the project type "gradle build" in the command line (assuming you have gradle installed).

Alternatively you can check out this fork https://github.com/nikosk/mangopay2-java-sdk and type "gradlew build" in the root of the project (it will automatically download the appropriate gradle version and use it to build the sdk)

Guidelines to use in Android?

Any experience of using this lib in Android? I see in README that this SDK has been written in Java 7 where Android uses Java 6.

Unable to create a PayIn after a PreAuthorization

Hello,

I encounter an issue using the SDK.

When trying to create a Card PreAuthorized PayIn, I've the following error :

[error] - application - java.lang.Exception: Execution is not defined or it is not object type
[error] - application - Execution is not defined or it is not object type
[warn] - application - Unable to parse response of MangoPay : com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Execution': was expecting ('true', 'false' or 'null')
at [Source: Execution is not defined or it is not object type; line: 1, column: 10]
[error] - application - Error(Execution is not defined or it is not object type, None, Some(java.lang.Thread.getStackTrace(Thread.java:1556)

It seems that it requires "setExecutionDetails" but it shouln't.
Can you please give me a hand on it?
Thanks

Here is the call :

def create(idempotentToken: String, payIn: PayInPreAuth): Future[Expect[PayIn]] = {
    utils.Error.wrapMangoPay(mangoPayApi.payIns.create(idempotentToken, payIn))
  }

here is the PayIn build (from scala class)

implicit def toJava(pi: PayInPreAuth): com.mangopay.entities.PayIn = {
    val pij = new com.mangopay.entities.PayIn
    pij.setTag(pi.tag.orNull)
    pij.setAuthorId(pi.authorId)
    pij.setCreditedUserId(pi.creditedUserId.orNull)
    pij.setDebitedFunds(pi.debitedFunds)
    pij.setFees(pi.fees)
    pij.setPaymentType(PayInPaymentType.PREAUTHORIZED)
    pij.setPaymentDetails(pi.paymentDetails)
    pij.setExecutionType(PayInExecutionType.PREAUTHORIZED) // also tried with DIRECT  
    //pij.setExecutionDetails(pi.executionDetails)
    pij.setCreditedWalletId(pi.creditedWalletId)
    pij
  }

Wrong use of the coding conventions

Dear Mangopay developers,

Every entity you are using in the SDK does not follow the Oracle coding conventions.
See: http://www.oracle.com/technetwork/java/codeconventions-135099.html

Another thing is that every entity is using a public variable without accessors (getters and setters).
Is this a deliberate choice? Or is this how the SDK is compiled from another language?

If it is compiled from another language, could you please configure the project that it follows the standard guidelines of Java.

Kind regards,

bobonaut

Wallet retrieving error

I encounter an issue using the SDK with an Android app.

I try to retrieve a Wallet by its ID, using the .Wallets.get("") but it makes my app crash with the following logs:
System.err: com.mangopay.core.ResponseException: {"Message":"The requested resource does not support http method 'POST'."}

Anyone having the same issue?

RestTool doesn't release connections when dropped.

When connections/sockets are dropped, the api doesn't release the connection and keeps on waiting forever.
This results in calls to mango e.g. MangoPayApi.Users.get(id) begin stuck forever.

It would be nice to have a working timeout functionality.

getUserApi - getNatural/getLegal user mapping error

Get user by id method in SDK does not map the KYCLevel field. Even if the server return the correct value (as JSON), inside the SDK, there is a method called castResponseToEntity(RestTool.java) which is supposed to fill the java object from a json object. This process is by comparing object members one by one. The issue is that , a camel case transformation, is supposed to compare value of a JSON field called FirstName with the name of a java object caled firstName and assign associated value. This comparison does not work properly for KYCLevel field compared with kycLevel field, which end up with a java object of type User having always the null value for kycLevel, no matter what the server returns.

Add Asynchronous API

It would be nice to have a possibility to call the Mangopay API asynchronously.

NPE in ApiUsers.updateKycDocument

Hi,

We have a NPE when receiving the response of an API call :

java.lang.NullPointerException: null
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:97)
	at com.mangopay.core.RestTool.doRequest(RestTool.java:400)
	at com.mangopay.core.RestTool.request(RestTool.java:142)
	at com.mangopay.core.APIs.ApiBase.updateObject(ApiBase.java:435)
	at com.mangopay.core.APIs.ApiBase.updateObject(ApiBase.java:406)
	at com.mangopay.core.APIs.ApiUsers.updateKycDocument(ApiUsers.java:343)
	at com.hopwork.notifier.compliance.MangoKYCFileHandler.sendKycDocument(MangoKYCFileHandler.java:216)
	at com.hopwork.notifier.compliance.MangoKYCFileHandler.complianceFileValidated(MangoKYCFileHandler.java:148)

This is for the API : /users/{USER_iD}/KYC/documents/{DOCUMENT_ID} (PUT)

it seems to be located here :

            // get response
            this._responseCode = _connection.getResponseCode();
            InputStream is;
            if (this._responseCode != 200 && this._responseCode != 204) {
                is = _connection.getErrorStream();
            } else {
                is = _connection.getInputStream();
            }

            StringBuffer resp;
            try (BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"))) {
                String line;
                resp = new StringBuffer();
                while ((line = rd.readLine()) != null) {
                    resp.append(line);
                }
            }

The symptom, "is" is null. We know that the api calls are successfull because the kyc document is correct on the mangopay dashboard.
So we can only suppose that it's null because this._responseCode is neither 200 nor 204 but getErrorStream return null.

View a Settlement Transfer does not return a Transfer

this API endpoint
.../v2.01/:ClientId/settlements/:SettlementId returns a Transfer type object

the SDK transforms this Transfer type object into a SettlementTransfer object (the one needed to create a settlement) wich has way less information about the transfer

class SettlementApiImpl
method get(String id) returns SettlementTransfer

either this method should return Transfer, either a new method to return Transfer is needed

What do you guys think about this ?

Thank you
Cornel

later edit:
I noticed that the return object by the api has a field RepudiationId. Field that does not exist in the Transfer object. And I didn't find a similar object in the com.mangopay.entities package.

Contest deadline date is never set

Hi mangopay developers,

I am currently using your API for a client.

When I was testing the hooks for a dispute, I noticed that the Contest deadline date is always 'null'.

After a little debugging, I found that in com.mangopay.core.RestTool.java (line 747) there is a little bug.

if (fieldTypeName.equals(long.class.getName())) { f.setLong(result, entry.getValue().getAsLong()); }

In the code above, you check for the primitive 'long' but there should be a check for a Long Object instead. As the primitive 'long' is not found, the Contest deadline date is never set.

This is an urgent issue for our application. Could this please be fixed as soon as possible?

Thanks you all for this great API!

Unserializable OAuthToken class

I am using strategy IStorageStrategy and I whant to save OAuthTOken in redis

public interface IStorageStrategy {
  OAuthToken get(String envKey);
  void store(OAuthToken token, String envKey);   
}

but cannot do it!! becouse OAuthToken has token-type private field! I don't want use reflection for this.

public class OAuthToken extends Dto implements Serializable {
   private Long create_time;
   public String access_token;
   public String token_type;
   public int expires_in;
    public OAuthToken() {
       create_time = System.currentTimeMillis() - 5000;
   }
   public Boolean IsExpired() {
       return (System.currentTimeMillis() >= (create_time + (expires_in * 1000)));
   }

  @Override
   public String toString() {

       return "access_token = " + this.access_token + ", token_type: " + this.token_type + ", expires_in: " + this.expires_in;

   }
}

and what does mean 5000 magic number?

Cannot get the last transaction

Hello,

When I want to get the last transactions, I use this :
List<Transaction> list = api.getWalletApi().getTransactions(buyer. getWallet());
if (list == null) {
throw new TechnicalException("Transaction not found : " + transactionId);
}
for (Transaction t : list) {
if (transactionId.equals(t.getId())) {
return t;
}
}
throw new TechnicalException("Transaction not found : " + transactionId);

The trouble is "getTransactions" looks to retrieve only the 10 first transactions in the whole history. So, if a user does more than 10 transactions, I will not be able to get the 11th, the 12th, etc..

There is an override of this method with paging parameters. But how can I know the page of the last transaction ?

In short, how can I get the last transaction of a user ? Why isn't there a method to get a transaction by its id ?

Cannot resolve maven dependency

I want to replace the jar dependency with the configured bintray dependency (from here https://bintray.com/mangopay/mangopay2-java-sdk/mangopay2-java-sdk). But there are some issues:

  1. The POM dependency type is wrong, it must be JAR
  2. Maven cannot resolve the dependency (which makes sense, as it resolves, by default, from Maven central repository). Unfortunately, I couldn't find any information on Bintray with the repository URL.

I want to avoid adding some global maven configuration (in settings.xml). I want everything to be added to the project pom.xml.

Maybe I am missing something, and everything is correct. But please let me know how can I configure this.

Thanks!

SSL certificate for OpenJDK 10

We're migrating our app to OpenJDK 10 and because your SSL certificate is not in the trust store, we need to add it manually.
Now, we're getting the following error:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

Could you provide us with a link to your sandbox and production certificates?

How to transfer money to client's wallet?

I would like to transfer money from a mangopay user's wallet to platform owner or client's wallet.

I tried this way but it doesn't work:

Wallet clientWallet = mangopayApi.Clients.getWallet(FundsType.FEES, CurrencyIso.GBP);

Transfer transfer = new Transfer();
transfer.AuthorId = mangopayUserId;
transfer.DebitedWalletId = userWalletId;
transfer.CreditedWalletId = clientWallet.Id;
...
mangopayApi.Transfers.create(transfer);

I got ResponseException with message "CreditedWalletId":"Wallet not found". It seems client wallet Id can't be used.

What is the correct way to transfer money from user wallet to client wallet? Should I use a normal wallet instead?

SDK Version 2.2.0: java.net.SocketException: Connection reset

Hello,

we are getting a lot of connection resets on the Sandbox API.
The error occurs often, but when we send the same request multiple times it works at some point (after 3-6 tries).
Note that the error does not happen on the Production API, only on Sandbox. Server & Firewall Setup is exactly the same for Sandbox and Production. We are using Version 2.2.0 (maven) of the Java SDK.

What could be the cause of this problem?
I can also provide you with a wireshark dump if you wish.

Full error:

15:44:35,794 ERROR [stderr] (default task-4) java.net.SocketException: Connection reset
15:44:35,795 ERROR [stderr] (default task-4) 	at java.net.SocketInputStream.read(SocketInputStream.java:210)
15:44:35,796 ERROR [stderr] (default task-4) 	at java.net.SocketInputStream.read(SocketInputStream.java:141)
15:44:35,796 ERROR [stderr] (default task-4) 	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
15:44:35,796 ERROR [stderr] (default task-4) 	at sun.security.ssl.InputRecord.read(InputRecord.java:503)
15:44:35,796 ERROR [stderr] (default task-4) 	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
15:44:35,796 ERROR [stderr] (default task-4) 	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
15:44:35,797 ERROR [stderr] (default task-4) 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
15:44:35,797 ERROR [stderr] (default task-4) 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
15:44:35,797 ERROR [stderr] (default task-4) 	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
15:44:35,797 ERROR [stderr] (default task-4) 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
15:44:35,798 ERROR [stderr] (default task-4) 	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334)
15:44:35,798 ERROR [stderr] (default task-4) 	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309)
15:44:35,798 ERROR [stderr] (default task-4) 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259)
15:44:35,798 ERROR [stderr] (default task-4) 	at com.mangopay.core.RestTool.doRequest(RestTool.java:383)
15:44:35,799 ERROR [stderr] (default task-4) 	at com.mangopay.core.RestTool.request(RestTool.java:142)
15:44:35,799 ERROR [stderr] (default task-4) 	at com.mangopay.core.RestTool.request(RestTool.java:186)
15:44:35,799 ERROR [stderr] (default task-4) 	at com.mangopay.core.APIs.implementation.OAuthApiImpl.createToken(OAuthApiImpl.java:55)
15:44:35,799 ERROR [stderr] (default task-4) 	at com.mangopay.core.AuthorizationTokenManager.getToken(AuthorizationTokenManager.java:39)
15:44:35,799 ERROR [stderr] (default task-4) 	at com.mangopay.core.AuthenticationHelper.getHttpHeaderStrong(AuthenticationHelper.java:61)
15:44:35,800 ERROR [stderr] (default task-4) 	at com.mangopay.core.AuthenticationHelper.getHttpHeaderKey(AuthenticationHelper.java:30)
15:44:35,800 ERROR [stderr] (default task-4) 	at com.mangopay.core.RestTool.getHttpHeaders(RestTool.java:1014)
15:44:35,800 ERROR [stderr] (default task-4) 	at com.mangopay.core.RestTool.doRequest(RestTool.java:336)
15:44:35,800 ERROR [stderr] (default task-4) 	at com.mangopay.core.RestTool.request(RestTool.java:142)
15:44:35,800 ERROR [stderr] (default task-4) 	at com.mangopay.core.APIs.ApiBase.createObject(ApiBase.java:221)
15:44:35,801 ERROR [stderr] (default task-4) 	at com.mangopay.core.APIs.ApiBase.createObject(ApiBase.java:239)
15:44:35,801 ERROR [stderr] (default task-4) 	at com.mangopay.core.APIs.implementation.UserApiImpl.createBankAccount(UserApiImpl.java:98)
15:44:35,801 ERROR [stderr] (default task-4) 	at com.mangopay.core.APIs.implementation.UserApiImpl.createBankAccount(UserApiImpl.java:92)
15:44:35,801 ERROR [stderr] (default task-4) 	at de.plx.boundary.PaymentBoundary.createPaymentBankaccount(PaymentBoundary.java:263)
15:44:35,801 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,802 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,802 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,802 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,802 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
15:44:35,802 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,803 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
15:44:35,803 ERROR [stderr] (default task-4) 	at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
15:44:35,803 ERROR [stderr] (default task-4) 	at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
15:44:35,803 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
15:44:35,804 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,804 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
15:44:35,804 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,804 ERROR [stderr] (default task-4) 	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
15:44:35,804 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,805 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
15:44:35,805 ERROR [stderr] (default task-4) 	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
15:44:35,805 ERROR [stderr] (default task-4) 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
15:44:35,805 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,806 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
15:44:35,806 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,806 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
15:44:35,806 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,806 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:44:35,807 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
15:44:35,807 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,807 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
15:44:35,807 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,807 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:254)
15:44:35,808 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:329)
15:44:35,808 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
15:44:35,808 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,808 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
15:44:35,809 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,815 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
15:44:35,816 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,816 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
15:44:35,816 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,816 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
15:44:35,817 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,817 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
15:44:35,817 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,817 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
15:44:35,817 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,818 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
15:44:35,818 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,818 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
15:44:35,818 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,819 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
15:44:35,819 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,819 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
15:44:35,819 ERROR [stderr] (default task-4) 	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
15:44:35,819 ERROR [stderr] (default task-4) 	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
15:44:35,820 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,820 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
15:44:35,820 ERROR [stderr] (default task-4) 	at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
15:44:35,820 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,820 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:44:35,821 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
15:44:35,821 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
15:44:35,821 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,821 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:44:35,822 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
15:44:35,822 ERROR [stderr] (default task-4) 	at de.plx.boundary.PaymentBoundary$$$view7.createPaymentBankaccount(Unknown Source)
15:44:35,822 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,822 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,823 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,823 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,823 ERROR [stderr] (default task-4) 	at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:433)
15:44:35,823 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)
15:44:35,823 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
15:44:35,824 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:67)
15:44:35,824 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
15:44:35,824 ERROR [stderr] (default task-4) 	at de.plx.boundary.PaymentBoundary$Proxy$_$$_Weld$EnterpriseProxy$.createPaymentBankaccount(Unknown Source)
15:44:35,824 ERROR [stderr] (default task-4) 	at de.plx.boundary.UserBoundary.createUserBankAccountDetails(UserBoundary.java:749)
15:44:35,824 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,825 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,825 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,825 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,825 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
15:44:35,826 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,826 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
15:44:35,826 ERROR [stderr] (default task-4) 	at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
15:44:35,826 ERROR [stderr] (default task-4) 	at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
15:44:35,826 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
15:44:35,827 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,827 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
15:44:35,827 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,827 ERROR [stderr] (default task-4) 	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
15:44:35,828 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,828 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
15:44:35,828 ERROR [stderr] (default task-4) 	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
15:44:35,828 ERROR [stderr] (default task-4) 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
15:44:35,828 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,829 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
15:44:35,829 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,829 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
15:44:35,829 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,829 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:44:35,830 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
15:44:35,830 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,830 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
15:44:35,830 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,830 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
15:44:35,831 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)
15:44:35,831 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
15:44:35,831 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,831 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
15:44:35,831 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,832 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
15:44:35,832 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,832 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
15:44:35,832 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,833 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
15:44:35,833 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,833 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
15:44:35,833 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,833 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
15:44:35,834 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,834 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
15:44:35,834 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,834 ERROR [stderr] (default task-4) 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
15:44:35,834 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,835 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
15:44:35,835 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,835 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
15:44:35,835 ERROR [stderr] (default task-4) 	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
15:44:35,835 ERROR [stderr] (default task-4) 	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
15:44:35,836 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,836 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
15:44:35,836 ERROR [stderr] (default task-4) 	at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
15:44:35,836 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,836 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:44:35,837 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
15:44:35,837 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
15:44:35,837 ERROR [stderr] (default task-4) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
15:44:35,837 ERROR [stderr] (default task-4) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
15:44:35,837 ERROR [stderr] (default task-4) 	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
15:44:35,838 ERROR [stderr] (default task-4) 	at de.plx.boundary.UserBoundary$$$view2.createUserBankAccountDetails(Unknown Source)
15:44:35,838 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,838 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,838 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,838 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,839 ERROR [stderr] (default task-4) 	at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:433)
15:44:35,839 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)
15:44:35,839 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
15:44:35,839 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:67)
15:44:35,839 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
15:44:35,840 ERROR [stderr] (default task-4) 	at de.plx.boundary.UserBoundary$Proxy$_$$_Weld$EnterpriseProxy$.createUserBankAccountDetails(Unknown Source)
15:44:35,840 ERROR [stderr] (default task-4) 	at de.plx.web.adapter.UserAdapter.usersBankAccount(UserAdapter.java:125)
15:44:35,840 ERROR [stderr] (default task-4) 	at de.plx.web.adapter.UserAdapter$Proxy$_$$_WeldSubclass.usersBankAccount$$super(Unknown Source)
15:44:35,840 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,840 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,841 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,841 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,841 ERROR [stderr] (default task-4) 	at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:49)
15:44:35,841 ERROR [stderr] (default task-4) 	at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)
15:44:35,841 ERROR [stderr] (default task-4) 	at de.plx.security.UserRegisteredAndActiveChecker.checkUserFullyRegistered(UserRegisteredAndActiveChecker.java:74)
15:44:35,841 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,842 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,842 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,842 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,842 ERROR [stderr] (default task-4) 	at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)
15:44:35,842 ERROR [stderr] (default task-4) 	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
15:44:35,842 ERROR [stderr] (default task-4) 	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
15:44:35,843 ERROR [stderr] (default task-4) 	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
15:44:35,843 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
15:44:35,843 ERROR [stderr] (default task-4) 	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
15:44:35,843 ERROR [stderr] (default task-4) 	at de.plx.web.adapter.UserAdapter$Proxy$_$$_WeldSubclass.usersBankAccount(Unknown Source)
15:44:35,843 ERROR [stderr] (default task-4) 	at de.plx.web.adapter.UserAdapter$Proxy$_$$_WeldClientProxy.usersBankAccount(Unknown Source)
15:44:35,844 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:44:35,844 ERROR [stderr] (default task-4) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:44:35,844 ERROR [stderr] (default task-4) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:44:35,844 ERROR [stderr] (default task-4) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:44:35,844 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
15:44:35,845 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
15:44:35,845 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
15:44:35,845 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
15:44:35,845 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402)
15:44:35,845 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)
15:44:35,845 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
15:44:35,846 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
15:44:35,846 ERROR [stderr] (default task-4) 	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
15:44:35,846 ERROR [stderr] (default task-4) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
15:44:35,846 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
15:44:35,846 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
15:44:35,846 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
15:44:35,847 ERROR [stderr] (default task-4) 	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
15:44:35,847 ERROR [stderr] (default task-4) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
15:44:35,847 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
15:44:35,847 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
15:44:35,847 ERROR [stderr] (default task-4) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
15:44:35,847 ERROR [stderr] (default task-4) 	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
15:44:35,848 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
15:44:35,848 ERROR [stderr] (default task-4) 	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
15:44:35,848 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
15:44:35,848 ERROR [stderr] (default task-4) 	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
15:44:35,848 ERROR [stderr] (default task-4) 	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
15:44:35,848 ERROR [stderr] (default task-4) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
15:44:35,849 ERROR [stderr] (default task-4) 	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
15:44:35,849 ERROR [stderr] (default task-4) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
15:44:35,849 ERROR [stderr] (default task-4) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
15:44:35,849 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
15:44:35,849 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
15:44:35,849 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
15:44:35,850 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
15:44:35,850 ERROR [stderr] (default task-4) 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
15:44:35,850 ERROR [stderr] (default task-4) 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
15:44:35,850 ERROR [stderr] (default task-4) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
15:44:35,850 ERROR [stderr] (default task-4) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
15:44:35,850 ERROR [stderr] (default task-4) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
15:44:35,851 ERROR [stderr] (default task-4) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
15:44:35,851 ERROR [stderr] (default task-4) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
15:44:35,851 ERROR [stderr] (default task-4) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
15:44:35,851 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
15:44:35,851 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
15:44:35,852 ERROR [stderr] (default task-4) 	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
15:44:35,852 ERROR [stderr] (default task-4) 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
15:44:35,852 ERROR [stderr] (default task-4) 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
15:44:35,852 ERROR [stderr] (default task-4) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
15:44:35,852 ERROR [stderr] (default task-4) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
15:44:35,852 ERROR [stderr] (default task-4) 	at java.lang.Thread.run(Thread.java:748)

Error Invalid client

Hi,
I'm receiving below exception when I'm trying to create a NaturaUser:
com.mangopay.core.ResponseException: {"error":"invalid_client","error_description":"The authorization header was malformed or not recognized"}

create user call is done as the following:
...
try {
new createUserNatural().execute();
} catch (Exception e) {
e.printStackTrace();
}
}

private class createUserNatural extends AsyncTask<User,Void,User> {
    @Override
    protected User doInBackground(User... params) {
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            MangoPayApi api = new MangoPayApi();
            User user = new UserNatural();
            try {
                user = api.Users.create(user);
            } catch (Exception e) {
                e.printStackTrace();
            }              
            return user;
        }
        return null;
    }

    @Override
    protected void onPostExecute(User user) {
        System.out.println(user);
    }
}

could you please help ?
thanks!

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.