public void CreditCardInfoConstructorTest() { Guid id = new Guid(); // TODO: Initialize to an appropriate value Guid customerId = new Guid(); // TODO: Initialize to an appropriate value string newCardNumber = string.Empty; // TODO: Initialize to an appropriate value int expiryMonth = 0; // TODO: Initialize to an appropriate value int expiryYear = 0; // TODO: Initialize to an appropriate value string newSecurityCode = string.Empty; // TODO: Initialize to an appropriate value string newCardType = string.Empty; // TODO: Initialize to an appropriate value CreditCardInfo target = new CreditCardInfo(id, customerId, newCardNumber, expiryMonth, expiryYear, newSecurityCode, newCardType); Assert.Inconclusive("TODO: Implement code to verify target"); }
public static CreditCardInfo ToCreditCard(this DataRow row) { CreditCardInfo card = new CreditCardInfo(row.GetString("CreditCardInfo")); card.Id = row.GetGuid("Id"); card.CustomerId = row.GetGuid("CustomerId"); return card; //CreditCardInfo entity = null; //if (row["CreditCardInfo"] != System.DBNull.Value) // entity = new CreditCardInfo((string)row["CreditCardInfo"]); //if (row["Id"] != System.DBNull.Value) // entity.Id = (Guid)row["Id"]; //if (row["CustomerId"] != System.DBNull.Value) // entity.CustomerId = (Guid)row["CustomerId"]; //return entity; }
public void CreditCardInfoConstructorTest1() { string newEncryptedData = string.Empty; // TODO: Initialize to an appropriate value CreditCardInfo target = new CreditCardInfo(newEncryptedData); Assert.Inconclusive("TODO: Implement code to verify target"); }
public static bool CheckForDuplicationCardInfo(ref CreditCardInfo entity) { if (entity.CustomerId != Guid.Empty) { entity.ChangeDecryptionStatus(true); List<CreditCardInfo> creditCardInfoList = GetCreditCardsByCustomer(entity.CustomerId); foreach (CreditCardInfo objCreditCardInfo in creditCardInfoList) { if (entity.CustomerId == objCreditCardInfo.CustomerId & entity.CardNumber == objCreditCardInfo.CardNumber & entity.SecurityCode == objCreditCardInfo.SecurityCode) return true; } entity.ChangeDecryptionStatus(false); } return false; }
public static void CreateCreditCard(ref CreditCardInfo entity) { DbCommand cmd = SqlHelpers.CreateCommand(ConnectionString); //cmd.CommandText = @"bill_CreditCard_Insert"; cmd.CommandText = @"bill_CreditCard_InsertOrUpdate"; cmd.AddInputParam("@Id", DbType.Guid, entity.Id); cmd.AddInputParam("@CustomerId", DbType.Guid, entity.CustomerId); cmd.AddInputParam("@CardInfo", DbType.String, entity.EncryptedData); int affectedRows = SqlHelpers.ExecuteNonQuery(cmd); }
public static void Refund(GatewayInfo gateway, GatewayTypeInfo gatewayType, Guid orderId, ICustomer customer, CreditCardInfo card, string refID, TransactionInfo transaction, bool testTransaction) { Instance.Refund(gateway, gatewayType, orderId, customer, card, refID, transaction, testTransaction); }
public static TransactionInfo PreAuthorize(GatewayInfo gateway, GatewayTypeInfo gatewayType, Guid orderId, ICustomer customer, CreditCardInfo card, decimal amount, bool testTransaction) { TransactionInfo transactionInfo = null; LoadProviders(); transactionInfo = _providers[gatewayType.ProviderName].PreAuthorize(gateway, gatewayType, orderId, customer, card, amount, testTransaction); return transactionInfo; }
public abstract void Refund(GatewayInfo gateway, GatewayTypeInfo gatewayType, Guid orderId, ICustomer customer, CreditCardInfo card, string refID, TransactionInfo transaction, bool testTransaction);
public abstract TransactionInfo PreAuthorize(GatewayInfo gateway, GatewayTypeInfo gatewayType, Guid orderId, ICustomer customer, CreditCardInfo card, decimal amount, bool testTransaction);
public abstract TransactionInfo ProcessSubscription(ref SubscriptionInfo sub, GatewayInfo gateway, GatewayTypeInfo gatewayType, ICustomer customer, CreditCardInfo card, bool isTrial, bool testTransaction);