How about some helper methods that take in only the arguments required to build payload and simply return the payload object? This would be a much better approach when we consider building a more helpful example that would scale easily in real apps.
fun getNetBankingPayload(...) : JSONObject {}
fun getWalletPayload(...) : JSONObject {}
How about some helper methods that take in only the arguments required to build payload and simply return the payload object? This would be a much better approach when we consider building a more helpful example that would scale easily in real apps.
Happy to elaborate more if you'd like.