Contract A has a Payable Method and contract B has ContractRef of A saved in storage. I can call other methods on Contract A but not sure how to call the payable method from Contract B. Tried with call builder as well like this :
build_call::<DefaultEnvironment>()
.call_type(
Call::new()
.callee(contractBRef.get_account())
.gas_limit(0)
.transferred_value(amount))
.exec_input(
ExecutionInput::new(Selector::new([0xDE, 0xAD, 0xBE, 0xEF]))
.push_arg::<AccountId>(candidate)
.push_arg::<u128>(0)
.push_arg::<u128>(amount)
.push_arg::<u128>(0)
.push_arg::<u128>(100)
).call_flags(CallFlags::default()).returns::<Result<()>>().unwrap()
But the call is returning CalleeTrapped Error.