Beispiel #1
0
 public ActionResult ReceivePaymentResponse(string MerchantTxnId, string GatewayTxnId)
 {
     ewallet.application.Models.OnePG.CommonResponse resp = MakeHttpRequest.InvokeCheckTransactionStatus("1", "anujApi", MerchantTxnId, "anujApi", "Anuj@123", "AnujSecert");
     if (resp.code == "0")
     {
         //check MerchantTxnId in our db,get detail  and print receipt
         var dbResponse = _iLoad.GetTransactionReposne(MerchantTxnId, GatewayTxnId);
         if (dbResponse.Code == 0)
         {
             var viewTransactionModel = ApplicationUtilities.MapObject <ViewTransactionReponseModel>(dbResponse.Data);
             return(View(viewTransactionModel));
         }
         else
         {
             return(RedirectToAction("Eror"));///remaining
         }
     }
     else
     {
         return(RedirectToAction("Eror"));///remaining
     }
 }
Beispiel #2
0
        public ActionResult ReceivePaymentNotification(string MerchantTxnId, string GatewayTxnId)
        {
            //check MerchantTxnId in our db first
            var dbRes = _iLoad.CheckTrnasactionExistence(MerchantTxnId, GatewayTxnId);

            if (dbRes.Code == 0)
            {
                ewallet.application.Models.OnePG.CommonResponse resp = MakeHttpRequest.InvokeCheckTransactionStatus("1", "anujApi", MerchantTxnId, "anujApi", "Anuj@123", "AnujSecert");
                if (resp.code == "0")
                {
                    var transactionModel       = ApplicationUtilities.MapObject <CheckTransactionResponse>(resp.data);
                    LoadBalanceCommon lBalance = new LoadBalanceCommon()
                    {
                        pmt_gateway_id     = "",
                        pmt_gateway_txn_id = GatewayTxnId,
                        gateway_status     = transactionModel.Status,
                        gateway_process_id = "",
                        action_user        = "******",
                        action_ip          = ApplicationUtilities.GetIP(),
                        bank_name          = transactionModel.Institution,
                        payment_mode       = transactionModel.Instrument,
                        pmt_txn_id         = MerchantTxnId
                    };
                    _iLoad.UpdateTransaction(lBalance);
                }
            }

            // then check if transaction is already updated by merchanttxnid and gatewaytxnid

            //if transaction exists or already received or txn not found
            //return "Received";


            //
            Response.Write("Received");
            Response.End();
            return(View());
        }