示例#1
0
 public int Add(string EncryptedString, out string TrasactionID)
 {
     TrasactionID = string.Empty;
     try
     {
         PaymentGatewayTransactionsCoreEntity objPaymentGatewayTransactionsCoreEntity = new PaymentGatewayTransactionsCoreEntity();
         using (objPaymentGatewayTransactionsCoreEntity as IDisposable)
         {
             getPaymentGatewayTransactionsCoreEntity(EncryptedString, ref objPaymentGatewayTransactionsCoreEntity);
             PaymentGatewayTransactionsModel objPaymentGatewayTransactionsModel = new PaymentGatewayTransactionsModel();
             using (objPaymentGatewayTransactionsModel as IDisposable)
             {
                 AssignModelFromEntity(ref objPaymentGatewayTransactionsCoreEntity, ref objPaymentGatewayTransactionsModel);
                 IUnitOfWork objIUnitOfWorkAdd = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                 using (objIUnitOfWorkAdd as IDisposable)
                 {
                     objIUnitOfWorkAdd.RepositoryPaymentGatewayTransactions.Add(objPaymentGatewayTransactionsModel);
                     objIUnitOfWorkAdd.commit();
                     TrasactionID = objPaymentGatewayTransactionsCoreEntity.TransactionID;
                 }
                 objIUnitOfWorkAdd = null;
             }
             objPaymentGatewayTransactionsModel = null;
         }
         PaymentProfileTransactionsCore objPaymentProfileTransactionsCore = new PaymentProfileTransactionsCore(_objLoggedInUser);
         using (objPaymentProfileTransactionsCore as IDisposable)
         {
             objPaymentProfileTransactionsCore.Add(ref objPaymentGatewayTransactionsCoreEntity);
         }
         objPaymentProfileTransactionsCore       = null;
         objPaymentGatewayTransactionsCoreEntity = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
示例#2
0
 private int AssignModelFromEntity(
     ref PaymentGatewayTransactionsCoreEntity objPaymentGatewayTransactionsEntity,
     ref PaymentGatewayTransactionsModel objPaymentGatewayTransactionsModel
     )
 {
     try
     {
         objPaymentGatewayTransactionsModel.Amount          = objPaymentGatewayTransactionsEntity.Amount;
         objPaymentGatewayTransactionsModel.BankRefNo       = objPaymentGatewayTransactionsEntity.BankRefNo;
         objPaymentGatewayTransactionsModel.BillingAddress  = objPaymentGatewayTransactionsEntity.BillingAddress;
         objPaymentGatewayTransactionsModel.BillingCity     = objPaymentGatewayTransactionsEntity.BillingCity;
         objPaymentGatewayTransactionsModel.BillingCountry  = objPaymentGatewayTransactionsEntity.BillingCountry;
         objPaymentGatewayTransactionsModel.BillingEmail    = objPaymentGatewayTransactionsEntity.BillingEmail;
         objPaymentGatewayTransactionsModel.BillingName     = objPaymentGatewayTransactionsEntity.BillingName;
         objPaymentGatewayTransactionsModel.BillingNotes    = objPaymentGatewayTransactionsEntity.BillingNotes;
         objPaymentGatewayTransactionsModel.BillingState    = objPaymentGatewayTransactionsEntity.BillingState;
         objPaymentGatewayTransactionsModel.BillingTel      = objPaymentGatewayTransactionsEntity.BillingTel;
         objPaymentGatewayTransactionsModel.BillingZip      = objPaymentGatewayTransactionsEntity.BillingZip;
         objPaymentGatewayTransactionsModel.BinCountry      = objPaymentGatewayTransactionsEntity.BinCountry;
         objPaymentGatewayTransactionsModel.CardName        = objPaymentGatewayTransactionsEntity.CardName;
         objPaymentGatewayTransactionsModel.CreatedBy       = objPaymentGatewayTransactionsEntity.CreatedBy;
         objPaymentGatewayTransactionsModel.CreatedDate     = objPaymentGatewayTransactionsEntity.CreatedDate;
         objPaymentGatewayTransactionsModel.Currency        = objPaymentGatewayTransactionsEntity.Currency;
         objPaymentGatewayTransactionsModel.DeliveryAddress = objPaymentGatewayTransactionsEntity.DeliveryAddress;
         objPaymentGatewayTransactionsModel.DeliveryCity    = objPaymentGatewayTransactionsEntity.DeliveryCity;
         objPaymentGatewayTransactionsModel.DeliveryCountry = objPaymentGatewayTransactionsEntity.DeliveryCountry;
         objPaymentGatewayTransactionsModel.DeliveryName    = objPaymentGatewayTransactionsEntity.DeliveryName;
         objPaymentGatewayTransactionsModel.DeliveryState   = objPaymentGatewayTransactionsEntity.DeliveryState;
         objPaymentGatewayTransactionsModel.DeliveryTel     = objPaymentGatewayTransactionsEntity.DeliveryTel;
         objPaymentGatewayTransactionsModel.DeliveryZip     = objPaymentGatewayTransactionsEntity.DeliveryZip;
         objPaymentGatewayTransactionsModel.DiscountValue   = objPaymentGatewayTransactionsEntity.DiscountValue;
         objPaymentGatewayTransactionsModel.ECIValue        = objPaymentGatewayTransactionsEntity.ECIValue;
         objPaymentGatewayTransactionsModel.EncryptedText   = objPaymentGatewayTransactionsEntity.EncryptedText;
         objPaymentGatewayTransactionsModel.DecryptedText   = objPaymentGatewayTransactionsEntity.DecryptedText;
         objPaymentGatewayTransactionsModel.FailureMessage  = objPaymentGatewayTransactionsEntity.FailureMessage;
         objPaymentGatewayTransactionsModel.TransactionID   = objPaymentGatewayTransactionsEntity.TransactionID;
         objPaymentGatewayTransactionsModel.MerAmount       = objPaymentGatewayTransactionsEntity.MerAmount;
         objPaymentGatewayTransactionsModel.MerchantParam1  = objPaymentGatewayTransactionsEntity.MerchantParam1;
         objPaymentGatewayTransactionsModel.MerchantParam2  = objPaymentGatewayTransactionsEntity.MerchantParam2;
         objPaymentGatewayTransactionsModel.MerchantParam3  = objPaymentGatewayTransactionsEntity.MerchantParam3;
         objPaymentGatewayTransactionsModel.MerchantParam4  = objPaymentGatewayTransactionsEntity.MerchantParam4;
         objPaymentGatewayTransactionsModel.MerchantParam5  = objPaymentGatewayTransactionsEntity.MerchantParam5;
         objPaymentGatewayTransactionsModel.OfferCode       = objPaymentGatewayTransactionsEntity.OfferCode;
         objPaymentGatewayTransactionsModel.OfferType       = objPaymentGatewayTransactionsEntity.OfferType;
         objPaymentGatewayTransactionsModel.OrderID         = objPaymentGatewayTransactionsEntity.OrderID;
         objPaymentGatewayTransactionsModel.OrderStatus     = objPaymentGatewayTransactionsEntity.OrderStatus;
         objPaymentGatewayTransactionsModel.PaymentMode     = objPaymentGatewayTransactionsEntity.PaymentMode;
         objPaymentGatewayTransactionsModel.ResponseCode    = objPaymentGatewayTransactionsEntity.ResponseCode;
         objPaymentGatewayTransactionsModel.Retry           = objPaymentGatewayTransactionsEntity.Retry;
         objPaymentGatewayTransactionsModel.StatusCode      = objPaymentGatewayTransactionsEntity.StatusCode;
         objPaymentGatewayTransactionsModel.StatusMessage   = objPaymentGatewayTransactionsEntity.StatusMessage;
         objPaymentGatewayTransactionsModel.TrackingID      = objPaymentGatewayTransactionsEntity.TrackingID;
         objPaymentGatewayTransactionsModel.TranDate        = objPaymentGatewayTransactionsEntity.TranDate;
         objPaymentGatewayTransactionsModel.TransactionID   = objPaymentGatewayTransactionsEntity.TransactionID;
         objPaymentGatewayTransactionsModel.Vault           = objPaymentGatewayTransactionsEntity.Vault;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }