feature/scaRedirect url in create payment response

This commit is contained in:
Marko Milić 2025-01-13 09:57:49 +01:00
parent dc4f6d7377
commit 5dfb84f722
2 changed files with 4 additions and 3 deletions

View File

@ -793,6 +793,7 @@ display_internal_errors=false
# - decoupled
# In case that "psu_authentication_method = redirection" you must define
# psu_authentication_method_sca_redirect_url = redirect_url_value
# psu_make_payment_sca_redirect_url = redirect_url_value
# -------------------------------------------------------------- Authentication methods --
## This property is used for documenting at Resource Doc. It may include the port also (but not /obp)

View File

@ -632,8 +632,8 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats {
// Remark: This code may be
//map OBP transactionRequestId to BerlinGroup PaymentId
val paymentId = transactionRequest.id.value
val scaRedirectUrl = getPropsValue("psu_authentication_method_sca_redirect_url")
.openOr(MissingPropsValueAtThisInstance + "psu_authentication_method_sca_redirect_url")
val scaRedirectUrl = getPropsValue("psu_make_payment_sca_redirect_url")
.openOr(MissingPropsValueAtThisInstance + "psu_make_payment_sca_redirect_url")
InitiatePaymentResponseJson(
transactionStatus = transactionRequest.status match {
case "COMPLETED" => "ACCP"
@ -641,7 +641,7 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats {
},
paymentId = paymentId,
_links = InitiatePaymentResponseLinks(
scaRedirect = LinkHrefJson(s"$scaRedirectUrl/payments/$paymentId"),
scaRedirect = LinkHrefJson(s"$scaRedirectUrl/$paymentId"),
self = LinkHrefJson(s"/v1.3/payments/sepa-credit-transfers/$paymentId"),
status = LinkHrefJson(s"/v1.3/payments/$paymentId/status"),
scaStatus = LinkHrefJson(s"/v1.3/payments/$paymentId/authorisations/${paymentId}")