public void QRCodeTransfer(string json) { QRCodeTransferTransaction tx = QRCodeTransferTransaction.FromJsonString(json); if (tx.Amount == 0) { throw new ValidationException("Invalid Amount"); } if (!Validate.GuidValidation(tx.AccountFrom)) { throw new ValidationException("Invalid AccountNumberFrom"); } if (!Validate.GuidValidation(tx.AccountTo)) { throw new ValidationException("Invalid AccountNumberTo"); } if (!Validate.GuidValidation(tx.TrackingId)) { throw new ValidationException("Invalid TrackingId"); } TransactionPM tpm = new TransactionPM() { Amount = tx.Amount, TransactionType = TransactionType.SendMoneyFromAppToCard, AccountNumberIdFromRef = tx.AccountFrom, AccountNumberIdToRef = tx.AccountTo, TrackingId = tx.TrackingId, }; _transactionRepository.AddQRCodeBasedTransaction(tpm, GetCurrentUserId()); }