Shorten payment link reference_id
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s

This commit is contained in:
androidlover5842
2026-02-01 16:08:44 +05:30
parent 5e8651d82f
commit b7a76a8daa

View File

@@ -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 }