Merge pull request #32598 from ruthra-kumar/refactor_create_payment_ledger_function

refactor: split ple creation function into two