From 84561eb3a095b7d79b2dc45a2806c19eb140b9c1 Mon Sep 17 00:00:00 2001 From: Roman Strobl Date: Thu, 25 Jul 2019 20:23:10 +0200 Subject: [PATCH] Add default SCA operation names --- .../dataadapter/impl/service/SmsDeliveryService.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/impl/service/SmsDeliveryService.java b/powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/impl/service/SmsDeliveryService.java index 5976d97a..3bea4393 100644 --- a/powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/impl/service/SmsDeliveryService.java +++ b/powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/impl/service/SmsDeliveryService.java @@ -64,11 +64,13 @@ public AuthorizationCode generateAuthorizationCode(String userId, String organiz String operationName = operationContext.getName(); List 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(); @@ -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();