Shorten payment link reference_id
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:
@@ -94,7 +94,7 @@ class RazorpayPaymentLinksController(
|
|||||||
"description" to (request.description ?: "Booking $bookingId"),
|
"description" to (request.description ?: "Booking $bookingId"),
|
||||||
"notes" to notes,
|
"notes" to notes,
|
||||||
// Razorpay requires reference_id to be unique per active link
|
// 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 }
|
parseExpiryEpoch(request.expiryDate)?.let { payload["expire_by"] = it }
|
||||||
request.isPartialPaymentAllowed?.let { payload["partial_payment"] = it }
|
request.isPartialPaymentAllowed?.let { payload["partial_payment"] = it }
|
||||||
|
|||||||
Reference in New Issue
Block a user