payuQR: use set instead add
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s

This commit is contained in:
androidlover5842
2026-01-30 12:59:20 +05:30
parent b4c119e8ad
commit 69e51deeca

View File

@@ -144,32 +144,32 @@ class PayuQrPayments(
)
val form = LinkedMultiValueMap<String, String>().apply {
add("key", settings.merchantKey)
add("txnid", txnid)
add("amount", amount)
add("productinfo", productInfo)
add("firstname", firstname)
add("email", email)
add("phone", phone)
add("surl", buildReturnUrl(propertyId, true))
add("furl", buildReturnUrl(propertyId, false))
add("pg", "DBQR")
add("bankcode", "UPIDBQR")
add("hash", hash)
add("udf1", udf1)
add("udf2", udf2)
add("udf3", udf3) // always
add("udf4", udf4) // always
add("udf5", udf5) // always
add("txn_s2s_flow", "4")
set("key", settings.merchantKey)
set("txnid", txnid)
set("amount", amount)
set("productinfo", productInfo)
set("firstname", firstname)
set("email", email)
set("phone", phone)
set("surl", buildReturnUrl(propertyId, true))
set("furl", buildReturnUrl(propertyId, false))
set("pg", "DBQR")
set("bankcode", "UPIDBQR")
set("hash", hash)
set("udf1", udf1)
set("udf2", udf2)
set("udf3", udf3) // always
set("udf4", udf4) // always
set("udf5", udf5) // always
set("txn_s2s_flow", "4")
val clientIp = request.clientIp?.trim()?.ifBlank { null }
?: extractClientIp(httpRequest)
?: throw ResponseStatusException(HttpStatus.BAD_REQUEST, "clientIp required")
val deviceInfo = request.deviceInfo?.trim()?.ifBlank { null }
?: throw ResponseStatusException(HttpStatus.BAD_REQUEST, "deviceInfo required")
add("s2s_client_ip", clientIp)
add("s2s_device_info", deviceInfo)
add("expiry_time", expirySeconds.toString())
set("s2s_client_ip", clientIp)
set("s2s_device_info", deviceInfo)
set("expiry_time", expirySeconds.toString())
request.address1?.trim()?.ifBlank { null }?.let { add("address1", it) }
request.address2?.trim()?.ifBlank { null }?.let { add("address2", it) }
request.city?.trim()?.ifBlank { null }?.let { add("city", it) }