mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
Merge pull request #997 from Adyen/fix/abort
[PW-7079] fix abort request localterminal API
This commit is contained in:
@@ -62,15 +62,19 @@ class TerminalLocalAPI extends ApiKeyAuthenticatedService {
|
||||
securedPaymentRequest
|
||||
);
|
||||
|
||||
const terminalApiSecuredResponse: TerminalApiSecuredResponse =
|
||||
ObjectSerializer.deserialize(jsonResponse, "TerminalApiSecuredResponse");
|
||||
// Catch an empty jsonResponse (i.e. Abort Request)
|
||||
if(!jsonResponse) {
|
||||
return new TerminalApiResponse();
|
||||
} else {
|
||||
const terminalApiSecuredResponse: TerminalApiSecuredResponse =
|
||||
ObjectSerializer.deserialize(jsonResponse, "TerminalApiSecuredResponse");
|
||||
|
||||
const response = this.nexoCrypto.decrypt(
|
||||
terminalApiSecuredResponse.SaleToPOIResponse,
|
||||
securityKey,
|
||||
);
|
||||
|
||||
return ObjectSerializer.deserialize(JSON.parse(response), "TerminalApiResponse");
|
||||
const response = this.nexoCrypto.decrypt(
|
||||
terminalApiSecuredResponse.SaleToPOIResponse,
|
||||
securityKey,
|
||||
);
|
||||
return ObjectSerializer.deserialize(JSON.parse(response), "TerminalApiResponse");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user