Skip to content

Commit

Permalink
Add default SCA operation names
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Jul 25, 2019
1 parent c62cd25 commit 84561eb
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ public AuthorizationCode generateAuthorizationCode(String userId, String organiz
String operationName = operationContext.getName();
List<String> digestItems = new ArrayList<>();
switch (operationName) {
case "login": {
case "login":
case "login_sca": {
digestItems.add(operationName);
break;
}
case "authorize_payment": {
case "authorize_payment":
case "authorize_payment_sca": {
AmountAttribute amountAttribute = operationValueExtractionService.getAmount(operationContext);
String account = operationValueExtractionService.getAccount(operationContext);
BigDecimal amount = amountAttribute.getAmount();
Expand Down Expand Up @@ -105,11 +107,13 @@ public String generateSmsText(String userId, String organizationId, OperationCon
String operationName = operationContext.getName();
String[] messageArgs;
switch (operationName) {
case "login": {
case "login":
case "login_sca": {
messageArgs = new String[]{authorizationCode.getCode()};
break;
}
case "authorize_payment": {
case "authorize_payment":
case "authorize_payment_sca": {
AmountAttribute amountAttribute = operationValueExtractionService.getAmount(operationContext);
String account = operationValueExtractionService.getAccount(operationContext);
BigDecimal amount = amountAttribute.getAmount();
Expand Down

0 comments on commit 84561eb

Please sign in to comment.