-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not decrypt saleToPOISecuredResponse #1430
Comments
Hi, yes Did you check the setup and recommendations in our Docs page? Can you also provide more detail about how you encrypt and send the request? Thank you. |
Have you set up a shared key in the customer area according to: https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/#set-up-shared-key
|
@gcatanese @Kwok-he-Chu i'm using Protect with a library with https://github.com/Adyen/adyen-java-api-library, i dont use Protect with your own code. i tried with this code but it still NULL
|
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. |
Any information on that? I have the exact same problem. In short: I have followed the documentation to implement in person payments using local communications. I am protecting my code using Adyen's API library (33.0.0) for java: I have gone through the relevant steps in the documentation so I have installed Adyen's certificates and setup a shared key and I am at the point where I want to add code to protect local communications. Here is how I create a service that returns a TerminalLocalApi object to be used in my requests:
I use this object to send requests directly to my (test) payment terminal:
However I am getting the exact same error that I can locate in Adyen's java library TerminalLocalAPI class (when debugging):
More specifically I can see that the jsonRequest is received correctly in the request method. For example:
and it's encrypted in nexoblob (jsonEncryptedRequest):
Then I am getting a jsonResponse with an error:
The code in the library crashes because the jsonResponse is not valid (can not handle this case):
since saleToPOISecuredResponse.nexoBlob is null. When I was trying to test without encryption I was also getting the same error. Any kind of insights about that? |
Actually I have found what was the issue in my case. The latest update in the terminal had failed, so it did not have the encryption key details. I updated the terminal and now I can receive the request in the terminal and successfully pay. |
Hi,
I'm using Terminal API through LAN communication to communicate with the terminal.
My code fails on this particular line 76 in TerminalLocalAPI.java because nexoBlob null
String jsonDecryptedResponse = nexoCrypto.decrypt(saleToPOISecuredResponse);
The error message (HTTP Exception) I receive is:
"Response":{"AdditionalResponse":"errors=At%20SaleToPOIRequest%2c%20field%20PaymentRequest%3a%20Missing¬e=Direct%20API%20REQUIRES%20payload%20crypto%20on%20live%2c%20cleartext%20allowed%20for%20testing%20only","ErrorCondition":"MessageFormat","Result":"Failure"},
please let me know why and how i can fix this error
The text was updated successfully, but these errors were encountered: