Exemplo n.º 1
0
 private int AssignProfileTransactionFromGatewayTransaction
 (
     ref PaymentGatewayTransactionsCoreEntity objPaymentGatewayTransactionsCoreEntity,
     ref PaymentProfileTransactionsCoreEntity objPaymentProfileTransactionsCoreEntity
 )
 {
     try
     {
         objPaymentProfileTransactionsCoreEntity.CreatedBy          = _objLoggedInUser.LoginID;
         objPaymentProfileTransactionsCoreEntity.CreatedDate        = DateTime.Now;
         objPaymentProfileTransactionsCoreEntity.PaymentAmount      = objPaymentGatewayTransactionsCoreEntity.MerAmount;
         objPaymentProfileTransactionsCoreEntity.PaymentDate        = objPaymentGatewayTransactionsCoreEntity.TranDate;
         objPaymentProfileTransactionsCoreEntity.PaymentFor         = objPaymentGatewayTransactionsCoreEntity.MerchantParam2;
         objPaymentProfileTransactionsCoreEntity.PaymentMode        = Constants.MEMBERSHIPONLINEPAYMENT;
         objPaymentProfileTransactionsCoreEntity.PaymentNotes       = objPaymentGatewayTransactionsCoreEntity.MerchantParam3;
         objPaymentProfileTransactionsCoreEntity.ProfileID          = objPaymentGatewayTransactionsCoreEntity.MerchantParam1;
         objPaymentProfileTransactionsCoreEntity.TransactionID      = objPaymentGatewayTransactionsCoreEntity.TransactionID;
         objPaymentProfileTransactionsCoreEntity.ValidityExpiryDate = objPaymentGatewayTransactionsCoreEntity.TranDate.AddMonths(Constants.MEMBERSHIPFORSIXMONTHS);
         objPaymentProfileTransactionsCoreEntity.SangamID           = _objLoggedInUser.sangamID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
Exemplo n.º 2
0
 public int Add(ref PaymentGatewayTransactionsCoreEntity objPaymentGatewayTransactionsCoreEntity)
 {
     try
     {
         PaymentProfileTransactionsCoreEntity objPaymentProfileTransactionsCoreEntity = new PaymentProfileTransactions.PaymentProfileTransactionsCoreEntity();
         using (objPaymentProfileTransactionsCoreEntity as IDisposable)
         {
             AssignProfileTransactionFromGatewayTransaction(ref objPaymentGatewayTransactionsCoreEntity, ref objPaymentProfileTransactionsCoreEntity);
             PaymentProfileTransactionsModel objPaymentProfileTransactionsModel = new PaymentProfileTransactionsModel();
             using (objPaymentProfileTransactionsModel as IDisposable)
             {
                 AssignModelFromEntity(ref objPaymentProfileTransactionsCoreEntity, ref objPaymentProfileTransactionsModel);
                 IUnitOfWork objIUnitOfWorkAdd = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                 using (objIUnitOfWorkAdd as IDisposable)
                 {
                     objIUnitOfWorkAdd.RepositoryPaymentProfileTransactions.Add(objPaymentProfileTransactionsModel);
                     objIUnitOfWorkAdd.commit();
                 }
                 objIUnitOfWorkAdd = null;
             }
             objPaymentProfileTransactionsModel = null;
         }
         objPaymentProfileTransactionsCoreEntity = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }