ingenico-epayments / connect-sdk-java Goto Github PK
View Code? Open in Web Editor NEWIngenico Connect Java Server SDK
Home Page: https://docs.connect.worldline-solutions.com/documentation/sdk/server/java/
License: Other
Ingenico Connect Java Server SDK
Home Page: https://docs.connect.worldline-solutions.com/documentation/sdk/server/java/
License: Other
Trying to run a mvn clean install, resulting in a test case error:
Tests run: 12, Failures: 11, Errors: 0, Skipped: 0, Time elapsed: 0.278 sec <<< FAILURE! - in com.ingenico.connect.gateway.sdk.java.defaultimpl.DefaultConnectionLoggerTest
Can work around with a mvn clean install -Dmaven.test.skip=true.
DefaultAuthenticator authentication should not depend on the default JVM Locale
The current implementation will not generate the same signature based on the jvm default locale
Example :
if your jvm is set to the tr locale (running with -Duser.language=tr or changing the os language)
then the connect server will reject the api call (MISSING_OR_INVALID_AUTHORIZATION
)
Re-use the pattern which is thread safe
Reduce cpu usage.
Hi,
I'd like to integrate the java sdk into a reactive stack. Unfortunately, the code in this repo seems to include blocking calls. Are there plans to release a non-blocking version in the near future, using for instance Play's WS library?
Thanks.
Hi team
When can we expect the java sdk in maven central repository?
In it's current implementation the connect api calls are allocating twice the memory it needs when converting the server response.
The current steps from the network response to the java object are :
network stream -> org.apache.http.util.CharArrayBuffer -> String -> Gson -> Java Object
The steps network stream -> org.apache.http.util.CharArrayBuffer -> String
are done in the org.apache.http.util.EntityUtils.toString(HttpEntity, Charset)
method (called in DefaultConnection#executeRequest
)
This doubles (at least) the memory allocated to convert the server response to a java object.
Most of the rest clients in use are doing the json conversion directly from the network stream.
Examples :
In Spring RestTemplate (which also use apache http components)
org.springframework.http.client.HttpComponentsClientHttpRequest
for the request executionorg.springframework.http.client.HttpComponentsClientHttpResponse#getBody
org.springframework.http.converter.json.(AbstractJsonHttpMessageConverter and GsonHttpMessageConverter)
for Gson based converter examplesIn retrofit
retrofit2.converter.gson.GsonResponseBodyConverter
okhttp3.ResponseBody
In order to improve our application resilience, we are generating errors when calling the connect plateform.
The calls are done with the connect sdk but the endpoint is a fake one.
This mock endpoint returns all kinds of errors (4xx, 5xx, timeout, bad json, etc..)
Please note that those tests were made to verify our application not the sdk.
But for one of our test, the sdk is return a NullPointerException
which is not the expected behaviour.
In this case our mock returns a http status 500 with an empty body.
The NPE is coming from :
as the errorObject
is null.
It raises a NPE instead of the IllegalArgumentException
After reading the documentation, we think that this error should throw a GlobalCollectException
and not a NPE or IllegalArgumentException
.
Extract from the connect documentation :
A GlobalCollectException if something went wrong on the Ingenico ePayments platform.
The Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
Hi!
I'm using the SDK feature by feature, and for now I'm having missing fields on several objects:
CreateHostedCheckoutResponse.redirectUrl
GetHostedCheckoutResponse.createdPaymentOutput.payment.paymentOutput.references.merchantParameters
I am trying to get dependency using sbt. what should i put in the libraryDependencies
i tried
libraryDependencies += "com.ingenico.connect.gateway" %% "connect-sdk-java" % "1.0.34"
but got error in dependency resolution
Re-use the pattern which is thread safe
Reduce cpu usage.
Hello. I am trying to use 'hostedcheckouts' following the information the information found here:
returnUrl
Description
The URL that the customer is redirect to after the payment flow has finished. You can add any number of key value pairs in the query string that, for instance help you to identify the customer when they return to your site. Please note that we will also append some additional key value pairs that will also help you with this identification process.
Note: The provided URL should be absolute and contain the protocol to use, e.g. http:// or https://. For use on mobile devices a custom protocol can be used in the form of protocol://. This protocol must be registered on the device first.
URLs without a protocol will be rejected.
The returnURL is not fully used when the POST method is called - the query string is not used!
I am not using a SDK but I've tested my code using curl to POST a request using an URL with parameters and that part works!
Hi when client payment success by Hosted Checkout , webhook set in where ? i can't find it ,only find a returnUrl。
Refer to your "test cases" documentation for Visa or MasterCard, there is 3 amount dedicated for testing declined payment authorization:
When these test cases thrown a ResponseException, you catch it in PaymentsClient, line 101.
In 12.04 € & 13.04 € cases, the ResponseException has a status code of 402.
So we fall into an errorType of PaymentErrorResponse.class :
errorType = PaymentErrorResponse.class;
(PaymentsClient line 108)
And finally your client return a DeclinedPaymentException in ApiResource line 80 :
return new DeclinedPaymentException(statusCode, responseBody, (PaymentErrorResponse) errorObject);
That allow us to retrieve informations about the declined payment in the CreatePaymentResult.
But with 14.04 € case, the ResponseException has a status code of 500.
So it fall into default errorType wich is ErrorResponse.class :
errorType = ErrorResponse.class;
(PaymentsClient line 120)
And finally your client return a GlobalCollectException in ApiResource line 131 :
return new GlobalCollectException(statusCode, responseBody, errorId, errors);
But as shown in the response body of the 14.04 € test case :
com.ingenico.connect.gateway.sdk.java.GlobalCollectException: the Ingenico ePayments platform returned an error response;
statusCode=500;
responseBody='{
"errorId" : "5ba21df82753eab725a956f4424d3726",
"errors" : [ {
"code" : "9999",
"id" : "UNKNOWN_SERVER_ERROR",
"category" : "CONNECT_PLATFORM_ERROR",
"message" : "UNKNOWN_SERVER_ERROR",
"httpStatusCode" : 500
} ],
"paymentResult" : {
"payment" : {
"id" : "xxxxxxxxxx_x",
"paymentOutput" : {
"amountOfMoney" : {
"amount" : 1404,
"currencyCode" : "EUR"
},
"references" : {
"merchantReference" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
"paymentMethod" : "card",
"cardPaymentMethodSpecificOutput" : {
"paymentProductId" : 1,
"fraudResults" : {
"fraudServiceResult" : "accepted"
},
"threeDSecureResults" : {
"eci" : "9"
},
"card" : {
"cardNumber" : "XXXXXXXXXXXXXXXX",
"expiryDate" : "XXXX"
},
"token" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
},
"status" : "REJECTED",
"statusOutput" : {
"isCancellable" : false,
"statusCategory" : "UNSUCCESSFUL",
"statusCode" : 2,
"isAuthorized" : false,
"isRefundable" : false
}
}
}
}'
There is a payment result, so the status code should be 402 to allow us to retrieve informations about the declined payment.
Hello, I receantly tried to download the connect-sdk-java-6.3.0-bin.zip from https://github.com/Ingenico-ePayments/connect-sdk-java/releases and a collegue antivirus and mine poped up an alert, just wanted to let you know about it.
Hi ,
I am not able to download the dependency using maven or sbt. It seems the jar is not available in maven central repository. Can someone please check this.
I'm trying to integrate with Sofort payment method using Hosted Checkouts on the sandbox environment. When I select Sofort payment, I expect a redirect to Sofort, but it instantly returns me to my page with a HTTP Code 500, payment status "REJECTED", error message: "Exception, invalid data" and error code: 15000960. I've tested my application with other redirect payment methods such as PayPal, iDEAL and it works fine.
Gives NPE when entry.getValue() = null;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.