From b7a76a8daafe839df5d3c4bfde365d4740e45512 Mon Sep 17 00:00:00 2001 From: androidlover5842 Date: Sun, 1 Feb 2026 16:08:44 +0530 Subject: [PATCH] Shorten payment link reference_id --- .../controller/RazorpayPaymentLinksController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt b/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt index 4892da8..083d769 100644 --- a/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt +++ b/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt @@ -94,7 +94,7 @@ class RazorpayPaymentLinksController( "description" to (request.description ?: "Booking $bookingId"), "notes" to notes, // Razorpay requires reference_id to be unique per active link - "reference_id" to "${bookingId}-${OffsetDateTime.now().toEpochSecond()}" + "reference_id" to "bk_${bookingId.toString().replace("-", "").take(12)}_${OffsetDateTime.now().toEpochSecond()}" ) parseExpiryEpoch(request.expiryDate)?.let { payload["expire_by"] = it } request.isPartialPaymentAllowed?.let { payload["partial_payment"] = it }