diff --git a/src/main/kotlin/com/android/trisolarisserver/controller/PayuPaymentLinksController.kt b/src/main/kotlin/com/android/trisolarisserver/controller/PayuPaymentLinksController.kt index 4960fb4..b7e38c1 100644 --- a/src/main/kotlin/com/android/trisolarisserver/controller/PayuPaymentLinksController.kt +++ b/src/main/kotlin/com/android/trisolarisserver/controller/PayuPaymentLinksController.kt @@ -107,10 +107,8 @@ class PayuPaymentLinksController( "viaEmail" to (request.viaEmail ?: false), "viaSms" to (request.viaSms ?: false) ) - body["successURL"] = request.successUrl?.trim()?.ifBlank { null } - ?: buildReturnUrl(propertyId, true) - body["failureURL"] = request.failureUrl?.trim()?.ifBlank { null } - ?: buildReturnUrl(propertyId, false) + request.successUrl?.trim()?.ifBlank { null }?.let { body["successURL"] = it } + request.failureUrl?.trim()?.ifBlank { null }?.let { body["failureURL"] = it } if (amountLong != null) { body["subAmount"] = amountLong } @@ -216,10 +214,6 @@ class PayuPaymentLinksController( } } - private fun buildReturnUrl(propertyId: UUID, success: Boolean): String { - val path = if (success) "success" else "failure" - return "https://api.hoteltrisolaris.in/properties/$propertyId/payu/return/$path" - } private fun computeExpectedPay(stays: List, timezone: String?): Long { if (stays.isEmpty()) return 0