adyen / adyen-java-api-library Goto Github PK
View Code? Open in Web Editor NEWAdyen API Library for Java
License: MIT License
Adyen API Library for Java
License: MIT License
Library version: 2.0.0
Description
In the DefaultPaymentMethodDetails.java file, deliveryAddress, billingAddress, and personalDetails are listed as attributes of the paymentMethod object. However, you can't make a /payments call with deliveryAddress or billingAddress nested inside of the paymentMethod object (they aren't parsed by Adyen). Additionally, I don't know what the personalDetails field is, but it is not mentioned anywhere in the documentation or in our API explorer.
Java version: 1.8
Library version: 1.5.4
Description
Dear friends,
I want to integrate the Adyen Java library in my project.We use it in IOS and Android system,but I need to do some work for purpose of encapsulation.Such as get the payment methods of my account and response it to the front end.When I want to simulate to test the payment endpoint, I always make some mistakes suck as
Exception in thread "main" ApiException{error=class ApiError {
status: 422
errorCode: 174
message: Unable to decrypt data
errorType: validation
pspReference: null
}, statusCode=422, message=HTTP Exception}
at com.adyen.service.Resource.request(Resource.java:61)
at com.adyen.service.Checkout.payments(Checkout.java:61)
at com.xxx.pay.service.AdyenService.payment(AdyenService.java:117)
at com.xxx.pay.service.AdyenService.main(AdyenService.java:144)
How can I do to settle this problem?
My code is as follows:
request.setPaymentMethod(new HashMap<String, String>());
request.putPaymentMethodItem("type", "scheme");
request.putPaymentMethodItem("encryptedCardNumber", "6771 7980 2500 0004");
request.putPaymentMethodItem("encryptedExpiryMonth", "10");
request.putPaymentMethodItem("encryptedExpiryYear", "2020");
request.putPaymentMethodItem("encryptedSecurityCode", "737");
Best regards.
Java version: 1.7.0_80
Library version: 1.3.0
Description
We are using com.adyen.Util.Util#implode method for making the notification signing string.
But we found that if any element of the list is null, it adds null
string instead of adding empty string.
Java version: 1.8
Library version: 1.8.0
Description
As per Checkout API for v40 documentation (https://docs.adyen.com/api-explorer/#/PaymentSetupAndVerificationService/payments), possible values for /payments response resultCode are:
In fact com.adyen.model.checkout.PaymentsResponse.ResultCodeEnum is missing "Pending" and
has an extra value "PartiallyAuthorised" which is not documented
Hello,
I think this line does nothing:
Best
Hi, thank you for the library but I also would be very thankful if you can add a sample project where we can try to use it.
I created the sample project myself https://github.com/stokito/adyen-java-sample
There is some examples how to Create Market Account Holder and some related staff.
Could you please add it to Adyen repository?
The date format pattern is wrong in above line!
The correct pattern should be "YYYY-MM-dd'T'HH:mm:ss.sss'Z'"
How to store the credit card on your end and how to configure the payouts service?
com.adyen.model.TokenDetails#tokenData is defined as String. But in response there is an object.
"tokenData": {
"EmailId": "bla-bla",
"PayPal.PayerId": "bla-bla",
"BillingAgreementId": "bla-bla"
}
Java version: 1.8.0_44
Library version: 2.4.1
Description
Hi,
As per documentation for Basket content fields each "riskdata.basket.item" is a container object which should be serialized to JSON.
The "additionalData" member of com.adyen.model.checkout.PaymentsRequest is defined as Map<String, String>. There is no way to pass the Object to "additionalData" map value. The workaround is to serialize custom POJO to JSON string and then pass it as a map value to "additionalData".
It would be good to have the option to provide POJO as a value to "additionalData" (assuming POJO is properly annotated).
Thanks
https://docs.adyen.com/development-resources/currency-codes/
Please update the library and/or documentation so that they are in sync
Java version: 8
Library version: 2.4.1
Description
Hi Team;
It appears that the "merchantName" value is missing from the com.adyen.model / ThreeDS2RequestData object, as per the documentation
Is this intentional?
Library version: 1.8.0
Description
equals
method.Library version: 2.5.0
Description
To better integrate with the drop-in solution, there should be a DefaultPaymentMethodDetails constructor that take in the properly formatted paymentMethod object outputted as the state of the drop-in component.
Currently, it seems like the merchant has to implement the logic of parsing the paymentMethod object and constructing a well-formatted DefaultPaymentMethodDetails object. However, this logic seems generic across all drop-in integrations and should be included in the SDK by default.
Can we use the "Map<String,String>" for "metadata" field definition instead of "String" at "com.adyen.model.AbstractPaymentRequest" (like it is for "additionalData" field)?
Allow skinCode, merchantAccount, hmacKey in the request so you can use the same server and use different merchantAccounts and skins.
Hey there :) We would like to use this dependency in a project; but I see that there is no release in the central repository. Would you mind releasing it?
Hello,
When I try to use RecurringDetailsResult object to getting result of recurring.listRecurringDetails(recurringDetailsRequest) i got next error :
com.google.gson.JsonSyntaxException: 2017-07-13T10:15:30+02:00
java.text.ParseException: Unparseable date: "2017-07-13T10:15:30+02:00"
It is raised in com.adyen.service.Recurring class in line :
RecurringDetailsResult result = (RecurringDetailsResult)GSON.fromJson(jsonResult, (new TypeToken<RecurringDetailsResult>() {
}).getType());
Java version: 1.8
Library version: 1.5.2
Description
Support for adding Idempotency-Key via Java API for all POST Requests made to adyen.
Needed for our (Adobe) integration with Adyen.
Java version: 1.8.0_144
Library version: 2.2.0
Description
After making the upgrade from version 2.0.1 to 2.2.0, I noticed that AbstractModificationRequest is missing the method:
public T applicationInfo(ApplicationInfo applicationInfo)
Having such method (or simply a setter) would bring the following benefits:
Thanks
Please consider Terminal API communications to this library
#189 updated RecurringProcessingModel enum but the UnscheduledCardOnFile
is still missing in https://github.com/Adyen/adyen-java-api-library/blob/develop/src/main/java/com/adyen/model/PaymentRequest.java#L70-L85
According to support both APIs should support this value.
Using cancel_or_refund request from the logs it is not clear that this is triggered because it is using the cancelRequest model. Create a separate CancelOrRefund model.
Java version: 1.8
Library version: 2.0.0
Description
I want to send the device fingerprint with the PaymentRequest as shown here https://docs.adyen.com/risk-management/device-fingerprinting.
But the library doesn't appear to support this. Is there any reason? will it support in the future?
toString method is misleading. It writes additionalData against applicationInfo details. See defect line below.
Java version:1.8.0
Library version:All
Description
The model RecurringDetailResult does not have invalidOneclickContracts while this is in the response of the API
Java version: 8
Description
After building and running code , there is no successful response from server, I’m using a test account of the Adyen. I could use setup payment and verify payment APIs in both of java and the Golang code and certainly in the Postman application.
But all of the ThirdPartyPayment and also AccountHolder related APIs are returning 403, forbidden security error code.
In addition I am using the ClientToken as x-api-key in the requests header, without it I see 401-Unauthorized error code. I tried with basic authentication method and failed again.
Please help me to resolve these issues, I appreciate you.
Java version: 1.8.0_202
Library version: 1.7.0
Description
I need to make a SEPA direct debit payment request.
com.adyen.model.PaymentRequest
.sepa.ibanNumber
) in a generic way w/ this library?Thanks for your advice.
Hello,
HostedPaymentPages.getPostParametersFromDLRequest is incomplete. Missing arguments:
And sessionValidity could have a fallback with Util.calculateSessionValidity()
Regards
Java version: 1.8.0
Library version: 2.0.0
Description
log4j:log4j:1.2.17 dependency is not used. Please remove it, because we are getting this dependency transitively if we don't exclude it.
Java version: 1.8
Library version: 1.6.0
Description
Where I can have the error codes from the responses, like on the documentation:
https://docs.adyen.com/developers/marketpay/marketpay-error-codes
or
https://docs.adyen.com/developers/point-of-sale/testing-pos-payments/test-acquirer-responses
you can send payout together with oneclick and recurring. Add this possibilities into the enum.
Java version: 10.0.2
Library version: 2.0.2
Description
In the API integration documentation (https://docs.adyen.com/developers/checkout/api-integration#step1getavailablepaymentmethods) the following Java code statement (second to last line in code block) gives a "Cannot resolve symbol" warning:
paymentMethodsRequest.setChannel(CheckoutChannel.Web);
I have replaced it with:
paymentMethodsRequest.setChannel(PaymentMethodsRequest.ChannelEnum.WEB);
Could this be an issue of deprecated documentation? Thanks!
I'm getting HTTP Exception when running the example outlined here: https://github.com/Adyen/adyen-java-sample-code/blob/master/src/com/adyen/examples/api/Library/CreatePaymentAPI.java
Any ideas why?
Java version: 11.0.1
Library version: 2.5.0
Description
Add 'paymentMethod' to 'src/main/java/com/adyen/model/checkout/PaymentResultResponse.java'
If the payment is successful, the details are stored, and the recurringDetailReference is created. how can i get this recurringDetailReference. i think it will send back with response, anyone please help me to do this. please reply me back with sample java code for this. Thank you..
Java version: 1.8.0_162
Library version: 2.6.1
Description
I just realized that in our logs there are not appearing our requests params
I think the bug could be introduced in this commit, when the super.toString() sentence was removed
16ed51d#diff-6a97b0609fd25935f8dc3b1d305771b4L347
Now, the only logs we have are these:
{
accountInfo: null
bankAccount: null
card: null
merchantRiskIndicator: null
mpiData: null
recurringProcessingModel: null
splits: null
store: null
trustedShopper: null
threeDS2RequestData: null
}
Java version: 1.8.0
Library version: 1.7.0
Description
The GetAccountHolderRequest.java in the MarketPay API should have a Boolean showDetails according to the API documentation.
https://docs.adyen.com/api-explorer/#/Account/v4/getAccountHolder
Java version: 1.8.0_144
Library version: 2.2.0
Description
When com.adyen.model.checkout.PaymentsRequest is serialized to JSON, the accountCreationDate and accountChangeDate fields of com.adyen.model.AccountInfo are not serialized properly and the status 500 is retuned by /payments endpoint.
Raw request:
{
"accountInfo":{
"accountChangeDate":"2019-04-25",
"accountCreationDate":"Apr 25, 2019 4:10:07 PM"
},
...
}
Raw response:
{
"status": 500,
"errorCode": "702",
"message": "Failed to serialize node Invalid date (year)",
"errorType": "validation"
}
In fact, there are two issues with AccountInfo:
Date when the shopper's account was last changed.
Format: ISO 8601 YYYY-MM-DDThh:mm:ssTZD
Sample: 2017-07-17T13:42:40+01:00
It would be great if this issue could be fixed soon.
Nowadays library is stateful:
HttpURLConnectionClient.createRequest saves state at httpConnection.
This stateful causes a bad testing uses for API clients. If this class was stateless (minor changes), we can make a singleton wrapper with spring, improving the tests.
Java version: 1.8
Library version: 2.0.1
Description
Similar to #154, the checkout payment result API documentation indicates a possible status Pending
.
The enum PaymentResultResponse.ResultCodeEnum
is missing this value though it is already present in the apidoc.
It does have an additional status PartiallyAuthorised
.
Java version: 1.8.x
Library version: 1.7.0
Description
Please add methods equals and hashCode to class com.adyen.model.checkout.DefaultPaymentMethodDetails. It was convenient to verify correctness of request created by application logic in tests.
Thanks,
Alex
I could only find 1.3 version on Maven Central, not 1.4
Java version: 1.8
Library version: 2.0.0
Description
PaymentResultResponse and PaymentRequest has a possible NullPointerException if we call to
putAdditionalDataItem or putMetadataItem without calling first to additionalData or metadata
Java version: 1.8
Library version: 1.5.2
GSON date conversion issue
listRecurringDetails request not able to convert the Date format
com.google.gson.JsonSyntaxException: 2018-09-25T13:25:37+02:00
at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81)
at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66)
at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:761)
at com.google.gson.Gson.fromJson(Gson.java:710)
at com.adyen.service.Recurring.listRecurringDetails(Recurring.java:59)
Java version: 1.8.0
Library version: 2.4.1
Description
BrowserInfo is not being displayed whitin PaymentsRequest's toString method
Java version: 1.8.0
Library version: 2.0.0
Description
For 3D Secure 2.0 with classic API as described in https://docs.adyen.com/developers/3d-secure-2-classic-integration/browser-based-integration, in com.adyen.model.PaymentResult are missing ENUMS for IdentifyShopper and ChallengeShopper. Currently, we are getting resultCode "NULL".
Request (shortened)
final Payment payment = new Payment(getClient());
final PaymentResult result = payment.authorise(getPaymentRequest());
Response JSON:
{"additionalData":{"expiryDate":"8\/2018","threeds2.threeDSServerTransID":"XXXXXX","cardSummary":"1234","paymentMethod":"mc","threeds2.threeDS2Token":"XXXXXX","threeds2.threeDSMethodURL":"https:\/\/pal-test.adyen.com\/threeds2simulator\/acs\/startMethod.shtml"},"fraudResult":{"accountScore":61,"results":[…]},"pspReference":"XXXXXX","resultCode":"IdentifyShopper"}
Response Java after GSON mapping:
class PaymentResult { authCode: null paRequest: null issuerUrl: null md: null dccAmount: null dccSignature: null pspReference: XXXXXX resultCode: null additionalData: {expiryDate=8/2018, threeds2.threeDSServerTransID=XXXXXX cardSummary=1234, paymentMethod=mc, threeds2.threeDS2Token=XXXXXX, threeds2.threeDSMethodURL=https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml} refusalReason: null fraudResult: class FraudResult { […] }] } }
Java version: 1.8
Library version: 2.4.1
Description
I am referring to support request #850193.
The class PaymentMethodsResponse
has list attributes which are initialized using the value null
.
This is a problem when the response does not contain i.e. oneClickPaymentMethods
. When passing PaymentMethodsResponse
to the frontend, more specifically to adyen.js, a TypeError is thrown.
adyen.js:4 Uncaught TypeError: Cannot read property 'filter' of null
at Vc (adyen.js:4)
at new e (adyen.js:4)
at new e (adyen.js:4)
Please consider initializing list attributes with an empty list.
Java version: 1.8.x
Library version: 2.1.0
Description
The resultCode AuthenticationFinished
is not present in PaymentResult.ResultCodeEnum
for mapping when a completed 3DS challenge is submitted to /authorise3ds2
with the authenticationOnly
flag set.
// Request
{
"threeDS2Result": {
"transStatus": "Y"
},
"threeDS2Token": "-",
"merchantAccount": "-",
"applicationInfo": {
"adyenLibrary": {
"name": "adyen-java-api-library",
"version": "2.1.0"
}
}
}
// Response
{
"additionalData": {
"threeds2.threeDS2Result.dsTransID": "-",
"threeds2.threeDS2Result.eci": "05",
"threeds2.threeDS2Result.threeDSServerTransID": "-",
"threeds2.threeDS2Token": "-",
"threeds2.threeDS2Result.authenticationValue": "-",
"threeds2.threeDS2Result.transStatus": "Y"
},
"pspReference": "-",
"resultCode": "AuthenticationFinished"
}
Hello,
Is there a way to retrieve the payment details given the PSPReference?
Thank you
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.