如何在付款系统中创建付款页面? [英] How can I make a payment page in my payment system ?

查看:145
本文介绍了如何在付款系统中创建付款页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.





我尝试了什么:





What I have tried:

public class Transaction  
    {  
        [Key]  
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]  
        public int Id { get; set; }  
  
        //foreign key of eBankingUser  
        //hear userName will be assigned because GUID may not unique   
        [Required]  
        [Display(Name="User")]  
        public string UserId { get; set; }  
  
        //foreign key of transection table  
       // [Required]  
        public string OperationNumber { get; set; }  
  
                  
        [NotMapped]  
        public string CountryName { get; set; }  
  
        [NotMapped]  
        public string CurrencyISO { get; set; }  
  
        //[Required]  
        public int? PinId { get; set; }  
   //     public int? PinCode { get; set; }  
  
        //Local amount that is inserted to transfer or recharge or top up  
        public decimal? InsertedAmount { get; set; }  
  
        //USD  
        public decimal? AmountIN { get; set; }  
  
        //USD  
        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; }  
         
    }  
  
//Repository  
 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; /*ConstMessage.ConstFee_ID;*/  
                    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);  
                    //UserUpdate(fromUser);  
                    //UserUpdate(toUser);  
  
                    contextTransaction.Commit();  
                    return true;  
                }  
                catch (Exception)   
                {  
                    contextTransaction.Rollback();  
                }  
            }  
              
            return false;  
        }

推荐答案

永远不要接受来自未知网站的代码与真钱有关:你不知道来源,你不知道代码是做什么的,而且你会因疏忽使用这些代码而导致的任何损失承担个人责任 - 并且使用随机代码肯定会被视为疏忽,即使不是欺诈性的。



只能从您的支付网关公司获取此类代码:大多数都是有用的,并提供技术支持以帮助您启动和运行 - 只是因为他们在您上线之前没有获得报酬。 ..
Never accept code from unknown website for anything to do with real money: you don't know the source, you don't know what the code does, and you would be held personally responsible for any losses incurred by using such code negligently - and using random code would most certainly be seen as negligent, if not fraudulent.

Only get such code from your payment gateway company: most are helpful and have technical support to assist you to get up and running - if only because they don't get paid until you are online...


你的问题在解释这个项目的实体类型方面到处都是。



通常使用AspNet和MVC的eComm交易的唯一部分将是电子商务网站本身。他们的视图将收集表单信息并发送到Controller操作以验证模型,然后与支付网关通信。



支付网关的工作是采取行动作为电子商务网站和实际支付处理器之间的中介。这是由于安全协议基本上禁止eComm网站直接向付款处理方发送/接收交易细节。



支付处理器完成收集的主要工作交易信息,联系付款人银行,并将付款结算到商家帐户。



那么你是哪一部分?
Your question is kind of all over the place in explaining what type of entity this project is for.

Typically the only portion of eComm transactions that would utilize AspNet and MVC wold be the eCommerce website itself. Their View would collect the form information and send into a Controller action to validate the Model and then communicate with a Payment Gateway.

The job of the Payment Gateway is to act as a mediator between the eCommerce site and the actual Payment Processor. This is due to Security Protocols which basically forbid an eComm site to send/receive transaction details directly to the Payment Processor.

The Payment Processor does the major grunt work of collecting the transaction information, contacting the payers bank, and settling payment into the Merchant Account.

So which part are you?


这篇关于如何在付款系统中创建付款页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆