payuQR: use set instead add
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s
This commit is contained in:
@@ -144,32 +144,32 @@ class PayuQrPayments(
|
|||||||
)
|
)
|
||||||
|
|
||||||
val form = LinkedMultiValueMap<String, String>().apply {
|
val form = LinkedMultiValueMap<String, String>().apply {
|
||||||
add("key", settings.merchantKey)
|
set("key", settings.merchantKey)
|
||||||
add("txnid", txnid)
|
set("txnid", txnid)
|
||||||
add("amount", amount)
|
set("amount", amount)
|
||||||
add("productinfo", productInfo)
|
set("productinfo", productInfo)
|
||||||
add("firstname", firstname)
|
set("firstname", firstname)
|
||||||
add("email", email)
|
set("email", email)
|
||||||
add("phone", phone)
|
set("phone", phone)
|
||||||
add("surl", buildReturnUrl(propertyId, true))
|
set("surl", buildReturnUrl(propertyId, true))
|
||||||
add("furl", buildReturnUrl(propertyId, false))
|
set("furl", buildReturnUrl(propertyId, false))
|
||||||
add("pg", "DBQR")
|
set("pg", "DBQR")
|
||||||
add("bankcode", "UPIDBQR")
|
set("bankcode", "UPIDBQR")
|
||||||
add("hash", hash)
|
set("hash", hash)
|
||||||
add("udf1", udf1)
|
set("udf1", udf1)
|
||||||
add("udf2", udf2)
|
set("udf2", udf2)
|
||||||
add("udf3", udf3) // always
|
set("udf3", udf3) // always
|
||||||
add("udf4", udf4) // always
|
set("udf4", udf4) // always
|
||||||
add("udf5", udf5) // always
|
set("udf5", udf5) // always
|
||||||
add("txn_s2s_flow", "4")
|
set("txn_s2s_flow", "4")
|
||||||
val clientIp = request.clientIp?.trim()?.ifBlank { null }
|
val clientIp = request.clientIp?.trim()?.ifBlank { null }
|
||||||
?: extractClientIp(httpRequest)
|
?: extractClientIp(httpRequest)
|
||||||
?: throw ResponseStatusException(HttpStatus.BAD_REQUEST, "clientIp required")
|
?: throw ResponseStatusException(HttpStatus.BAD_REQUEST, "clientIp required")
|
||||||
val deviceInfo = request.deviceInfo?.trim()?.ifBlank { null }
|
val deviceInfo = request.deviceInfo?.trim()?.ifBlank { null }
|
||||||
?: throw ResponseStatusException(HttpStatus.BAD_REQUEST, "deviceInfo required")
|
?: throw ResponseStatusException(HttpStatus.BAD_REQUEST, "deviceInfo required")
|
||||||
add("s2s_client_ip", clientIp)
|
set("s2s_client_ip", clientIp)
|
||||||
add("s2s_device_info", deviceInfo)
|
set("s2s_device_info", deviceInfo)
|
||||||
add("expiry_time", expirySeconds.toString())
|
set("expiry_time", expirySeconds.toString())
|
||||||
request.address1?.trim()?.ifBlank { null }?.let { add("address1", it) }
|
request.address1?.trim()?.ifBlank { null }?.let { add("address1", it) }
|
||||||
request.address2?.trim()?.ifBlank { null }?.let { add("address2", it) }
|
request.address2?.trim()?.ifBlank { null }?.let { add("address2", it) }
|
||||||
request.city?.trim()?.ifBlank { null }?.let { add("city", it) }
|
request.city?.trim()?.ifBlank { null }?.let { add("city", it) }
|
||||||
|
|||||||
Reference in New Issue
Block a user