Skip to content

Commit

Permalink
Updated status validation in oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-m committed Sep 13, 2017
1 parent 1bcfbd1 commit 36c10d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var errorJson = {};
errorJson.isError = false;
errorJson.errorResponseCode = 400;
errorJson.errorDescription = "accountRequest/paymentRequest is already authorised";
if ((type !== null && type !== "" && (type == "accounts" || type == "payments" )) && (requestContent && requestContent.Data && requestContent.Data.Status != "Pending")) {
if ((type !== null && type !== "" && (type == "accounts" || type == "payments" )) && (requestContent && requestContent.Data && !(requestContent.Data.Status == "Pending" || requestContent.Data.Status == "AwaitingAuthentication"))) {
errorJson.isError = true;
}
context.setVariable("isError", errorJson.isError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var errorJson = {};
errorJson.isError = false;
errorJson.errorResponseCode = 400;
errorJson.errorDescription = "accountRequest/paymentRequest is already authorised";
if ((type !== null && type !== "" && (type == "accounts" || type == "payments" )) && (requestContent && requestContent.Data && requestContent.Data.Status == "Authorised")) {
if ((type !== null && type !== "" && (type == "accounts" || type == "payments" )) && (requestContent && requestContent.Data && !(requestContent.Data.Status == "Pending" || requestContent.Data.Status == "AwaitingAuthorisation"))) {
errorJson.isError = true;
}
context.setVariable("isError", errorJson.isError);
Expand Down

0 comments on commit 36c10d4

Please sign in to comment.