Beispiel #1
0
        public async Task <IActionResult> MakeDeposit(MakeDepositPaymentTransactionVM makeDepositPaymentTransaction)
        {
            try
            {
                await _paymentTransactionService.MakeDepositPaymentTransaction(makeDepositPaymentTransaction.UniqueMasterCitizenNumber, makeDepositPaymentTransaction.Password, makeDepositPaymentTransaction.Amount);

                return(RedirectToAction(nameof(MyPaymentTransactions),
                                        new { password = makeDepositPaymentTransaction.Password, uniqueMasterCitizenNumber = makeDepositPaymentTransaction.UniqueMasterCitizenNumber }));
            }
            catch (Exception e)
            {
                ViewData["Error"] = e.Message;
                return(View(makeDepositPaymentTransaction));
            }
        }
Beispiel #2
0
        public async Task <IActionResult> MakeDeposit(string password, string uniqueMasterCitizenNumber)
        {
            MakeDepositPaymentTransactionVM makeDepositPaymentTransactionVM;

            try
            {
                WalletDTO wallet = await _walletService.GetWalletByUniqueMasterCitizenNumberAndPassword(uniqueMasterCitizenNumber, password);

                makeDepositPaymentTransactionVM = new MakeDepositPaymentTransactionVM(wallet.CurrentAmount, uniqueMasterCitizenNumber, password, "", true);
                return(View(makeDepositPaymentTransactionVM));
            }
            catch (Exception)
            {
                makeDepositPaymentTransactionVM = new MakeDepositPaymentTransactionVM(0, uniqueMasterCitizenNumber, password, "Enter valid unique master citizen number and password", false);
                return(View(makeDepositPaymentTransactionVM));
            }
        }