-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Description
Well, the whole SDK is a mess. But the most annoying part is that the recommendation provided by your tech team in the docs is absolutely stupid. The doc says to use PayloadHelper, but the PayloadHelper doesn't pass the correct amount value.
val payloadHelper = PayloadHelper(currency, amount, orderId)
payloadHelper.name = name
payloadHelper.prefillEmail = userEmail
payloadHelper.prefillContact = userPhone
payloadHelper.prefillMethod = userPreferredMethod
payloadHelper.prefillName = userName
payloadHelper.sendSmsHash = true
payloadHelper.retryMaxCount = 4
payloadHelper.color = "#000000"
payloadHelper.backDropColor = "#ffffff"
payloadHelper.rememberCustomer = true
payloadHelper.modalConfirmClose = true
payloadHelper.hideTopBar = true
payloadHelper.image = logo
val json = payloadHelper.getJson()
checkout.open(this, json)
When using the above code, the amount is always set to 1. But if I update the JSON manually like below, it works fine.
val json = payloadHelper.getJson()
json.put("amount", amount)
So either you update the docs to use JSONobject and not PayloadHelper or fix it.
Razorpay SDK Version :
razorpay = "1.6.40"
Also, update your samples and SDK to support compose-based views. It's ridiculous that the checkout is bound to an activity through listeners.
Metadata
Metadata
Assignees
Labels
No labels