I am working on
an payment system using mvc 5, And i almost finished a large part of the work such as
the transfer of funds and the proportion of fees, etc.
But I'm having a problem now -
the payment page for purchases from e-commerce sites,
And how a system api receives
information from the customer, such as the price and account, and the name of
merchant , That is, when the customer moves from the shopping cart to the
payment page directly and the purchase
information is converted to the payment confirmation page,
I tried to convert url
information to the payment confirmation page but I did not succeed, and I hope
to find help or code source mvc5 with it
and how to secure that page the transfer of this information.
- public class Transaction
- {
- [Key]
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; set; }
-
-
-
- [Required]
- [Display(Name="User")]
- public string UserId { get; set; }
-
-
-
- public string OperationNumber { get; set; }
-
-
- [NotMapped]
- public string CountryName { get; set; }
-
- [NotMapped]
- public string CurrencyISO { get; set; }
-
-
- public int? PinId { get; set; }
-
-
-
- public decimal? InsertedAmount { get; set; }
-
-
- public decimal? AmountIN { get; set; }
-
-
- public decimal? AmountOut { get; set; }
-
-
- public int? RatePlanId { get; set; }
-
- public int? Status { get; set; }
-
- public DateTime? TransactionDate { get; set; }
-
-
- [Display(Name = "Recepient User")]
- public string ToUser { get; set; }
-
- public string FromUser { get; set; }
-
- public DateTime? UpdateDate { get; set; }
-
- public string Remarks { get; set; }
-
- [NotMapped]
- public string ServiceName { get; set; }
-
-
- [Display(Name="Reference")]
- public string ReferenceId { get; set; }
-
- [NotMapped]
- public bool IsCheck { get; set; }
- public DateTime? TimeOut { get; set; }
- public bool IsTimeOut { get; set; }
- public int ClientId { get; set; }
- public int VendorId { get; set; }
- public decimal? UserBalance { get; set; }
-
- }
-
-
- public bool CreditTransferDbEntry(Transaction tIn, Transaction tOut, string fromUser, string toUser)
- {
- ITransactionRepository transaction_repo = new TransactionRepository(db);
- using(var contextTransaction = db.Database.BeginTransaction())
- {
- try
- {
- var fee = tren_rep.GetById(1).MRP;
- tOut.UserBalance = transaction_repo.UserBalanceUpdate(fromUser, -(decimal)tOut.AmountOut);
- transaction_repo.Add(tOut);
- tIn.UserBalance = transaction_repo.UserBalanceUpdate(toUser, (decimal)tOut.AmountOut - ((decimal)tOut.AmountOut * ((decimal)fee /100)));
- transaction_repo.Add(tIn);
-
-
-
- contextTransaction.Commit();
- return true;
- }
- catch (Exception)
- {
- contextTransaction.Rollback();
- }
- }
-
- return false;
- }