Payment payment = new Payment();
ManagedTxn tx = tm.manage(payment);
payment.putTranslated(AccountID.Destination, toAddress);
tx.once(ManagedTxn.OnSubmitSuccess.class, new ManagedTxn.OnSubmitSuccess() {
@OverRide
public void called(Response response) {
if (response.engineResult().equals(EngineResult.tesSUCCESS)) {
} else {
// Error
log.error("Id : " + id + " error : " + error);
}
}
});
--
tm.queue(tx);